import type { Meta, StoryObj } from "@storybook/preact";
import { Countdown } from "./Countdown";

const meta: Meta<typeof Countdown> = { title: "Primitives/Countdown", component: Countdown };
export default meta;
type Story = StoryObj<typeof Countdown>;

const tomorrow = new Date(Date.now() + 86400000).toISOString();
const nextWeek = new Date(Date.now() + 7 * 86400000).toISOString();

export const Default: Story = { args: { target: nextWeek, label: "Launch in" } };
export const Tomorrow: Story = { args: { target: tomorrow, label: "Deadline" } };
export const Expired: Story = { args: { target: "2024-01-01", label: "Past event" } };
