import { z } from 'zod'
import type { CreateDto } from '~/models/general-consent'

const GeneralConsentSchema = z.object({
  relatives: z.array(z.object({ name: z.string(), phone: z.string() })),
  responsibleName: z.string().optional(),
  responsiblePhone: z.string().optional(),
  informant: z.string().optional(),
  witness1: z.string().optional(),
  witness2: z.string().optional(),
})

type GeneralConsentFormData = z.infer<typeof GeneralConsentSchema> & CreateDto

export { GeneralConsentSchema }
export type { GeneralConsentFormData }
