import { DuffelCardFormStrings } from '../../../index'; export function getPostcodeLabelFn( customStrings: Pick< DuffelCardFormStrings, 'zipCodeLabel' | 'postcodeLabel' | 'postalCodeLabel' > ) { return (countryCode: string): string => { switch (countryCode) { case 'US': return customStrings.zipCodeLabel; case 'GB': return customStrings.postcodeLabel; case 'CA': default: return customStrings.postalCodeLabel; } }; }