'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 _InputDate = require('./InputDate.md');

var _InputDate2 = _interopRequireDefault(_InputDate);

var _InputDateKnobs = require('./InputDate.knobs.options');

var _InputDateKnobs2 = _interopRequireDefault(_InputDateKnobs);

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

(0, _react3.storiesOf)('forms|atoms', module).addDecorator((0, _addonKnobs.withKnobs)({ escapeHTML: false })).add('InputDate', function () {
  var defaultDate = new Date('Jan 01 2018');
  var props = {
    labelText: (0, _addonKnobs.text)('labelText', 'Select a date:'),
    placeholder: (0, _addonKnobs.text)('placeholder', 'm/dd/yy'),
    required: (0, _addonKnobs.boolean)('required', true),
    id: (0, _addonKnobs.text)('id', 'date-input'),
    name: (0, _addonKnobs.text)('name', 'date-input'),
    restrict: (0, _addonKnobs.select)('restrict', _InputDateKnobs2.default.restrict, ''),
    onChangeCallback: (0, _addonActions.action)('custom-click on select'),
    defaultDate: new Date((0, _addonKnobs.date)('defaultDate', defaultDate)),
    format: (0, _addonKnobs.select)('format', _InputDateKnobs2.default.format, 'M/DD/YYYY')
  };
  return _react2.default.createElement(_index2.default, props);
}, { info: _InputDate2.default });