import { NavigationActionType } from 'node_modules/@resourge/history-store/dist/index.js'; import { Blocker, BlockerResult } from '../useBlocker/useBlockerTypes'; export type UsePromptProps = { message?: ((currentUrl: URL, nextUrl: URL, action: NavigationActionType) => string) | string; /** * When true blocks url change */ when: Blocker | boolean; }; /** * @param when When `true` it will prompt the user * before navigating away from a screen. * (accepts method that return's boolean). * @param message When set, will prompt the user with native `confirm` and message. * When `undefined` will wait for `continueNavigation or finishBlocking` method to be called * @returns promptResult {BlockerResult} */ export declare const usePrompt: ({ message, when }: UsePromptProps) => BlockerResult;