/**
 * Orchestrates a full logical bitmap index build from WarpState.
 *
 * Extracts the visible projection (nodes, edges, properties) from materialized
 * state and delegates to LogicalBitmapIndexBuilder + PropertyIndexBuilder.
 *
 * @module domain/services/index/LogicalIndexBuildService
 */
import WarpStream from '../../stream/WarpStream.ts';
import { ReceiptShard } from '../../artifacts/ReceiptShard.ts';
import WarpState from '../state/WarpState.ts';
import type { IndexShard } from '../../artifacts/IndexShard.ts';
import type { LWWRegister } from '../../crdt/LWW.ts';
import type { PropValue } from '../../types/PropValue.ts';
import type StateSession from '../../orset/session/StateSession.ts';
type ExistingMeta = Record<string, {
    nodeToGlobal: Record<string, number>;
    nextLocalId: number;
}>;
type ExistingLabels = Record<string, number> | Array<[string, number]>;
type PropertyRegisters = Map<string, LWWRegister<PropValue>>;
export default class LogicalIndexBuildService {
    /**
     * Builds a complete logical index as a collected array of IndexShard records.
     *
     * Synchronous alternative to buildStream() for callers that need all
     * shards in memory (e.g., MaterializedViewService.build() which hydrates
     * an in-memory LogicalIndex).
     */
    buildShards(state: WarpState, options?: {
        existingMeta?: ExistingMeta;
        existingLabels?: ExistingLabels;
    }): {
        shards: IndexShard[];
        receipt: ReceiptShard;
    };
    buildShardsFromSession(args: {
        session: StateSession;
        prop: PropertyRegisters;
        existingMeta?: ExistingMeta;
        existingLabels?: ExistingLabels;
    }): Promise<{
        shards: IndexShard[];
        receipt: ReceiptShard;
    }>;
    /**
     * Builds a complete logical index as a WarpStream of IndexShard records.
     *
     * The stream yields MetaShard, LabelShard, EdgeShard, PropertyShard,
     * and ReceiptShard instances in builder order. Pipe through
     * IndexShardEncodeTransform → GitBlobWriteTransform → TreeAssemblerSink
     * to persist.
     */
    buildStream(state: WarpState, options?: {
        existingMeta?: ExistingMeta;
        existingLabels?: ExistingLabels;
    }): {
        stream: WarpStream<IndexShard>;
        receipt: ReceiptShard;
    };
    private _populateBuilders;
    private _populateBuildersFromSession;
    private _createBuilders;
    private _populateVisibleData;
    private _collectShards;
}
export {};
