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

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

export default meta
type Story = StoryObj<typeof meta>

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

export const WithValue: Story = {
  args: { label: "Starts at", modelValue: "2024-06-15T13:30:00" },
}

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

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

export const WithHelpText: Story = {
  args: { label: "Starts at", helpText: "Local time, 24-hour clock" },
}
