/// <reference types="react" />
import { CardFields, ContactFields, BillingFields } from '../constants';
import { TokenSchemeType, TokenexInitConfigType } from './tokenex';
export type FieldConfigType = {
    required: boolean;
    label?: string;
};
export type GenericFieldKeyType<T extends readonly string[]> = T[number];
export type CardFieldKeyType = GenericFieldKeyType<typeof CardFields>;
export type ContactFieldKeyType = GenericFieldKeyType<typeof ContactFields>;
export type BillingFieldKeyType = GenericFieldKeyType<typeof BillingFields>;
export type GenericConfigurationType<T extends string> = {
    [key in T]?: FieldConfigType;
};
export type CardConfigurationType = GenericConfigurationType<CardFieldKeyType>;
export type ContactConfigurationType = GenericConfigurationType<ContactFieldKeyType>;
export type BillingConfigurationType = GenericConfigurationType<BillingFieldKeyType>;
export type FormConfigType = {
    cardFields: CardConfigurationType;
    contactFields: ContactConfigurationType;
    billingFields: BillingConfigurationType;
};
export type ListOptionsType = {
    name: string;
    value: string;
};
export type UIFieldConfigType = {
    name: string;
    label: string;
    component?: React.FC<any>;
    id?: string;
    defaultValue?: string | number | boolean;
    list?: ListOptionsType[];
    required?: boolean;
    className?: string;
    scheme?: TokenSchemeType;
};
export type GenericUIConfigurationType<T extends string> = {
    meta?: {
        label?: string;
    };
    fields: {
        [key in T]?: UIFieldConfigType;
    };
};
export type FormFieldMapType = {
    cardFields: GenericUIConfigurationType<CardFieldKeyType>;
    contactFields: GenericUIConfigurationType<ContactFieldKeyType>;
    billingFields: GenericUIConfigurationType<BillingFieldKeyType>;
};
export type FormContextType = {
    formConfig: Partial<FormConfigType>;
    tokenexConfig: {
        card: TokenexInitConfigType;
        cvv?: TokenexInitConfigType;
    };
};
export type RenderComponentProps = {
    field?: UIFieldConfigType;
    config?: FieldConfigType;
    isDisabled?: boolean;
};
