import { useState } from 'react';
import { Switch } from './Switch';

export default {
  title: 'Inputs/Switch',
  component: Switch,
  tags: ['autodocs'],
};

export const Default = {
  render: () => {
    const [checked, setChecked] = useState(false);
    return (
      <Switch
        label="Activar notificaciones"
        checked={checked}
        onChange={(e) => setChecked(e.target.checked)}
      />
    );
  },
};

export const Checked = {
  args: {
    label: 'Switch activado',
    checked: true,
  },
};

export const Disabled = {
  args: {
    label: 'Switch deshabilitado',
    checked: false,
    disabled: true,
  },
};

export const DisabledChecked = {
  args: {
    label: 'Switch deshabilitado y activado',
    checked: true,
    disabled: true,
  },
};

export const WithoutLabel = {
  args: {
    checked: false,
  },
};

