import { FormTypes, SubmissionTypes } from '@oneblink/types'; import { FormElement } from '@oneblink/types/typescript/forms'; import * as React from 'react'; import { FormElementsConditionallyShown } from '../types/form'; export type FormSubmissionModelContextValue = { /** * Must not be mutated in place, the same object is cached and shared between * every provider and consumer rendered with the same submission. */ formSubmissionModel: SubmissionTypes.S3SubmissionData['submission']; parent?: FormSubmissionModelContextValue; elements: FormElement[]; }; type LocalFormSubmissionModelContextValue = Omit; export declare function FormSubmissionModelContextProvider({ children, model, elements, formElementsConditionallyShown, }: { model: SubmissionTypes.S3SubmissionData['submission']; elements: FormTypes.FormElement[]; formElementsConditionallyShown: FormElementsConditionallyShown | undefined; children: React.ReactNode; }): import("react/jsx-runtime").JSX.Element; /** * The cleaned submission model and elements for the closest * `FormSubmissionModelContextProvider`, without access to parent models. */ export default function useFormSubmissionModel(): LocalFormSubmissionModelContextValue; /** * The same as `useFormSubmissionModel()`, but also includes the parent models. * Pass `includeParent: false` to avoid re-rendering when values outside of the * closest `FormSubmissionModelContextProvider` change. */ export declare function useFormSubmissionModelWithParent(includeParent: boolean): LocalFormSubmissionModelContextValue & { parent?: FormSubmissionModelContextValue; }; export declare function useFormSubmissionModelParent(): FormSubmissionModelContextValue; export {};