 
   serialize: (params) ->
     deserializer: 'PaneContainer'
-    version: @serializationVersion
+    version: SERIALIZATION_VERSION
     root: @root?.serialize()
     activePaneId: @activePane.id
 
   deserialize: (state, deserializerManager) ->
-    return unless state.version is @serializationVersion
+    return unless state.version is SERIALIZATION_VERSION
     @setRoot(deserializerManager.deserialize(state.root))
     activePane = find @getRoot().getPanes(), (pane) -> pane.id is state.activePaneId
     @setActivePane(activePane ? @getPanes()[0])

ItemRegistry = require './item-registry'
PaneContainerElement = require './pane-container-element'

module.exports =
class PaneContainer
  serializationVersion: 1
  root: null
  stoppedChangingActivePaneItemDelay: 100
  stoppedChangingActivePaneItemTimeout: null

  constructor: (params) ->
    {@config, applicationDelegate, notificationManager, deserializerManager, @viewRegistry, @location} = params
    @emitter = new Emitter
    @subscriptions = new CompositeDisposable
    @itemRegistry = new ItemRegistry
    @alive = true

    @setRoot(new Pane({container: this, @config, applicationDelegate, notificationManager, deserializerManager, @viewRegistry}))
    @setActivePane(@getRoot())

        @stoppedChangingActivePaneItemTimeout =
          setTimeout(
            stoppedChangingActivePaneItemCallback,
            STOPPED_CHANGING_ACTIVE_PANE_ITEM_DELAY)

      @subscriptions.add(childSubscription)

