import type { Meta, StoryObj } from '@storybook/svelte';
import Checkbox from './Checkbox.svelte';

const meta = {
  title: 'UI/Checkbox',
  component: Checkbox,
  tags: ['autodocs'],
  parameters: {
    docs: {
      description: {
        component: 'Checkbox mit optionalem Label. `checked` und `disabled` steuerbar.',
      },
    },
  },
  argTypes: {
    checked: { control: 'boolean' },
  },
} satisfies Meta<Checkbox>;

export default meta;
type Story = StoryObj<typeof meta>;

export const Unchecked: Story = {
  args: {
    label: 'Option auswählen',
    checked: false,
  },
};

export const Checked: Story = {
  args: {
    label: 'Option ausgewählt',
    checked: true,
  },
};

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