import { ApolloClient } from '@apollo/client/core';
import { BuilderSubscriptionsMap } from '@plitzi/sdk-shared';
import { ReactNode } from 'react';
export type UseSubscriptionsManagerProps = {
    onMessage?: (message: ReactNode, type?: 'info' | 'success' | 'warning' | 'error' | 'default') => void;
    client: ApolloClient;
    environment?: string;
    disabled?: boolean;
};
type Subscription = {
    closed: boolean;
    unsubscribe(): void;
    name: keyof BuilderSubscriptionsMap;
};
declare const useSubscriptionsManager: ({ onMessage, client, environment, disabled }: UseSubscriptionsManagerProps) => {
    subscribe: <T extends keyof BuilderSubscriptionsMap>(subscriptionKey: T, variables: Record<string, unknown>, callback: (result: ApolloClient.SubscribeResult<BuilderSubscriptionsMap[T]>) => void) => false | import('@apollo/client').SubscriptionObservable<ApolloClient.SubscribeResult<BuilderSubscriptionsMap[T]>> | null;
    unsubscribe: (subscriptionKey: keyof BuilderSubscriptionsMap | (keyof BuilderSubscriptionsMap)[]) => void;
    stop: () => void;
    subscriptions: import('react').RefObject<Subscription[]>;
};
export default useSubscriptionsManager;
