import { type OpfsVfsKind } from './opfs.js';
import type { Database } from './types.js';
import type { TreecrdtAdapter } from '@treecrdt/interface';
import type { MaterializationEvent } from '@treecrdt/interface/engine';
export type OpenTreecrdtDbOptions = {
    baseUrl: string;
    filename?: string;
    storage: 'memory' | 'opfs';
    docId: string;
    requireOpfs?: boolean;
    onMaterialized?: (event: MaterializationEvent) => void;
    opfsVfs?: OpfsVfsKind;
};
export type OpenTreecrdtDbResult = {
    db: Database;
    api: TreecrdtAdapter;
    storage: 'memory' | 'opfs';
    filename: string;
    opfsError?: string;
};
export declare function openTreecrdtDb(opts: OpenTreecrdtDbOptions): Promise<OpenTreecrdtDbResult>;
