'use strict';

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

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

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

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

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

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

var _index2 = _interopRequireDefault(_index);

var _InputCheckBox = require('./InputCheckBox.md');

var _InputCheckBox2 = _interopRequireDefault(_InputCheckBox);

var _Icon = require('../../base/Icon');

var _Icon2 = _interopRequireDefault(_Icon);

var _IconKnob = require('../../base/Icon/Icon.knob.options');

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

(0, _react3.storiesOf)('forms|atoms', module).addDecorator((0, _addonKnobs.withKnobs)({ escapeHTML: false })).add('InputCheckBox', function () {
  var props = {
    id: (0, _react4.text)('id', 'input-checkbox'),
    value: (0, _react4.text)('value', 'select-all'),
    label: (0, _react4.text)('label', 'Apply to all'),
    defaultValue: (0, _react4.text)('defaultValue', 'select-all'),
    onChange: (0, _addonActions.action)('onChange'),
    onKeyDown: (0, _addonActions.action)('onKeyDown'),
    disabled: (0, _react4.boolean)('disabled', false),
    required: (0, _react4.boolean)('required', false),
    errorMsg: (0, _react4.text)('errorMsg', 'You are required to check this box.'),
    labelText: (0, _react4.text)('labelText', 'Checkbox Input'),
    classes: (0, _react4.array)('classes', [])
  };
  var iconProps = {
    name: (0, _react4.select)('icon.name', _IconKnob.svgOptions),
    svgWidth: 20,
    svgHeight: 20,
    fill: (0, _react4.color)('icon.color', '#388557')
  };
  return _react2.default.createElement(_index2.default, _extends({}, props, { icon: _react2.default.createElement(_Icon2.default, iconProps) }));
}, { info: _InputCheckBox2.default });