import z from 'zod';
import { AddressSchema } from './address.schema';
import { CommunicationDetailsSchema } from './communication-details.schema';
import { EntityReferenceSchema } from './entity-reference.schema';
import { GenderSchema } from './gender.schema';
import { OrganisationSchema } from './organisation.schema';

export const AddresseeWithReferenceSchema = EntityReferenceSchema.extend({
  address: AddressSchema.describe('Address').optional(),
  communicationDetails: CommunicationDetailsSchema.describe(
    'Communication details',
  ).optional(),
  firstName: z.string().describe('First name').optional(),
  lastName: z.string().describe('Last name').optional(),
  gender: GenderSchema.describe('Gender').optional(),
  locale: z.string().describe('Locale').optional(),
  organisation: OrganisationSchema.describe(
    'Organisation information',
  ).optional(),
  title: z.string().describe('Title').optional(),
});
