import type { Meta, StoryObj } from "@storybook/vue3-vite"
import IconPicker from "./IconPicker.vue"
import { componentDoc } from "@/lib/storybook"

const meta = {
  title: "Elements/Picker/IconPicker",
  component: IconPicker,
  tags: ["autodocs"],
  args: {
    label: "Icon",
  },
  parameters: componentDoc("IconPicker", { barrel: "picker" }),
  decorators: [
    () => ({
      template: '<div class="w-96 p-4"><story /></div>',
    }),
  ],
} satisfies Meta<typeof IconPicker>

export default meta
type Story = StoryObj<typeof meta>

export const Default: Story = {
  args: { label: "Icon" },
}

export const WithValue: Story = {
  args: { label: "Icon", modelValue: "Calendar" },
}

export const Required: Story = {
  args: { label: "Icon", required: true },
}

export const Disabled: Story = {
  args: { label: "Icon", disabled: true },
}

export const WithHelpText: Story = {
  args: { label: "Icon", helpText: "Choose a lucide icon by name." },
}
