import type { Meta, StoryObj } from "@storybook/vue3";
import ItCheckboxGroup from "./ItCheckboxGroup.vue";

// More on how to set up stories at: https://storybook.js.org/docs/7.0/vue/writing-stories/introduction
const meta: Meta<typeof ItCheckboxGroup> = {
  title: "VBV/CheckboxGroup",
  component: ItCheckboxGroup,
  // This component will have an automatically generated docsPage entry: https://storybook.js.org/docs/7.0/vue/writing-docs/docs-page
  tags: ["autodocs"],
  args: { label: "A Label" }, // default value
  argTypes: { "onUpdate:items": { action: "itemsUpdate" } },
};

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

export const CheckboxGroup: Story = {
  args: {
    label: "Label",
    items: [
      {
        value: "checkbox1",
        label: "Label 1",
        subtitle: "Subtitle 1",
        checked: false,
      },
      {
        value: "checkbox2",
        label: "Label 2",
        subtitle: "Subtitle 2",
        checked: false,
      },
      {
        value: "checkbox3",
        label: "Label 3",
        checked: false,
      },
    ],
  },
};
