import { AddresseeWithReferenceSchema } from '@isa/common/data-access';
import { z } from 'zod';
import { PayerStatusSchema } from './payer-status.schema';
import { PayerTypeSchema } from './payer-type.schema';

export const PayerSchema = z
  .object({
    payerNumber: z.string().describe('Unique payer account number').optional(),
    payerType: PayerTypeSchema.describe('Payer type').optional(),
    payerStatus: PayerStatusSchema.describe('Current status of the payer account').optional(),
  })
  .extend(AddresseeWithReferenceSchema.shape);

export type Payer = z.infer<typeof PayerSchema>;
