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

export const DisplayBranchSchema = z
  .object({
    name: z.string().describe('Name').optional(),
    key: z.string().describe('Key').optional(),
    branchNumber: z.string().describe('Branch number').optional(),
    address: AddressSchema.describe('Address').optional(),
    communicationDetails: CommunicationDetailsSchema.describe('Communication details').optional(),
    web: z.string().describe('Web').optional(),
  })
  .extend(EntitySchema.shape);

export type DisplayBranch = z.infer<typeof DisplayBranchSchema>;
