import type { EngineEvent } from '@bilig/protocol';
import type { EnginePatch } from './patches/patch-types.js';
export interface EngineTrackedEvent {
    kind: EngineEvent['kind'];
    invalidation: EngineEvent['invalidation'];
    changedCellIndices: EngineEvent['changedCellIndices'];
    patches?: readonly EnginePatch[];
    invalidatedRanges: EngineEvent['invalidatedRanges'];
    invalidatedRows: EngineEvent['invalidatedRows'];
    invalidatedColumns: EngineEvent['invalidatedColumns'];
    metrics: EngineEvent['metrics'];
    explicitChangedCount?: number;
}
export declare class EngineEventBus {
    private readonly listeners;
    private readonly trackedListeners;
    private readonly cellIndexListeners;
    private readonly addressListeners;
    private readonly listenerIds;
    private listenerEpoch;
    private listenerEpochs;
    private nextListenerId;
    hasListeners(): boolean;
    hasTrackedListeners(): boolean;
    hasCellListeners(): boolean;
    hasAddressListeners(): boolean;
    subscribe(listener: (event: EngineEvent) => void): () => void;
    subscribeTracked(listener: (event: EngineTrackedEvent) => void): () => void;
    subscribeCellIndex(cellIndex: number, listener: () => void): () => void;
    subscribeCellAddress(qualifiedAddress: string, listener: () => void): () => void;
    subscribeCells(cellIndices: readonly number[], qualifiedAddresses: readonly string[], listener: () => void): () => void;
    emit(event: EngineEvent, changedCellIndices: readonly number[] | Uint32Array, resolveAddress?: (cellIndex: number) => string): void;
    emitAllWatched(event: EngineEvent): void;
    emitTracked(event: EngineTrackedEvent): void;
    private beginListenerEpoch;
    private notifyListener;
    private getListenerId;
}
