import UiBmsSwitch from '@/components/form/UiBmsSwitch.vue';

import template from '@/documentation/template_internal_component.mdx';

export default {
  parameters: {
    docs: {
      page: template,
    },
  },
  tags: ['code-only'],
  title: 'Composants/form/Switch',
  component: UiBmsSwitch,
};

const Template = (args) => ({
  setup() {
    return { args };
  },
  components: {
    UiBmsSwitch,
  },
  template: `
    <UiBmsSwitch v-bind="args"/>
    `,
});

export const Default = Template.bind({});
Default.args = {};

export const On = Template.bind({});
On.args = { modelValue: true };

export const Off = Template.bind({});
Off.args = { modelValue: false };

export const DisabledOn = Template.bind({});
DisabledOn.args = { disabled: true, modelValue: true };

export const DisabledOff = Template.bind({});
DisabledOff.args = { disabled: true, modelValue: false };
