import React, { ComponentProps } from "react";
import { BaseQuestion, FormViewProps } from "./Form.types";
import { AnswerByField, FormFieldView } from "./FormField/FormField.types";
export type FormRef<Q extends FormFieldView[]> = {
    setAnswer<I extends Q[number]["id"]>(questionId: I, ans: AnswerByField<Q[number] & {
        id: I;
    }>): void;
};
declare const forwardedRef: React.ForwardRefExoticComponent<FormViewProps<FormFieldView[]> & React.RefAttributes<FormRef<FormFieldView[]>>>;
/**
 * A new and improved version of the one-ui design form
 *
 * Custom question types can be defined via @type {OnepercentUtility['UIElements']['FormExtension']['fields']}
 *
 * This component displays a form with multiple questions and allows users
 * to enter answers to those questions. It handles validation, different
 * display modes, and manages the form's state.
 **/
declare const _default: <Q extends BaseQuestion[]>(p: FormViewProps<Q> & Pick<ComponentProps<typeof forwardedRef>, "ref">) => React.ReactElement;
export default _default;
export declare const ControlledForm: React.ForwardRefExoticComponent<(FormViewProps<FormFieldView[]> & {
    answers: {
        answers: Partial<{
            [x: string]: unknown;
        }>;
        setAnswers: React.Dispatch<React.SetStateAction<Partial<{
            [x: string]: unknown;
        }>>>;
    };
}) & React.RefAttributes<FormRef<FormFieldView[]>>>;
