import { PropsWithChildren } from "react";
import { FromOnePercentUtility } from "../type-utils";
type PersistedIdentifier = string;
/** Provides the async process functionality to the application */
export default function AsyncProcessProvider({ children, triggers, persistence, }: PropsWithChildren<{
    /** Functions that will be provided to those that use the async process */
    triggers: {
        [k in keyof FromOnePercentUtility<'AsyncQueue.Processes'>]: (...args: FromOnePercentUtility<'AsyncQueue.Processes'>[k]) => Promise<void>;
    };
    /** This will persist the data required for restoring the async processes when required */
    persistence: {
        write: <K extends keyof FromOnePercentUtility<'AsyncQueue.Processes'>>(k: K, ...args: FromOnePercentUtility<'AsyncQueue.Processes'>[K]) => PersistedIdentifier;
        remove: (id: PersistedIdentifier) => void;
        recover: () => [PersistedIdentifier, Promise<void>][];
    };
}>): import("react/jsx-runtime").JSX.Element;
/** Allows components to use the async process functionality */
export declare function useAsyncProcess(): {
    [k in keyof FromOnePercentUtility<'AsyncQueue.Processes'>]: (...args: FromOnePercentUtility<'AsyncQueue.Processes'>[k]) => Promise<void>;
} & {
    on: (k: keyof FromOnePercentUtility<'AsyncQueue.Processes'>, whatToDo: () => void) => void;
};
export {};
