+_                    = require 'lodash'
 kd                   = require 'kd'
 jspath               = require 'jspath'
 Encoder              = require 'htmlencode'

      name : 'Private Variables'
      view : @variablesView

    @readmeView                        = new ReadmeView { stackTemplate }
    @tabView.addPane readmePane        = new KDTabPaneView
      name : 'Readme'
      view : @readmeView


    @tabView.on 'PaneDidShow', (pane) ->
      pane.mainView?.editorView?.resize()

    @listenContentChanges()


  listenContentChanges: ->

    @changedContents = {}

    @inputTitle.inputs.title.on 'input', (event) =>
      { defaultValue } = @inputTitle.inputs.title.getOptions()
      @changedContents.stackName = event.target.value isnt defaultValue

    _.each @editorViews, (view, key) =>

      { editorView } = view
      { ace }        = editorView.aceView

      editorView.on 'EditorReady', =>
        ace.on 'FileContentChanged', =>
          @changedContents[key] = ace.isContentChanged()


  isStackChanged: ->

