import './components/toolbar/edgeless-toolbar.js';
import '../../surface-block/surface-block.js';
import './components/block-portal/frame/edgeless-frame.js';
import { Slot } from '@blockeditor/global/utils';
import { BlockElement } from '@blockeditor/lit';
import { type BlockModel } from '@blockeditor/store';
import { type EdgelessElement, type EdgelessTool, Point, type Selectable, type Viewport } from '../../_common/utils/index.js';
import { type ReorderingAction, type TopLevelBlockModel } from '../../_common/utils/index.js';
import type { FrameBlockModel, ImageBlockModel } from '../../models.js';
import { type CanvasElement, type IBound, type IVec } from '../../surface-block/index.js';
import type { SurfaceBlockComponent } from '../../surface-block/surface-block.js';
import { type SurfaceBlockModel } from '../../surface-block/surface-model.js';
import type { FontLoader } from '../font-loader/font-loader.js';
import type { PageBlockModel } from '../page-model.js';
import { Gesture } from '../text-selection/gesture.js';
import type { EdgelessPageBlockWidgetName } from '../types.js';
import type { EdgelessBlockPortalContainer } from './components/block-portal/edgeless-block-portal.js';
import { EdgelessToolbar } from './components/toolbar/edgeless-toolbar.js';
import { ZoomBarToggleButton } from './components/zoom/zoom-bar-toggle-button.js';
import { EdgelessZoomToolbar, type ZoomAction } from './components/zoom/zoom-toolbar.js';
import { EdgelessClipboardController } from './controllers/clipboard.js';
import { EdgelessPageKeyboardManager } from './edgeless-keyboard.js';
import type { EdgelessPageService } from './edgeless-page-service.js';
import { EdgelessSelectionManager } from './services/selection-manager.js';
import { EdgelessToolsManager } from './services/tools-manager.js';
export interface EdgelessViewport {
    left: number;
    top: number;
    scrollLeft: number;
    scrollTop: number;
    scrollWidth: number;
    scrollHeight: number;
    clientWidth: number;
    clientHeight: number;
}
export declare class EdgelessPageBlockComponent extends BlockElement<PageBlockModel, EdgelessPageService, EdgelessPageBlockWidgetName> {
    static styles: import("lit").CSSResult;
    /**
     * Shared components
     */
    components: {
        toolbar: EdgelessToolbar | null;
        zoomToolbar: EdgelessZoomToolbar | null;
        zoomBarToggleButton: ZoomBarToggleButton | null;
    };
    keyboardManager: EdgelessPageKeyboardManager | null;
    gesture: Gesture | null;
    mouseRoot: HTMLElement;
    edgelessTool: EdgelessTool;
    frames: FrameBlockModel[];
    pageBlockContainer: EdgelessBlockPortalContainer;
    edgelessLayer: HTMLDivElement;
    clipboardController: EdgelessClipboardController;
    slots: {
        viewportUpdated: Slot<{
            zoom: number;
            center: IVec;
        }>;
        selectedRectUpdated: Slot<{
            type: 'move' | 'select' | 'resize';
            delta?: {
                x: number;
                y: number;
            } | undefined;
            dragging?: boolean | undefined;
        }>;
        hoverUpdated: Slot<void>;
        edgelessToolUpdated: Slot<EdgelessTool>;
        reorderingElements: Slot<ReorderingAction<EdgelessElement>>;
        zoomUpdated: Slot<ZoomAction>;
        pressShiftKeyUpdated: Slot<boolean>;
        cursorUpdated: Slot<string>;
        copyAsPng: Slot<{
            blocks: TopLevelBlockModel[];
            shapes: CanvasElement[];
        }>;
        subpageLinked: Slot<{
            pageId: string;
        }>;
        subpageUnlinked: Slot<{
            pageId: string;
        }>;
        pageLinkClicked: Slot<{
            pageId: string;
            blockId?: string | undefined;
        }>;
        tagClicked: Slot<{
            tagId: string;
        }>;
        readonlyUpdated: Slot<boolean>;
        draggingAreaUpdated: Slot<void>;
        navigatorSettingUpdated: Slot<{
            hideToolbar?: boolean | undefined;
            blackBackground?: boolean | undefined;
            fillScreen?: boolean | undefined;
        }>;
        navigatorFrameChanged: Slot<FrameBlockModel>;
        fullScrennToggled: Slot<void>;
        elementUpdated: Slot<{
            id: string;
            props?: Record<string, unknown> | undefined;
        }>;
        elementAdded: Slot<{
            id: string;
        }>;
        elementRemoved: Slot<{
            id: string;
            element: EdgelessElement;
        }>;
        elementResizeStart: Slot<void>;
        elementResizeEnd: Slot<void>;
    };
    surface: SurfaceBlockComponent;
    fontLoader: FontLoader;
    selectionManager: EdgelessSelectionManager;
    tools: EdgelessToolsManager;
    get dispatcher(): import("@blockeditor/block-std").UIEventDispatcher | undefined;
    private _viewportElement;
    get viewportElement(): HTMLElement;
    get viewport(): Viewport;
    private _resizeObserver;
    get surfaceBlockModel(): SurfaceBlockModel;
    private _handleToolbarFlag;
    private _initSlotEffects;
    private _updateFrames;
    getSortedElementsWithViewportBounds(elements: Selectable[]): TopLevelBlockModel[];
    getSortedElementsByBound(bound: IBound): TopLevelBlockModel[];
    /**
     * Adds a new note with the given point on the affine-editor-container.
     *
     * @param: point Point
     * @returns: The id of new note
     */
    addNoteWithPoint(point: Point, options?: {
        width?: number;
        height?: number;
        parentId?: string;
        noteIndex?: number;
        offsetX?: number;
        offsetY?: number;
    }): string;
    /**
     * Adds a new note with the given blocks and point.
     * @param blocks Array<Partial<BlockModel>>
     * @param point Point
     */
    addNewNote(blocks: Array<Partial<BlockModel>>, point: Point, options?: {
        width?: number;
        height?: number;
        parentId?: string;
        noteIndex?: number;
        offsetX?: number;
        offsetY?: number;
    }): {
        noteId: string;
        ids: string[];
    };
    addImage(model: Partial<ImageBlockModel>, point: IVec): string;
    addImages(files: File[], point?: Point): Promise<string[]>;
    setSelection(noteId: string, _active: boolean | undefined, blockId: string, point?: Point): void;
    getElementsBound(): IBound | null;
    update(changedProperties: Map<string, unknown>): void;
    private _initResizeEffect;
    private _initPixelRatioChangeEffect;
    private _initFontloader;
    private _initReadonlyListener;
    private _initRemoteCursor;
    private _initSurface;
    firstUpdated(): void;
    private _saveViewportLocalRecord;
    private _getSavedViewport;
    getFitToScreenData(padding?: [number, number, number, number]): {
        zoom: number;
        centerX: number;
        centerY: number;
    };
    private _initViewport;
    private _initElementSlot;
    connectedCallback(): void;
    disconnectedCallback(): void;
    render(): import("lit").TemplateResult<1>;
}
declare global {
    interface HTMLElementTagNameMap {
        'affine-edgeless-page': EdgelessPageBlockComponent;
    }
}
//# sourceMappingURL=edgeless-page-block.d.ts.map