import { default as React } from 'react'; import { FormRowProps } from '../../FormRow/FormRow'; import { FormRowHelperTextOwnProps } from '../../FormRow/FormRowHelperText'; import { PhoneInputProps } from '../../Inputs/PhoneInput/PhoneInput'; import { HTMLInputProps } from '../../Inputs/types'; import { LabelAfterProps } from '../../LabelAfter/LabelAfter'; interface PhoneFieldContainerProps extends Omit { } interface PhoneFieldHelperTextProps extends Partial { } interface PhoneFieldInputProps extends Omit { } export interface PhoneFieldOwnProps { preferredCountries?: number[]; value: InputPhoneValueType; onChange: (value: OutputPhoneValueType) => void; onBlur?: (value: OutputPhoneValueType) => void; maxLength?: HTMLInputProps['maxLength']; minLength?: HTMLInputProps['minLength']; } /** @inheritdoc */ export interface PhoneFieldProps extends PhoneFieldContainerProps, PhoneFieldHelperTextProps, PhoneFieldInputProps, PhoneFieldOwnProps { /** * Display loading indicator. */ loading?: boolean; /** * Label displayed after the input element. */ labelAfter?: LabelAfterProps['label']; } type InputPhoneValueType = { value: string; countryCode: string; }; export type OutputPhoneValueType = InputPhoneValueType & { phoneCode: string; }; interface CountryOption { id: number; name: { [lang: string]: string; }; dialCode: string; emoji: string; code: string; } export interface Countries { [countryCode: string]: CountryOption; } export declare const PhoneField: React.ForwardRefExoticComponent>; export {};