import React, { ReactElement } from "react";
import { QueryParams } from "../navigation/Routes";
import { AuthSession, OpenIDConnectAuthSession } from "../authSessions/AuthSessionApi";
import ApolloClient from "apollo-client";
import { NormalizedCacheObject } from "apollo-cache-inmemory";
import { UserContext } from "@kie-tools/runtime-tools-components/dist/contexts/KogitoAppContext";
export type RuntimePathSearchParams = Partial<Record<QueryParams, string>>;
export declare enum RuntimePathSearchParamsRoutes {
    PROCESSES = "processes",
    PROCESS_DEFINITIONS = "processDefinitions",
    JOBS = "jobs",
    TASKS = "tasks",
    TASK_DETAILS = "taskDetails"
}
export type RuntimeContextType = {
    apolloClient?: ApolloClient<NormalizedCacheObject>;
    userContext?: UserContext;
    runtimeUrl?: string;
    username?: string;
    isRefreshingToken: boolean;
    runtimePathSearchParams: Map<string, RuntimePathSearchParams>;
    impersonationUsername?: string;
    impersonationGroups?: string;
};
export declare const RuntimeContext: React.Context<RuntimeContextType>;
export type RuntimeDispatchContextType = {
    refreshToken: (authSession: OpenIDConnectAuthSession) => Promise<OpenIDConnectAuthSession | undefined>;
    setRuntimePathSearchParams: React.Dispatch<React.SetStateAction<Map<RuntimePathSearchParamsRoutes, RuntimePathSearchParams>>>;
    setImpersonationUsername: React.Dispatch<React.SetStateAction<string | undefined>>;
    setImpersonationGroups: React.Dispatch<React.SetStateAction<string | undefined>>;
};
export declare const RuntimeDispatchContext: React.Context<RuntimeDispatchContextType>;
export declare function useRuntime(): RuntimeContextType;
export declare function useRuntimeDispatch(): RuntimeDispatchContextType;
export interface RuntimeContextProviderProps {
    children: ReactElement;
    runtimeUrl?: string;
    fullPath?: string;
}
export declare const RuntimeContextProvider: React.FC<RuntimeContextProviderProps>;
export declare function useRuntimeApolloClient(): ApolloClient<NormalizedCacheObject> | undefined;
export declare function useRuntimeUser(): UserContext | undefined;
export declare function useRuntimeInfo(): {
    runtimeUrl: string | undefined;
    username: string | undefined;
    accessToken: string | undefined;
    runtimeDisplayInfo: {
        shortDisplayName: string;
        fullDisplayName: string;
        userFriendlyName: string;
        type: string;
        username: string;
    } | undefined;
    isRefreshingToken: boolean;
    canImpersonate: boolean;
};
export declare function useRuntimeSpecificRoutes(): {
    processes: (authSession?: AuthSession) => {
        pathname: string;
        search: string;
    };
    processDetails: (processInstanceId: string, authSession?: AuthSession) => {
        pathname: string;
        search: string;
    };
    processDefinitions: (authSession?: AuthSession) => {
        pathname: string;
        search: string;
    };
    processDefinitionForm: (processName: string, authSession?: AuthSession) => {
        pathname: string;
        search: string;
    };
    jobs: (authSession?: AuthSession) => {
        pathname: string;
        search: string;
    };
    tasks: (authSession?: AuthSession) => {
        pathname: string;
        search: string;
    };
    taskDetails: (taskId: string, authSession?: AuthSession) => {
        pathname: string;
        search: string;
    };
};
//# sourceMappingURL=RuntimeContext.d.ts.map