import { CountryCode } from "libphonenumber-js"; import React from "react"; import { AvailableLocales } from "../../../locale"; export interface CountrySelectProps extends Partial> { /** * Country code value * * Resolves to undefined unless a valid country code is selected * @type {CountryCode | undefined} */ countryCode: CountryCode | undefined; /** * Country code setter * @param {CountryCode | undefined} value * @return {void} */ setCountryCode: (value: CountryCode | undefined) => void; /** * A list of countries to pin to the top of the list * @type {CountryCode[]} * @default [defaultCountry] if pinDefaultCountry is true and defaultCountry is defined, otherwise [] */ pinnedCountries?: CountryCode[]; /** * If the country input/selector should be disabled if the country is Mexico * @type {boolean} * @default false */ pinDefaultCountry?: boolean; /** * Default country to initialize the component with * @type {CountryCode} * @default MX */ defaultCountry?: CountryCode; /** * What locale to use for the component (for country names) * @type {AvailableLocales} * @default en */ locale?: AvailableLocales; /** * If the input is required * @type {boolean} */ isRequired?: boolean; /** * If the country flags should be shown in the list * @type {boolean} * @default true */ showUnicodeFlags?: boolean; /** * If there was an error external to the component, this will show an error message * @type {boolean} */ errorOnCreation?: boolean; /** * Set the external error state * @param {boolean} value * @return {void} */ setErrorOnCreation?: (value: boolean) => void; } export declare const CountrySelect: ({ countryCode, setCountryCode, pinnedCountries, defaultCountry, pinDefaultCountry, locale, isRequired, showUnicodeFlags, errorOnCreation, setErrorOnCreation, ...props }: CountrySelectProps) => JSX.Element; declare const _default: React.MemoExoticComponent<({ countryCode, setCountryCode, pinnedCountries, defaultCountry, pinDefaultCountry, locale, isRequired, showUnicodeFlags, errorOnCreation, setErrorOnCreation, ...props }: CountrySelectProps) => JSX.Element>; export default _default;