import type { FieldValues, Path, DefaultValues, Resolver, UseFormSetError, UseFormWatch, UseFormReset } from 'react-hook-form';
import type { SelectOption } from '../FormSelect/types';
import type { SearchOption, FormSearchSelectProps } from '../FormSearchSelect/types';
import type { TagOption, FormTagSelectProps } from '../FormTagSelect/types';
import type { FormInputProps } from '../FormInput/types';
import { ReactNode } from 'react';
interface BaseFieldConfig<TFieldValues extends FieldValues> {
    name: Path<TFieldValues>;
    label: string;
    required?: boolean;
    placeholder?: string;
    helperText?: string;
    autoFocus?: boolean;
}
export interface InputFieldConfig<TFieldValues extends FieldValues> extends BaseFieldConfig<TFieldValues> {
    type: 'input';
    inputType?: FormInputProps<TFieldValues>['type'];
}
export interface SelectFieldConfig<TFieldValues extends FieldValues> extends BaseFieldConfig<TFieldValues> {
    type: 'select';
    options: SelectOption[];
}
export interface SearchSelectFieldConfig<TFieldValues extends FieldValues> extends BaseFieldConfig<TFieldValues> {
    type: 'search-select';
    options: SearchOption[];
    multiple?: boolean;
    onCreate?: FormSearchSelectProps<TFieldValues>['onCreate'];
    onManage?: FormSearchSelectProps<TFieldValues>['onManage'];
    manageText?: FormSearchSelectProps<TFieldValues>['manageText'];
    manageHelper?: FormSearchSelectProps<TFieldValues>['manageHelper'];
}
export interface TagSelectFieldConfig<TFieldValues extends FieldValues> extends BaseFieldConfig<TFieldValues> {
    type: 'tag-select';
    options: TagOption[];
    onCreate?: FormTagSelectProps<TFieldValues>['onCreate'];
}
export type FormFieldConfig<TFieldValues extends FieldValues> = InputFieldConfig<TFieldValues> | SelectFieldConfig<TFieldValues> | SearchSelectFieldConfig<TFieldValues> | TagSelectFieldConfig<TFieldValues>;
export interface FormDialogProps<TFieldValues extends FieldValues> {
    testId?: string;
    open: boolean;
    onClose: () => void;
    onConfirm: (data: TFieldValues, setError: UseFormSetError<TFieldValues>, reset: UseFormReset<TFieldValues>) => void | Promise<void>;
    disableConfirm?: boolean;
    title: string;
    description?: string;
    fields: FormFieldConfig<TFieldValues>[];
    defaultValues?: DefaultValues<TFieldValues>;
    resolver?: Resolver<TFieldValues>;
    confirmLabel?: string;
    cancelLabel?: string;
    isPending?: boolean;
    /** Content rendered at the left of the footer, opposite the cancel/confirm buttons. */
    footerLeft?: ReactNode;
    footer?: ReactNode | ((methods: {
        watch: UseFormWatch<TFieldValues>;
        reset: UseFormReset<TFieldValues>;
    }) => ReactNode);
}
export {};
