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

var _ButtonToggle2 = _interopRequireDefault(_ButtonToggle);

var _ButtonToggleKnobs = require('./ButtonToggle.knobs.options');

var _ButtonToggleKnobs2 = _interopRequireDefault(_ButtonToggleKnobs);

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

(0, _react3.storiesOf)('atoms/buttons', module).addDecorator((0, _addonKnobs.withKnobs)({ escapeHTML: false })).add('ButtonToggle', function () {
  var props = {
    option1: (0, _addonKnobs.object)('option1', _ButtonToggleKnobs2.default.options[0]),
    option2: (0, _addonKnobs.object)('option2', _ButtonToggleKnobs2.default.options[1]),
    id: (0, _addonKnobs.text)('id', 'sort'),
    labelText: (0, _addonKnobs.text)('labelText', 'Sort by:'),
    onChangeCallback: (0, _addonActions.action)('buttonToggle on select'),
    defaultValue: (0, _addonKnobs.select)('defaultValue', [_ButtonToggleKnobs2.default.options[0].value, _ButtonToggleKnobs2.default.options[1].value], _ButtonToggleKnobs2.default.options[1].value)
  };
  return _react2.default.createElement(_index2.default, props);
}, { info: _ButtonToggle2.default });