import { useState } from 'react' import type { Meta, StoryObj } from '@storybook/react-vite' import { AlertTriangle } from 'lucide-react' import { Dialog, DialogHeader, DialogTitle, DialogDescription, DialogContent, DialogFooter } from './Dialog' import { Button } from '@/components/atoms/Button' import { Input } from '@/components/atoms/Input' const meta: Meta = { title: 'Molecules/Dialog', component: Dialog, tags: ['autodocs'], argTypes: { size: { control: 'select', options: ['sm', 'default', 'lg', 'full'], }, closeOnBackdrop: { control: 'boolean', }, }, } export default meta type Story = StoryObj // --- Default --- export const Default: Story = { render: () => { const [open, setOpen] = useState(false) return ( <> setOpen(false)}> setOpen(false)}> Dialog title A short description of the dialog purpose.

This is the dialog body. It can contain any content — text, forms, lists, or other components.

) }, } // --- Small --- export const Small: Story = { render: () => { const [open, setOpen] = useState(false) return ( <> setOpen(false)} size="sm"> setOpen(false)}> Quick confirmation

Are you sure you want to proceed?

) }, } // --- Large --- export const Large: Story = { render: () => { const [open, setOpen] = useState(false) return ( <> setOpen(false)} size="lg"> setOpen(false)}> Review submission details Please review the information below before submitting.

Participant count

24 participants across 3 schools

Data collection period

March 2026 — June 2026

Ethics approval

SERAP 2026-0142 (approved)

) }, } // --- Danger confirmation --- export const DangerConfirmation: Story = { render: () => { const [open, setOpen] = useState(false) return ( <> setOpen(false)} size="sm"> setOpen(false)}>
Delete project?

This action cannot be undone. All data, themes, and participant responses associated with this project will be permanently deleted.

) }, } // --- With form --- export const WithForm: Story = { render: () => { const [open, setOpen] = useState(false) return ( <> setOpen(false)}> setOpen(false)}> New theme Give your theme a name and description to help organise your findings.
) }, } // --- No close button --- export const NoCloseButton: Story = { render: () => { const [open, setOpen] = useState(false) return ( <> setOpen(false)} closeOnBackdrop={false}> Terms of use

You must accept the terms of use before continuing. This dialog cannot be dismissed by clicking the backdrop or pressing Escape — only through the action buttons.

) }, } // --- Content only --- export const ContentOnly: Story = { render: () => { const [open, setOpen] = useState(false) return ( <> setOpen(false)} size="sm">

Your changes have been saved.

) }, }