import { Form } from '@inertiajs/react'; import type { ComponentProps, ReactNode } from 'react'; import { useState } from 'react'; import InputError from '@/components/input-error'; import { Button } from '@/components/ui/button'; import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, } from '@/components/ui/dialog'; import { Label } from '@/components/ui/label'; import { cn } from '@/lib/utils'; import type { RouteFormDefinition } from '@/wayfinder'; const controlClasses = 'border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 w-full min-w-0 rounded-md border bg-transparent px-3 py-2 text-base shadow-xs outline-none focus-visible:ring-[3px] disabled:opacity-50 md:text-sm'; export function PageHeader({ title, description, action, }: { title: string; description?: string; action?: ReactNode; }) { return (

{title}

{description && (

{description}

)}
{action}
); } export function FormField({ id, label, error, className, children, }: { id: string; label: string; error?: string; className?: string; children: ReactNode; }) { return (
{children}
); } export function NativeSelect({ options, className, ...props }: ComponentProps<'select'> & { options: ReadonlyArray<{ value: string; label: string }>; }) { return ( ); } export function Textarea({ className, ...props }: ComponentProps<'textarea'>) { return (