import { FormControl } from '@angular/forms'; import { Color } from '@ionic/core'; import { ComponentState } from '../../types'; /** * Country code option for phone input. */ export interface CountryCode { /** ISO country code (e.g., 'US', 'MX', 'ES') */ code: string; /** Country name */ name: string; /** Dial code (e.g., '+1', '+52', '+34') */ dialCode: string; /** Flag emoji (optional) */ flag?: string; /** Phone number format pattern (optional) */ format?: string; } /** * Common country codes for quick access. */ export declare const COMMON_COUNTRY_CODES: CountryCode[]; /** * Metadata for the phone input component. */ export interface PhoneInputMetadata { /** Form control for the complete phone number (with country code) */ control: FormControl; /** Separate control for just the number (without country code) */ numberControl?: FormControl; /** Separate control for country code selection */ countryControl?: FormControl; /** Unique token for the input */ token?: string; /** Display label */ label?: string; /** Field name */ name?: string; /** Help text */ hint?: string; /** Input placeholder for phone number */ placeholder?: string; /** Field state */ state?: ComponentState; /** Available country codes */ countryCodes?: CountryCode[]; /** Default country code (ISO code, e.g., 'MX') */ defaultCountry?: string; /** Show country selector */ showCountrySelector?: boolean; /** Show country flag */ showFlag?: boolean; /** Allow searching countries */ searchableCountries?: boolean; /** Preferred countries to show at top */ preferredCountries?: string[]; /** Validate phone format */ validateFormat?: boolean; /** Custom validation pattern */ pattern?: string; /** Minimum digits */ minDigits?: number; /** Maximum digits */ maxDigits?: number; /** Component color */ color?: Color; /** Fill style */ fill?: 'outline' | 'solid'; /** Label placement */ labelPlacement?: 'fixed' | 'floating' | 'stacked' | 'start' | 'end'; /** Custom CSS class */ cssClass?: string; /** Content key for reactive label */ labelContentKey?: string; /** Content key for reactive placeholder */ placeholderContentKey?: string; /** Content key for reactive hint */ hintContentKey?: string; /** Component class name for content lookup */ contentClass?: string; /** Custom error messages */ errors?: Record; /** Show validation errors */ showErrors?: boolean; } /** * Event emitted when phone input changes. */ export interface PhoneInputChangeEvent { /** Complete phone number with country code */ fullNumber: string; /** Phone number without country code */ number: string; /** Selected country */ country: CountryCode | null; /** Whether the number is valid */ isValid: boolean; }