'use strict';

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _react3 = require('@storybook/react');

var _addonKnobs = require('@storybook/addon-knobs');

var _addonActions = require('@storybook/addon-actions');

var _index = require('./index');

var _index2 = _interopRequireDefault(_index);

var _InputTextTypeAheadKnobs = require('./InputTextTypeAhead.knobs.options');

var _InputTextTypeAheadKnobs2 = _interopRequireDefault(_InputTextTypeAheadKnobs);

var _InputTextTypeAhead = require('./InputTextTypeAhead.md');

var _InputTextTypeAhead2 = _interopRequireDefault(_InputTextTypeAhead);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

(0, _react3.storiesOf)('forms|atoms', module).addDecorator((0, _addonKnobs.withKnobs)({ escapeHTML: false })).add('InputTextTypeAhead', function () {
  var props = {
    boxed: (0, _addonKnobs.boolean)('boxed', true),
    label: (0, _addonKnobs.text)('label', 'State Organization'),
    placeholder: (0, _addonKnobs.text)('placeholder', 'All Organizations'),
    id: (0, _addonKnobs.text)('id', 'org-typeahead'),
    options: (0, _addonKnobs.object)('options', _InputTextTypeAheadKnobs2.default.options.orgSelector),
    selected: (0, _addonKnobs.select)('selected', _InputTextTypeAheadKnobs2.default.options.orgSelector.map(function (option) {
      return option.text;
    }), ''),
    onChange: (0, _addonActions.action)('InputTextTypeAhead onChange'),
    disabled: (0, _addonKnobs.boolean)('disabled', false),
    onKeyDown: (0, _addonActions.action)('down')
  };
  return _react2.default.createElement(_index2.default, props);
}, { info: _InputTextTypeAhead2.default });