alexbednov-phone-select
Version:
Vue 3 component for phone number selection with international support and masking.
51 lines (50 loc) • 1.46 kB
TypeScript
import type { Language, CountryType } from '@/interfaces';
export type Country = CountryType;
export declare const useCountries: (lang?: Language) => {
getCountries: import("vue").ComputedRef<({
name: string;
country_code: string;
phone_code: number;
phone_ranges?: undefined;
} | {
name: string;
country_code: string;
phone_code: number;
phone_ranges: number[];
})[]>;
getCountryByCode: (code: string) => {
name: string;
country_code: string;
phone_code: number;
phone_ranges?: undefined;
} | {
name: string;
country_code: string;
phone_code: number;
phone_ranges: number[];
} | undefined;
getCountryByName: (name: string) => {
name: string;
country_code: string;
phone_code: number;
phone_ranges?: undefined;
} | {
name: string;
country_code: string;
phone_code: number;
phone_ranges: number[];
} | undefined;
getCountryByPhoneCode: (phoneCode: number) => {
name: string;
country_code: string;
phone_code: number;
phone_ranges?: undefined;
} | {
name: string;
country_code: string;
phone_code: number;
phone_ranges: number[];
} | undefined;
getFlagPath: (countryCode: string) => string;
getAllCountryNames: (countryCode: string) => string[];
};