import * as React from 'react'; export declare function useMarkFormDirty(): () => void; export declare function FormMarkDirtyContextProvider({ markDirty, children, }: { markDirty: () => void; children: React.ReactNode; }): import("react/jsx-runtime").JSX.Element; /** * Optional context that lets a host (for example Approvals) read whether a * rendered form has unsaved user edits. Derived writes (`isDerivedChange`) do * not set this. * * Wrap both the form and the host action so they share one registry. Each form * registers under its `formId`, so multiple forms under the same provider (for * example an approval form in a dialog) keep independent flags. If nothing is * registered for a form, {@link useFormIsDirty} is `false`. * * @param props * @returns * @group Components */ export declare function FormIsDirtyContextProvider({ children, }: { children: React.ReactNode; }): import("react/jsx-runtime").JSX.Element; /** * Whether the form with `formId` has unsaved user edits. Safe to call without a * provider: returns `false`. * * @param formId * The id of the form whose dirty flag to read. * @returns * @group Hooks */ export declare function useFormIsDirty(formId: number): boolean; /** * Returns a callback that stops the form with `formId` prompting about unsaved * changes when the host navigates away. Call it after the host action that * discarded or persisted those edits has completed, immediately before * navigating. Safe to call without a provider or for a form that is not * rendered: nothing happens. * * @param formId * The id of the form whose unsaved changes prompt to stop. * @returns * @group Hooks */ export declare function useAllowFormNavigation(formId: number): () => void; /** * Registers this form’s unsaved-changes flag with the nearest * {@link FormIsDirtyContextProvider}. Used internally by `OneBlinkFormBase`. */ export declare function useRegisterFormIsDirty(formId: number, isDirty: boolean): void; /** * Registers the callback {@link useAllowFormNavigation} calls for this form. * Used internally by `OneBlinkFormBase`. */ export declare function useRegisterAllowFormNavigation(formId: number, allowNavigation: () => void): void;