'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 _addonActions = require('@storybook/addon-actions');

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

var _index2 = _interopRequireDefault(_index);

var _InputRadioGroupKnobs = require('./InputRadioGroup.knobs.options');

var _InputRadioGroupKnobs2 = _interopRequireDefault(_InputRadioGroupKnobs);

var _InputRadioGroup = require('./InputRadioGroup.md');

var _InputRadioGroup2 = _interopRequireDefault(_InputRadioGroup);

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

(0, _react3.storiesOf)('forms|molecules', module).addDecorator((0, _addonKnobs.withKnobs)({ escapeHTML: false })).add('InputRadioGroup', function () {
  var InputRadioGroupProps = {
    title: (0, _addonKnobs.text)('title', 'Pick your favorite plant'),
    name: (0, _addonKnobs.text)('group', 'favorite-plant'),
    outline: (0, _addonKnobs.boolean)('outline', true),
    defaultSelected: (0, _addonKnobs.text)('defaultSelected', ''),
    error: (0, _addonKnobs.boolean)('error', false),
    errorMsg: (0, _addonKnobs.text)('errorMsg', 'You must selected your favorite plant.'),
    disabled: (0, _addonKnobs.boolean)('disabled', false),
    inline: (0, _addonKnobs.boolean)('inline', true),
    radioButtons: (0, _addonKnobs.object)('radioButtons', _InputRadioGroupKnobs2.default.radioButtons)
  };

  return _react2.default.createElement(_index2.default, _extends({}, InputRadioGroupProps, { onChange: (0, _addonActions.action)('onChange') }));
}, { info: _InputRadioGroup2.default });