import { ReactNode } from 'react'; import { UiCoreLocale } from '../../../helpers/uiCoreLocale'; export declare const WAIT_UNTIL_SAVED: { readonly en: "Wait until saved"; readonly no: "Vent til lagringen er ferdig"; }; interface DialogBusyContextValue { busy: boolean; busyReason?: ReactNode; /** Marks the dialog busy; the returned function ends that mark. */ registerBusy: () => () => void; } export declare const DialogBusyContext: import('react').Context; /** * A dialog (or popover) is busy while one of its buttons runs an action (`StyledButton loading`, unless * the button passes `holdsDialog={false}`). * Closing it then would hide a request that is still running, so every dismissal (Esc, backdrop click, * the X button) is ignored until the action ends (submit-buttons SUB-4/SUB-8: Cancel waits for the result). * Provide `contextValue` with `DialogBusyContext.Provider` around the dialog content. */ export declare const useDialogBusyBoundary: (busyReason?: ReactNode, locale?: UiCoreLocale) => { busy: boolean; busyReason: ReactNode; contextValue: DialogBusyContextValue; }; /** Reports `busy` to the closest dialog, if any. Safe outside a dialog. */ export declare const useReportDialogBusy: (busy: boolean) => void; export {};