 React = require 'react'
 talkClient = require 'panoptes-client/lib/talk-client'
-PromiseRenderer = require '../../components/promise-renderer'
 SingleSubmitButton = require '../../components/single-submit-button'
 
 DEFAULT_BOARD_TITLE = 'Notes'            # Name of board to put subject comments

    section: React.PropTypes.string
    onCreateBoard: React.PropTypes.func # passed (board) on create

  defaultBoardPromise: ->
    talkClient
      .type('boards')
      .get({section: @props.section, subject_default: true})
      .index(0)

  createSubjectDefaultBoard: ->
    board =

      .then => @props.onCreateBoard?(board)

  render: ->
    if @state.defaultBoard?
      <div>
        <i className="fa fa-check" /> Subject Default Board Setup
      </div>
    else
      <SingleSubmitButton type="button" onClick={@createSubjectDefaultBoard}>
        <i className="fa fa-photo" /> Activate Talk Subject Comments Board
      </SingleSubmitButton>
