import type { Meta, StoryObj } from '@storybook/react' import { useState } from 'react' import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, } from './dialog' const meta: Meta = { title: 'Primitives/Dialog', parameters: { layout: 'centered', backgrounds: { default: 'dark' } }, } export default meta type Story = StoryObj export const Default: Story = { name: 'Default', render: () => { const [open, setOpen] = useState(true) return ( Open Dialog Session Configuration Configure the runtime environment for your sandbox session. Changes take effect on the next session start. Image Memory (MB) setOpen(false)} className="rounded-md border border-border px-4 py-2 text-sm text-muted-foreground hover:bg-muted" > Cancel setOpen(false)} className="rounded-md bg-primary px-4 py-2 text-sm text-primary-foreground hover:bg-primary/90" > Save changes ) }, } export const SandboxVariant: Story = { name: 'Sandbox Variant', render: () => { const [open, setOpen] = useState(true) return ( Open Sandbox Dialog New Sandbox Session Provision a fresh container with your selected runtime. Sessions auto-terminate after the configured timeout. Runtime node:20-alpine python:3.12-slim golang:1.22-alpine rust:1.77-slim Timeout (seconds) setOpen(false)} className="rounded-md border border-border px-4 py-2 text-sm text-muted-foreground hover:bg-muted" > Cancel setOpen(false)} className="rounded-md bg-primary px-4 py-2 text-sm text-primary-foreground hover:bg-primary/90" > Create session ) }, } export const DestructiveAction: Story = { name: 'Destructive Action', render: () => { const [open, setOpen] = useState(true) return ( Terminate Session Terminate session? This will immediately kill the running process and destroy all ephemeral data. This action cannot be undone. Session sess_01j9x8k2m... has been running for 47 minutes. Unsaved work will be lost. setOpen(false)} className="rounded-md border border-border px-4 py-2 text-sm text-muted-foreground hover:bg-muted" > Keep running setOpen(false)} className="rounded-md bg-red-600 px-4 py-2 text-sm text-white hover:bg-red-700" > Terminate ) }, }