import { zodResolver } from '@hookform/resolvers/zod'; import { ProfileSchema, type Profile } from '../../../content/schemas/profile'; import { FormShell } from '../FormShell'; import { Section } from '../Section'; import { TextField } from '../fields/TextField'; import { TextAreaField } from '../fields/TextAreaField'; import { SelectField } from '../fields/SelectField'; import { ToggleField } from '../fields/ToggleField'; import { ChipsField } from '../fields/ChipsField'; import { ImageUploadField } from '../fields/ImageUploadField'; import { FileUploadField } from '../fields/FileUploadField'; import { ArrayEditor } from '../fields/ArrayEditor'; type Props = { defaultValues: Profile }; export function ProfileForm({ defaultValues }: Props) { return ( section="profile" defaultValues={defaultValues as never} resolver={zodResolver(ProfileSchema) as never} >
''} itemLabel={(i) => `photo #${String(i + 1).padStart(2, '0')}`} > {({ namePrefix }) => ( )} ({ label: '', href: '', variant: 'primary' as const, external: false })} itemLabel={(i) => `cta #${String(i + 1).padStart(2, '0')}`} > {({ namePrefix }) => ( <>
)}
); }