 ItemRegistry = require './item-registry'
 PaneContainerElement = require './pane-container-element'
 
+SERIALIZATION_VERSION = 1
+STOPPED_CHANGING_ACTIVE_PANE_ITEM_DELAY = 100
+
 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
+    @stoppedChangingActivePaneItemTimeout = null
 
     @setRoot(new Pane({container: this, @config, applicationDelegate, notificationManager, deserializerManager, @viewRegistry}))
     @setActivePane(@getRoot())

        @stoppedChangingActivePaneItemTimeout =
          setTimeout(
            stoppedChangingActivePaneItemCallback,
            @stoppedChangingActivePaneItemDelay)

      @subscriptions.add(childSubscription)



  serialize: (params) ->
    deserializer: 'PaneContainer'
    version: SERIALIZATION_VERSION
    root: @root?.serialize()
    activePaneId: @activePane.id

  deserialize: (state, deserializerManager) ->
    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])
