import React from 'react';
import { Switch, SwitchOption } from '.';
import { COMPONENT_SIZE } from '../Forms';
export default {
  component: Switch,
  title: 'Switch',
  subcomponents: {
    SwitchOption: SwitchOption
  },
  parameters: {
    actions: {
      argTypesRegex: '^on.*'
    }
  }
};
var Template = function Template(props) {
  return /*#__PURE__*/React.createElement(Switch, props, /*#__PURE__*/React.createElement(SwitchOption, {
    label: "Day",
    value: "1"
  }), /*#__PURE__*/React.createElement(SwitchOption, {
    label: "Week",
    value: "2"
  }), /*#__PURE__*/React.createElement(SwitchOption, {
    label: "Month",
    value: "3"
  }), /*#__PURE__*/React.createElement(SwitchOption, {
    label: "Year",
    value: "4"
  }));
};
export var Default = Template.bind({});
Default.args = {
  name: 'switch-default'
};
export var Disabled = Template.bind({});
Disabled.storyName = 'Disabled';
Disabled.args = {
  name: 'switch-disabled',
  value: '2',
  isDisabled: true
};
export var Invalid = Template.bind({});
Invalid.storyName = 'Invalid';
Invalid.args = {
  name: 'switch-invalid',
  isInvalid: true
};
export var WithLegend = Template.bind({});
WithLegend.storyName = 'With legend';
WithLegend.args = {
  name: 'switch-legend',
  label: 'Example legend'
};
export var SelectedValue = Template.bind({});
SelectedValue.storyName = 'With value selected';
SelectedValue.args = {
  name: 'switch-selected-value',
  value: '2'
};
export var Small = Template.bind({});
Small.storyName = 'Small';
Small.args = {
  name: 'switch-small',
  size: COMPONENT_SIZE.SMALL
};