import type { Location } from "history";
import type { InjectedRouter, Route } from "react-router";
interface UseConfirmLeaveModalInput {
    router: InjectedRouter;
    route: Route;
    isEnabled: boolean;
    isLocationAllowed?: (location: Location | undefined) => boolean;
}
interface UseConfirmLeaveModalResult {
    opened: boolean;
    close: () => void;
    confirm: () => void;
    nextLocation: Location | undefined;
}
/**
 * If there is no "location" then it's beforeunload event, which is
 * handled by useBeforeUnload hook - no reason to duplicate its work.
 */
export declare const IS_LOCATION_ALLOWED: (location?: Location) => boolean;
/**
 * Provides props for using a Modal that is presented to users
 * whenever they try to leave a route
 */
export declare const useConfirmRouteLeaveModal: ({ router, route, isEnabled, isLocationAllowed, }: UseConfirmLeaveModalInput) => UseConfirmLeaveModalResult;
export {};
