import { zodResolver } from '@hookform/resolvers/zod'; import { InterestsSchema, type Interests } from '../../../content/schemas/interests'; import { FormShell } from '../FormShell'; import { Section } from '../Section'; import { TextField } from '../fields/TextField'; import { SelectField } from '../fields/SelectField'; import { EmojiField } from '../fields/EmojiField'; import { ArrayEditor } from '../fields/ArrayEditor'; type Props = { defaultValues: Interests }; const COLOR_OPTIONS = [ { value: 'cyan', label: '◉ cyan' }, { value: 'magenta', label: '◉ magenta' }, { value: 'violet', label: '◉ violet' }, { value: 'ice', label: '◉ ice' }, ]; export function InterestsForm({ defaultValues }: Props) { return ( section="interests" defaultValues={defaultValues as never} resolver={zodResolver(InterestsSchema) as never} >
({ id: '', label: '', icon: '🎧', color: 'cyan' as const }) as never } itemLabel={(i) => `pad #${String(i + 1).padStart(2, '0')}`} > {({ namePrefix }) => ( <>
)}
); }