 {find, compact, extend, last} = require 'underscore-plus'
 {Emitter} = require 'event-kit'
 Serializable = require 'serializable'
-Grim = require 'grim'
 Model = require './model'
 PaneAxis = require './pane-axis'
 TextEditor = require './text-editor'

  serializeParams: ->
    if typeof @activeItem?.getURI is 'function'
      activeItemURI = @activeItem.getURI()
    else if Grim.includeDeprecatedAPIs and typeof @activeItem?.getUri is 'function'
      activeItemURI = @activeItem.getUri()

    id: @id
    items: compact(@items.map((item) -> item.serialize?()))

    throw new Error("Pane has been destroyed") if @isDestroyed()

    @container?.setActivePane(this)
    @emitter.emit 'did-activate'

  # Public: Close the pane and destroy all its items.
