import { Group } from "three";
import type { ViralViewerApi } from "../../viral-viewer-api";
import type { CatalogCategory, CatalogItem } from "./catalog/catalog-types";
import { EditorCommandHistory } from "./commands/editor-command-history";
import { EditorBlock } from "./block/editor-block";
import { ProfileEditTool } from "./block/profile-edit-tool";
import { EditorObject } from "./editor-object";
import { EditorLibraryPanel } from "./library-panel/editor-library-panel";
import { EditorPersistence } from "./persistence/editor-persistence";
import type { EditorSceneState } from "./persistence/editor-persistence-types";
import { AreaPlacementTool, type AreaDrawMode } from "./placement/area-placement-tool";
import { LinePlacementTool } from "./placement/line-placement-tool";
import { PointPlacementTool } from "./placement/point-placement-tool";
import { EditorDragDrop } from "./upload/editor-drag-drop";
import { EditorUploadService } from "./upload/upload-service";
import { ViralEditorInput } from "./viral-editor-input";
import { EditorHoverFeedback } from "./hover/editor-hover-feedback";
import { BuildingRemovalTool } from "./building-removal-tool";
import type { LandscapeGenerateResult } from "../landscape/landscape-generator.worker";
import type { LandscapeDefinition } from "../landscape/landscape-types";
import type { LandscapeCache } from "./persistence/editor-persistence-types";
export declare class ViralEditor {
    viralViewerApi: ViralViewerApi;
    enabled: boolean;
    editorObjects: EditorObject[];
    editorGroup: Group;
    selectedObject: EditorObject | null;
    input: ViralEditorInput;
    uploadService: EditorUploadService;
    libraryPanel: EditorLibraryPanel;
    dragDrop: EditorDragDrop;
    commandHistory: EditorCommandHistory;
    persistence: EditorPersistence;
    pointPlacementTool: PointPlacementTool;
    linePlacementTool: LinePlacementTool;
    areaPlacementTool: AreaPlacementTool;
    profileEditTool: ProfileEditTool;
    hoverFeedback: EditorHoverFeedback;
    buildingRemovalTool: BuildingRemovalTool;
    editorBlocks: EditorBlock[];
    gridEnabled: boolean;
    gridSize: number;
    movingBimModel: boolean;
    private _bimWasDragging;
    private _bimAnchor;
    private _bimAnchorStart;
    private _bimAnchorRotStart;
    private _bimWorldStart;
    private _bimWorldRotStart;
    private _placementCatalogItemId;
    private _editingBlockId;
    private _nextBlockId;
    private _gridHelper;
    private _dragBeforePosition;
    private _dragBeforeRotation;
    private _dragBeforeScale;
    private _draggingObject;
    private _nextId;
    private _customCatalog;
    constructor(viralViewerApi: ViralViewerApi);
    toggle(): Promise<void>;
    enable(): Promise<void>;
    disable(): void;
    addObject(name?: string): EditorObject;
    selectObject(editorObj: EditorObject): void;
    deselectObject(): void;
    deleteSelected(): void;
    setTransformMode(mode: "translate" | "rotate" | "scale"): void;
    attachBimModel(): void;
    detachBimModel(): void;
    raycastEditorObjects(): EditorObject | null;
    /**
     * Get the full catalog (built-in + custom categories).
     */
    getCatalog(): CatalogCategory[];
    /**
     * Register a custom catalog category with items.
     * If a category with the same id already exists in the custom catalog, it is replaced.
     */
    registerCatalogCategory(category: CatalogCategory): void;
    /**
     * Register a single custom catalog item into an existing category.
     * Creates the category if it doesn't exist in the custom catalog.
     */
    registerCatalogItem(categoryId: string, item: CatalogItem, categoryName?: string, categoryIcon?: string): void;
    /**
     * Remove a custom catalog item or category.
     * Cannot remove built-in items.
     */
    removeCatalogItem(itemId: string): boolean;
    /**
     * Remove an entire custom catalog category.
     */
    removeCatalogCategory(categoryId: string): boolean;
    /** Look up a catalog item across built-in and custom catalogs. */
    findCatalogItem(itemId: string): CatalogItem | undefined;
    addObjectFromCatalog(itemId: string): Promise<EditorObject | null>;
    addObjectFromUpload(file: File): Promise<EditorObject | null>;
    addLandscape(result: LandscapeGenerateResult, definition: LandscapeDefinition, cache?: LandscapeCache): EditorObject;
    private _fitShadowCamera;
    private _enableEditorRendering;
    private _frameLandscape;
    startPointPlacement(catalogItemId: string): Promise<void>;
    cancelPointPlacement(): void;
    private _handlePointPlacement;
    startLinePlacement(catalogItemId: string, spacing?: number): Promise<void>;
    finishLinePlacement(): void;
    cancelLinePlacement(): void;
    setLinePlacementSpacing(spacing: number): void;
    private _handleLinePlacement;
    startAreaPlacement(catalogItemId: string, drawMode?: AreaDrawMode, spacing?: number): Promise<void>;
    finishAreaPlacement(): void;
    cancelAreaPlacement(): void;
    setAreaPlacementSpacing(spacing: number): void;
    private _handleAreaPlacement;
    private _createBlock;
    explodeBlock(blockId: string): EditorObject[] | null;
    editBlock(blockId: string): void;
    cancelEditBlock(): void;
    private _handleProfileEditCancel;
    private _handleProfileEditFinish;
    getBlockForObject(editorObj: EditorObject): EditorBlock | null;
    private _createCatalogObjectAt;
    private _loadCustomModel;
    clearScene(): void;
    private _registerTransformListeners;
    private _unregisterTransformListeners;
    private _onDraggingChanged;
    private _onObjectChange;
    toggleGrid(): void;
    private _showGrid;
    private _hideGrid;
    getSceneState(): EditorSceneState;
    restoreFromState(state: EditorSceneState): Promise<void>;
    private _triggerSave;
    private _restoreScene;
    private _restoreObject;
    private _restoreCatalogObject;
    private _restoreUploadObject;
    private _restorePlaceholderObject;
    private _restoreLandscapeObject;
}
