import type { JsMsg, Msg, NatsSubscribeOptions } from './nats';
export interface UseNatsSubscriptionOptions extends NatsSubscribeOptions {
    enabled?: boolean;
}
export interface UseNatsSubscriptionReturn {
    isSubscribed: boolean;
    isReady: boolean;
}
/**
 * Subscribe to a NATS subject using the shared connection from <NatsProvider>.
 * Automatically (re)subscribes when the connection becomes ready, when the
 * subject changes, and after reconnections.
 */
export declare function useNatsSubscription(subject: string | null, onMessage: (msg: Msg) => void | Promise<void>, options?: UseNatsSubscriptionOptions): UseNatsSubscriptionReturn;
export type UseNatsJsonSubscriptionOptions = UseNatsSubscriptionOptions;
export declare function useNatsJsonSubscription<T = unknown>(subject: string | null, onPayload: (payload: T, msg: Msg) => void | Promise<void>, options?: UseNatsJsonSubscriptionOptions): UseNatsSubscriptionReturn;
export type NatsJsMsg = JsMsg;
//# sourceMappingURL=use-nats-subscription.d.ts.map