import React from 'react'; import type { InputProps } from '@skbkontur/react-ui/components/Input'; import { Input } from '@skbkontur/react-ui/components/Input'; import type { FiasAPIProvider, FiasFieldsSettings } from '../types.js'; import { FiasFormValidation, FiasDivision } from '../types.js'; import { FiasAddress } from '../models/FiasAddress.js'; import type { FiasProps } from '../Fias.js'; import type { FiasComboBoxProps } from './FiasComboBox.js'; import { FiasComboBox } from './FiasComboBox.js'; interface FiasFormProps { api: FiasAPIProvider; address: FiasAddress; userFieldsSettings: FiasFieldsSettings; search?: boolean; limit?: number; validationLevel?: FiasFormValidation; countrySelector?: boolean; divisionSelector?: boolean; onDivisionChange?: FiasProps['onDivisionChange']; allowArbitraryCountry?: boolean; onAddressChange: () => void; } interface FiasFormState { address: FiasAddress; division: FiasDivision; } interface FieldMeta { ref: C | null; props: P; createRef: (ref: C | null) => any; tooltip: () => React.ReactNode; } type ComboBoxMeta = FieldMeta; type InputMeta = FieldMeta; type FiasFormFieldMeta = ComboBoxMeta | InputMeta; export declare class FiasForm extends React.Component { static __KONTUR_REACT_UI__: string; static displayName: string; static defaultProps: { validationLevel: string; limit: number; fieldsSettings: {}; countrySelector: boolean; }; static Field: ({ "data-tid": dataTid, label, children, }: { "data-tid": string; label?: string; children?: React.ReactNode; }) => JSX.Element; static isComboboxMeta: (meta: FiasFormFieldMeta) => meta is ComboBoxMeta; static isInputMeta: (meta: FiasFormFieldMeta) => meta is InputMeta; state: FiasFormState; private readonly locale; private fields; private lastVerifyPromise; constructor(props: FiasFormProps); get isForeignForm(): boolean; private get fieldsSettings(); private get api(); componentDidMount(): void; componentDidUpdate(prevProps: FiasFormProps, prevState: FiasFormState): void; componentWillUnmount(): void; submit: () => Promise<{ address: FiasAddress; division: FiasDivision; }>; reset: ({ address, division }: { address: FiasAddress; division: FiasDivision; }) => void; render(): JSX.Element; private getCommonFieldProps; private isFieldWithError; private isFieldWithWarning; private renderFields; private renderAddressComboBox; private renderPostalCodeInput; private createAddressComboboxMeta; private createPostalCodeInputMeta; private createAddressComboBoxProps; private createPostalCodeInputProps; private createItemsSource; private getFieldTooltipContent; private createAddressComboBoxTooltip; private createPostalCodeTooltip; private verify; private validate; private shouldValidateUnknownLevel; private handleDivisionChange; private handleCountryChange; private handleForeignAddressChange; private changeAddress; private handleSearchChange; private resetAddressErrors; private hasAddressChanged; } export {};