 React = require 'react'
 WorkflowToggle = require '../../components/workflow-toggle'
-PromiseRenderer = require '../../components/promise-renderer'
 SetToggle = require '../../lib/set-toggle'
 Dialog = require 'modal-form/dialog'
 getWorkflowsInOrder = require '../../lib/get-workflows-in-order'

      private: false
      beta_requested: false
      launch_requested: false

  mixins: [SetToggle]

  setterProperty: 'project'

  isReviewable: ->
    not @props.project.private and

      </div>,
      closeButton: true
    )

  handleWorkflowSettingChange: (workflow, e) ->
    checked = e.target.checked

    workflow.update({ 'active': checked }).save()
      .catch((error) =>
        @setState {error}
      ).then((workflow) =>
        if not workflow.active and workflow.id is @props.project.configuration.default_workflow
          @props.project.update({ 'configuration.default_workflow': null })
          @props.project.save()
      ).then(() => @forceUpdate()) # Dislike. Eventually we should refactor to not have to call this.forceUpdate()

  render: ->
    looksDisabled =
