import { ReactNode, FC } from 'react';
import { Style } from 'inlines';
type onChange = (changes: {
    [field: string]: any;
}) => void | Promise<void>;
export type FormItemProps<T = any> = {
    label?: ReactNode;
    props?: {
        [key: string]: string;
    };
    value?: T;
    type?: 'number' | 'text' | 'range' | 'checkbox' | 'file' | 'color' | 'password' | 'textarea' | FC | 'string' | 'array' | 'object' | 'record' | 'set' | 'boolean' | 'number' | 'json' | 'integer' | 'timestamp' | 'reference' | 'references' | 'text' | 'cardinality' | 'id' | 'url' | 'int' | 'type';
    description?: ReactNode;
    field: string;
    options?: any[];
    default?: T;
    validation?: (value: T) => boolean | string;
    multiple?: boolean;
    addMultipleLabel?: string;
    items?: {
        type: FormItemProps['type'];
        values: FormItemProps['items'];
    };
    properties?: any;
    meta?: any;
};
export type FormGroupValues = {
    [field: string]: any;
};
export type FormGroupProps = {
    confirmationLabel?: ReactNode;
    confirmationVariant?: 'buttons' | 'icons' | 'modal';
    style?: Style;
    fieldWidth?: number;
    labelWidth?: number;
    autoFocus?: boolean;
    variant?: 'column' | 'grid';
    onChange: onChange;
    values?: FormGroupValues;
    config?: FormItemProps[] | {
        [field: string]: null | ReactNode | (Omit<FormItemProps, 'field'> & {
            field?: string;
        });
    };
    alwaysAccept?: boolean;
};
export type ValuesChanged = {
    [field: string]: any;
};
export type OnChangeField = (field: string, value: any) => void;
export type FormGroupVariantProps = {
    confirmationLabel?: ReactNode;
    confirmationVariant?: 'buttons' | 'icons' | 'modal' | 'none';
    onChange: onChange;
    parsedData: FormItemProps[];
    fieldWidth: number;
    labelWidth: number;
    onChangeField: OnChangeField;
    style: Style;
    hasChanges: boolean;
    valuesChanged: ValuesChanged;
    values: FormGroupValues;
    alwaysAccept: boolean;
    setChanges: (val: boolean) => any;
    autoFocus: boolean;
    field?: string;
};
export type LabelProps = {
    label?: ReactNode;
    description?: ReactNode;
    children?: ReactNode;
    labelWidth?: number;
    style?: Style;
};
export type ObjectItemProps = {
    d: string;
    field: string;
    autoFocus?: boolean;
    onChange: onChange;
    labelWidth: number;
    fieldWidth: number;
    onChangeField: OnChangeField;
    hasChanges: boolean;
    valuesChanged: ValuesChanged;
    values: FormGroupValues;
    setChanges: (val: boolean) => any;
    alwaysAccept?: boolean;
    style: Style;
    parsedObjArray: FormItemProps[];
};
export {};
