 RetirementRulesEditor = require '../../components/retirement-rules-editor'
 {Navigation} = require 'react-router'
 tasks = require '../../classifier/tasks'
+
+DEMO_SUBJECT_SET_ID = '1166'
 
 EditWorkflowPage = React.createClass
   displayName: 'EditWorkflowPage'

        </div>
      </div>


      <div className="column">
        {if @state.selectedTaskKey? and @props.workflow.tasks[@state.selectedTaskKey]?
          TaskEditorComponent = tasks[@props.workflow.tasks[@state.selectedTaskKey].type].Editor

    projectAndWorkflowSubjectSets = Promise.all [
      @props.project.get 'subject_sets'
      @props.workflow.get 'subject_sets'
    ]

    <PromiseRenderer promise={projectAndWorkflowSubjectSets}>{([projectSubjectSets, workflowSubjectSets]) =>
      <div>
        <table>
          <tbody>
            {for subjectSet in projectSubjectSets
              assigned = subjectSet in workflowSubjectSets
              toggle = @handleSubjectSetToggle.bind this, subjectSet
              <tr key={subjectSet.id}>
                <td><input type="checkbox" checked={assigned} onChange={toggle} /></td>
                <td>{subjectSet.display_name}</td>
              </tr>}
          </tbody>
        </table>
        {if projectSubjectSets.length is 0
          <button type="button" onClick={@addDemoSubjectSet}>Add an example subject set</button>}
      </div>
    }</PromiseRenderer>

  addNewTask: (type) ->
