 environmentDataProvider       = require 'app/userenvironmentdataprovider'
 CollaborationController       = require './collaborationcontroller'
 EnvironmentsMachineStateModal = require 'app/providers/environmentsmachinestatemodal'
+ResourceStateModal            = require 'app/providers/resourcestatemodal'
 KlientEventManager            = require 'app/kite/klienteventmanager'
 IDELayoutManager              = require './workspace/idelayoutmanager'
 StackAdminMessageController   = require './views/stacks/stackadminmessagecontroller'

IDEView                       = require './views/tabview/ideview'
FSHelper                      = require 'app/util/fs/fshelper'
showError                     = require 'app/util/showError'
actionTypes                   = require 'app/flux/environment/actiontypes'
IDEWorkspace                  = require './workspace/ideworkspace'
IDEStatusBar                  = require './views/statusbar/idestatusbar'

    if isTeamReactSide() and state is Stopping
      modalOptions.cssClass = 'env-machine-state team full'

    modalClass = if checkFlag 'new-resource-state-modal'
    then ResourceStateModal
    else EnvironmentsMachineStateModal
    @machineStateModal = new modalClass modalOptions, machineItem

    @machineStateModal.once 'KDObjectWillBeDestroyed', => @machineStateModal = null
    @machineStateModal.once 'IDEBecameReady', @bound 'handleIDEBecameReady'
