import { AnswerByField, FormField } from "./FormField/FormField.types";
export type BaseQuestion = {
    id: string;
    type: FormField["type"];
};
export type FormState<Q extends BaseQuestion[] = []> = [
    answers: AnswersMap<Q>,
    isValid: boolean
];
export declare enum DataStatus {
    /** Form is empty */
    PENDING = 0,
    /** Form is partially filled */
    INCOMPLETE = 1,
    /** Form is completed */
    COMPLETE = 2,
    /** Form has error */
    ERROR = 3
}
export declare enum StepStatus {
    /** When the data is empty and needs to be filled */
    INCOMPLETE = 0,
    /** When data has already been filled */
    COMPLETED = 1,
    /** When the step is the current selected */
    CURRENT = 2,
    /** When the step has error */
    ERROR = 3
}
export declare enum FormStep {
    PERSONAL_DATA = 0,
    ADDITIONAL_DATA = 1,
    DOCUMENTS = 2,
    INVEST_PROFILE = 3,
    CONTRACTS = 4
}
export declare enum FormMode {
    READ_ONLY = 0,
    WRITE = 1
}
export type FormFieldView = FormField & {
    title: string;
};
export type FormProps = {
    onFormSubmitted: () => void;
    savedAnswers: Partial<{
        [questionId: string]: AnswerByField<FormField>;
    }>;
    startAt: FormStep;
    onGoBack: () => void;
};
export type StepFormProps = Pick<FormProps, "savedAnswers"> & {
    step: FormStep;
} & ModeProps;
export type ModeProps = {
    mode: FormMode.READ_ONLY;
} | {
    mode: FormMode.WRITE;
    onFinish: () => void;
    onCancel: () => void;
};
export type FormViewProps<Q extends BaseQuestion[]> = {
    questions: Q;
    "data-testid"?: (id: Q[number]["id"]) => string;
} & ({
    mode?: FormMode.WRITE;
    initialAnswers?: AnswersMap<Q>;
    onFormUpdate: (answers: AnswersMap<Q>, isValid: boolean) => void;
    /** When provided (true) show all current errors that are blocking the completion of the form */
    showAllErrors?: boolean;
} | {
    initialAnswers: AnswersMap<Q>;
    mode: FormMode.READ_ONLY;
});
export type AnswersMap<Q extends Readonly<BaseQuestion[]> = [
    {
        type: BaseQuestion["type"];
        id: string;
    }
]> = Partial<{
    [questionId in Q[number]["id"]]: AnswerByField<Q[number] & {
        id: questionId;
    }>;
}>;
export declare enum INVESTOR_PROFILE {
    /**
     * User can only spend up to 20k
     */
    RESTRICTED = 0,
    /**
     * User can only spend up to 10% of it's income
     */
    LIMITED = 1,
    /**
     * User doesn't have restrictions
     */
    UNLIMITED = 2
}
