 {TocStore, TocActions} = require '../../flux/toc'
 {TaskPlanStore, TaskPlanActions} = require '../../flux/task-plan'
 {CourseStore} = require '../../flux/course'
-
+SectionsChooser = require '../sections-chooser'
+LoadableItem = require '../loadable-item'
 
 SelectTopics = React.createClass
   displayName: 'SelectTopics'

      primary={primary}
      confirmMsg='You will lose unsaved changes if you continue.'
      cancel='Cancel'
      isChanged={-> changed}
      onCancel={cancel}>

      <div className='select-reading-chapters'>
        {chapters}
      </div>
    </Dialog>

  render: ->


  getInitialState: -> {initialSelected: @props.selected}

  hasChanged: ->
    @props.selected and not _.isEqual(@props.selected, @state.initialSelected)

  onSectionChange: (sectionIds) ->
    TaskPlanActions.updateTopics(@props.planId, sectionIds)

  renderDialog: ->
    {courseId, planId, selected, hide, header, primary, cancel} = @props
    ecosystemId = CourseStore.get(courseId).ecosystem_id

    <Dialog
      className='select-reading-dialog'
