/**
 * FormValidation (https://formvalidation.io)
 * The best validation library for JavaScript
 * (c) 2013 - 2023 Nguyen Huu Phuoc <me@phuoc.ng>
 */

import {
    type Localization,
    type ValidateFunctionInterface,
    type ValidateOptions,
    type ValidateResult,
} from '@form-validation/core';

export interface ZipCodeOptions extends ValidateOptions {
    // The ISO 3166-1 country code. It can be
    // - A country code
    // - A callback function that returns the country code
    country: string | (() => string);
}
export interface ZipCodeLocalization extends Localization {
    zipCode: {
        countries: {
            [countryCode: string]: string;
        };
        country: string;
        default: string;
    };
}

export function zipCode(): ValidateFunctionInterface<ZipCodeOptions, ValidateResult>;
