/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { MaybePromise, StorageContext } from "@matter/general";
import { EventNumber } from "@matter/types";
import { EventStore, OccurrenceSummary } from "./EventStore.js";
import { Occurrence } from "./Occurrence.js";
/**
 * Common base class for standard event stores.
 *
 * This supports data load for both persistent and ephemeral stores so stores can manage conversion when the
 * implementation changes across restarts.
 */
export declare abstract class BaseEventStore implements EventStore {
    #private;
    constructor(storage: StorageContext);
    abstract load(): MaybePromise<OccurrenceSummary[]>;
    abstract add(occurrence: Occurrence): MaybePromise<OccurrenceSummary>;
    abstract get(number: EventNumber): MaybePromise<Occurrence>;
    abstract delete(number: EventNumber): MaybePromise<void>;
    clear(): MaybePromise<void>;
    abstract close(): MaybePromise<void>;
    protected loadInitialState(): Promise<{
        reservationEnd: bigint | undefined;
        eventIds: bigint[];
    }>;
    protected get nextNumber(): bigint;
    protected allocateNumber(): EventNumber;
    protected get storage(): StorageContext;
    protected get eventStorage(): StorageContext;
    protected logLoad(type: string): void;
    /**
     * If present in the store, this sub-context contains persisted events.
     */
    static EVENTS_KEY: string;
    /**
     * If present in the store, this value designates the next event value to use on startup.
     *
     * This should really be "lastReservedNumber" but keeping old name for backwards compatibility.
     */
    static LAST_RESERVED_NUMBER_KEY: string;
}
//# sourceMappingURL=BaseEventStore.d.ts.map