import {
  AddressSchema,
  CommunicationDetailsSchema,
  ExternalReferenceSchema,
  GenderSchema,
  OrganisationSchema,
} from '@isa/common/data-access';
import { z } from 'zod';

export const DisplayAddresseeSchema = z.object({
  number: z.string().describe('Number').optional(),
  locale: z.string().describe('Locale').optional(),
  gender: GenderSchema.describe('Gender'),
  title: z.string().describe('Title').optional(),
  firstName: z.string().describe('First name').optional(),
  lastName: z.string().describe('Last name').optional(),
  organisation: OrganisationSchema.describe('Organisation information').optional(),
  address: AddressSchema.describe('Address').optional(),
  communicationDetails: CommunicationDetailsSchema.describe('Communication details').optional(),
  externalReference: ExternalReferenceSchema.describe('External system reference').optional(),
});

export type DisplayAddressee = z.infer<typeof DisplayAddresseeSchema>;
