 {React, ReactBootstrap} = window
-{Button, Input, Label} = ReactBootstrap
+{Button, Input, Label, Modal} = ReactBootstrap
+{relative, join} = require 'path-extra'
 i18n = require '../node_modules/i18n'
 {__} = i18n
 
 TagsInputContainer = require './tagsInputContainer'
+HenseiItem = require './henseiItem'
 
 AddDataTab = React.createClass
   getInitialState: ->

      deckChecked: [false, false, false, false]
      title: ''
      tags: []
  handleClickCheckbox: (index) ->
    {deckChecked} = @state
    if deckChecked isnt []

      <div>
        <Button bsSize='small'
                disabled={@state.saveDisable}
                onClick={@handlePreClick}
                block>
          {__ 'Save'}
        </Button>
        <Button bsSize='small'
                disabled={@state.saveDisable}
                onClick={@handleSaveClick}
                block>
          {__ 'Save'}
        </Button>
      </div>
      <Modal show={@state.showPre} container={this}>
        <Modal.Header>
          <Modal.Title id='contained-modal-title'>Preview</Modal.Title>
        </Modal.Header>
        <Modal.Body>
          <HenseiItem deckItem={@state.deck}/>
        </Modal.Body>
        <Modal.Footer>
          <Button onClick={@close}>Close</Button>
        </Modal.Footer>
      </Modal>
    </div>

module.exports = AddDataTab
