import { Slot } from '@blockeditor/global/utils';
import type { Y } from '@blockeditor/store';
import { BlockModel, Boxed } from '@blockeditor/store';
import type { ElementModel } from './element-model/base.js';
import type { GroupElementModel } from './element-model/group.js';
import { SurfaceBlockTransformer } from './surface-transformer.js';
export type SurfaceBlockProps = {
    elements: Boxed<Y.Map<Y.Map<unknown>>>;
};
export declare const SurfaceBlockSchema: {
    version: number;
    model: {
        role: "root" | "hub" | "content";
        props: import("@blockeditor/store").PropsGetter<SurfaceBlockProps>;
        flavour: "affine:surface";
    } & {
        version: number;
        role: "hub";
        parent: string[];
        children: string[];
    };
    onUpgrade?: ((data: SurfaceBlockProps, previousVersion: number, latestVersion: number) => void) | undefined;
    transformer?: (() => SurfaceBlockTransformer) | undefined;
};
export declare class SurfaceBlockModel extends BlockModel<SurfaceBlockProps> {
    private _elementModels;
    private _disposables;
    private _groupToElements;
    private _elementToGroup;
    private _connectorToElements;
    private _elementToConnector;
    elementUpdated: Slot<{
        id: string;
        props: Record<string, {
            oldValue: unknown;
        }>;
    }>;
    elementAdded: Slot<{
        id: string;
    }>;
    elementRemoved: Slot<{
        id: string;
        type: string;
    }>;
    get elementModels(): ElementModel<import("./element-model/base.js").BaseProps>[];
    constructor();
    private _init;
    private _initElementModels;
    private _initGroup;
    private _initConnector;
    dispose(): void;
    getConnectors(id: string): ElementModel<import("./element-model/base.js").BaseProps>[];
    getGroup(id: string): GroupElementModel | null;
    getElementById(id: string): ElementModel | null;
    addElement<T extends object = Record<string, unknown>>(props: Partial<T> & {
        type: string;
    }): string;
    removeElement(id: string): void;
    updateElement<T extends object = Record<string, unknown>>(id: string, props: Partial<T>): void;
}
//# sourceMappingURL=surface-model.d.ts.map