import type { LTEvent, LTEventAdapter } from '../../types';
/**
 * NATS event adapter — publish AND subscribe.
 *
 * Publishes LTEvent payloads as JSON to NATS subjects
 * following the pattern: `{subjectPrefix}.{event.type}`
 *
 * When a CallbackEventAdapter is bridged via `setCallbackBridge()`,
 * this adapter also subscribes to `{subjectPrefix}.>` and forwards
 * events from other containers to the local callback adapter.
 * An `_originId` field prevents the publishing container from
 * re-dispatching its own events.
 *
 * Usage:
 * ```typescript
 * import { eventRegistry, NatsEventAdapter } from '@hotmeshio/long-tail';
 *
 * eventRegistry.register(new NatsEventAdapter());
 * await eventRegistry.connect();
 * ```
 */
export declare class NatsEventAdapter implements LTEventAdapter {
    private nc;
    private sub;
    private url;
    private subjectPrefix;
    private token?;
    private originId;
    private callbackAdapter;
    constructor(options?: {
        url?: string;
        subjectPrefix?: string;
        token?: string;
    });
    /**
     * Bridge NATS → local callback adapter for cross-container dispatch.
     * Part of the LTEventAdapter contract. Call before `connect()`.
     */
    setCallbackBridge(adapter: LTEventAdapter): void;
    connect(): Promise<void>;
    publish(event: LTEvent): Promise<void>;
    disconnect(): Promise<void>;
}
