"use strict";

var _react = _interopRequireDefault(require("react"));

var _react2 = require("@storybook/react");

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

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

var _component = _interopRequireDefault(require("./component"));

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

var props = function props() {
  var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
      _ref$isChecked = _ref.isChecked,
      isChecked = _ref$isChecked === void 0 ? undefined : _ref$isChecked,
      _ref$isHidden = _ref.isHidden,
      isHidden = _ref$isHidden === void 0 ? undefined : _ref$isHidden,
      _ref$label = _ref.label,
      label = _ref$label === void 0 ? undefined : _ref$label,
      _ref$onChange = _ref.onChange,
      onChange = _ref$onChange === void 0 ? undefined : _ref$onChange;

  return {
    isChecked: (0, _addonKnobs.boolean)('isChecked', isChecked),
    isHidden: (0, _addonKnobs.boolean)('isHidden', isHidden),
    label: (0, _addonKnobs.text)('label', label),
    onChange: (0, _addonKnobs.button)('onChange', (0, _addonActions.action)('clicked', onChange))
  };
};

(0, _react2.storiesOf)('Web/form/Switch', module).add('default', function () {
  return _react.default.createElement(_component.default, props());
});