import { ReactNode } from 'react';
import { InputProps, SelectProps, FormControlProps, FormLabelProps, WithCSSVar } from '@chakra-ui/react';
import { TokenSchemeType, TokenexLinkType } from './tokenex';
import { BillingFieldKeyType, ContactFieldKeyType, FormConfigType } from './form';
import type { LabelsType } from './i81n';
import type { Dict } from '@chakra-ui/utils';
type CommonComponentProps = {
    validateOnChange?: boolean;
    validateOnBlur?: boolean;
    onLoadStart?: () => void;
    onLoadEnd?: () => void;
    onAuthExpired?: () => void;
};
type UIControlProps = CommonComponentProps & FormControlProps & FormLabelProps & {
    label?: ReactNode;
    helper?: ReactNode;
    error?: string | boolean;
    rules?: Record<string, any>;
    name: string;
    id: string;
    isDisabled?: boolean;
    isRequired?: boolean;
    onChangeHandler?: (args?: any) => void;
    onFocusHandler?: (args?: any) => void;
    onBlurHandler?: (args?: any) => void;
    onValidate?: (args?: any) => void;
    onTokenize?: (args?: any) => void;
    onErrorHandler?: (args?: any) => void;
};
export type InputControlProps = InputProps & UIControlProps & {
    mask?: string;
};
export type SelectControlProps = SelectProps & UIControlProps & {
    list?: {
        name: string;
        value: string;
    }[];
};
export type CardInputControlProps = InputControlProps & {
    icon?: 'left' | 'right';
    theme?: Record<string, any>;
};
export type TokenexIFrameControlProps = UIControlProps & {
    scheme: TokenSchemeType;
};
export type PaymentCardFormProps = CommonComponentProps & {
    mode: TokenexLinkType;
    lang: string;
    labels?: Record<string, Partial<LabelsType>>;
    canEditGuest?: boolean;
    defaultValues?: Partial<Record<BillingFieldKeyType | ContactFieldKeyType, any>>;
    onSubmitHandler: (formData: any) => void;
    onChangeHandler?: (data: any) => void;
    onErrorHandler?: (errors: any) => void;
    onValidateHandler?: (formData: any) => void;
    onTokenizeHandler?: (formData: any) => void;
};
export type TokenFormTheme = Partial<WithCSSVar<Dict>>;
export type TokenFormFieldConfig = Partial<FormConfigType>;
export type TokenFormProps = Omit<PaymentCardFormProps, 'onSubmitHandler' | 'onChangeHandler' | 'onErrorHandler' | 'onValidateHandler' | 'onTokenizeHandler'> & {
    apiToken?: string;
    env: 'local' | 'dev' | 'stage' | 'prod' | 'prod-us2';
    theme?: TokenFormTheme;
    fields?: TokenFormFieldConfig;
    onSubmit?: (data: any) => void;
    onChange?: (data: any) => void;
    onError?: (data: any) => void;
    onValidate?: (data: any) => void;
    onTokenize?: (data: any) => void;
};
export {};
