import { FieldType } from '@prisma/client'; import { CalendarDays, CheckSquare, ChevronDown, Contact, Disc, Hash, Mail, Type, User, } from 'lucide-react'; import { cn } from '../lib/utils'; import { Card, CardContent } from './card'; export interface FieldSelectorProps { className?: string; selectedField: FieldType | null; onSelectedFieldChange: (fieldType: FieldType) => void; disabled?: boolean; } export const FieldSelector = ({ className, selectedField, onSelectedFieldChange, disabled = false, }: FieldSelectorProps) => { const fieldTypes = [ { type: FieldType.SIGNATURE, label: 'Signature', icon: null, }, { type: FieldType.INITIALS, label: 'Initials', icon: Contact, }, { type: FieldType.EMAIL, label: 'Email', icon: Mail, }, { type: FieldType.NAME, label: 'Name', icon: User, }, { type: FieldType.DATE, label: 'Date', icon: CalendarDays, }, { type: FieldType.TEXT, label: 'Text', icon: Type, }, { type: FieldType.NUMBER, label: 'Number', icon: Hash, }, { type: FieldType.RADIO, label: 'Radio', icon: Disc, }, { type: FieldType.CHECKBOX, label: 'Checkbox', icon: CheckSquare, }, { type: FieldType.DROPDOWN, label: 'Dropdown', icon: ChevronDown, }, ]; return (