import React, { JSX, PureComponent } from "react"; import { StyleProp, TextStyle, ViewStyle } from "react-native"; export interface Country { code: string; name: string; callingCode: string; } export interface PhoneInputTheme { containerBackground?: string; inputBackground?: string; modalBackground?: string; modalOverlay?: string; labelTextColor?: string; inputTextColor?: string; placeholderTextColor?: string; codeTextColor?: string; dropdownTextColor?: string; inputBorderColor?: string; modalBorderColor?: string; selectionColor?: string; flagBorderRadius?: number; flagSize?: number; flagShape?: 'round' | 'square'; dropdownArrowColor?: string; dropdownArrowOpacity?: number; } export interface PhoneInputProps { defaultCode?: string; value?: string; defaultValue?: string; disabled?: boolean; withShadow?: boolean; withDarkTheme?: boolean; autoFocus?: boolean; placeholder?: string; disableArrowIcon?: boolean; layout?: "first" | "second" | "third"; showSearch?: boolean; searchPlaceholder?: string; codeLabel?: string; phoneNumberLabel?: string; onChangeCountry?: (country: Country) => void; onChangeText?: (text: string) => void; onChangeFormattedText?: (text: string) => void; containerStyle?: StyleProp; textContainerStyle?: StyleProp; textInputStyle?: StyleProp; codeTextStyle?: StyleProp; textInputProps?: any; theme?: PhoneInputTheme; renderFlag?: (country: Country) => React.ReactNode; renderInput?: (props: { value: string; onChangeText: (text: string) => void; placeholder?: string; disabled?: boolean; style?: StyleProp; }) => React.ReactNode; renderCountryItem?: (country: Country, onSelect: (country: Country) => void) => React.ReactNode; renderDropdownIcon?: () => React.ReactNode; renderCountryModal?: (props: { visible: boolean; onClose: () => void; onSelectCountry: (country: Country) => void; countries: Country[]; searchText: string; onSearchChange: (text: string) => void; }) => React.ReactNode; } export interface PhoneInputState { code: string; number: string; modalVisible: boolean; countryCode: string; disabled: boolean; searchText: string; } export default class PhoneInput extends PureComponent { constructor(props: PhoneInputProps); getCallingCode: (countryCode: string) => string; getCountryCode: () => string; getCurrentCallingCode: () => string; isValidNumber: (number: string) => boolean; onSelectCountry: (country: Country) => void; onChangeText: (text: string) => void; getNumberAfterPossiblyEliminatingZero: () => { number: string; formattedNumber: string; }; renderDropdownImage: () => JSX.Element; renderCountryItem: ({ item }: { item: Country; }) => JSX.Element; render(): JSX.Element; } export declare const isValidNumber: (number: string, countryCode: string) => boolean;