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

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

export default meta
type Story = StoryObj<typeof meta>

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

export const WithValue: Story = {
  args: { label: "Timezone", modelValue: "Europe/London" },
}

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

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

export const WithHelpText: Story = {
  args: { label: "Timezone", helpText: "Pick an IANA timezone identifier" },
}
