import * as THREE from "three";
import { ProgressBar } from "../components";
import { DxfCompareConfig, Model2dConfig, Viewer2dConfig } from "../../core/Configs";
import { DxfChange, DxfLoader } from "../../core/dxf";
import { FontManager } from "../../core/font";
import { Viewer2d } from "../../core/viewers/Viewer2d";
/**
 * Dxf compare helper with one viewport.
 * @example
 * ``` html
 * <div id="app">
 *     <div id="myCanvas" style="width: 100%; height: 100%; display: inline-block;"></div>
 * </div>
 * ```
 * ``` typescript
 * const viewerCfg = { containerId: "myCanvas" };
 * const modelCfg1 = { modelId: "id_1", src: "http://www.abc.com/sample1.dxf" };
 * const modelCfg2 = { modelId: "id_2", src: "http://www.abc.com/sample2.dxf" };
 * const compareCfg = {
 *     addedColor: new THREE.Color(0, 1, 0), // green
 *     removedColor: new THREE.Color(1, 0, 0), // red
 * };
 * const fontFiles = ["http://www.abc.com/hztxt.shx", "http://www.abc.com/simplex.shx"];
 *
 * const compareHelper = new BaseDxfCompareHelper(viewerCfg);
 * await compareHelper.setFont(fontFiles);
 * await compareHelper.compare(modelCfg1, modelCfg2, compareCfg);
 * ```
 */
export declare class BaseDxfCompareHelper {
    /**
     * Viewer2d of DxfCompareHelper.
     */
    viewer: Viewer2d;
    protected fontManager?: FontManager;
    protected loader: DxfLoader;
    protected loadingManager?: THREE.LoadingManager;
    protected changes?: Record<string, DxfChange>;
    protected container: HTMLElement;
    protected spinner?: HTMLDivElement;
    protected jobCount: number;
    protected loadingProgressBar?: ProgressBar;
    constructor(viewerCfg: Viewer2dConfig);
    protected initSpinner(): void;
    /**
     * Loads fonts used when parsing DXF text. Call before loading a DXF; does not affect text that is already loaded.
     * Supports SHX or typeface bundles; for typeface, only a single file in the array is supported for now.
     * @param urls Font file URLs.
     * @example
     * ```typescript
     * compareHelper.setFont(["https://example.com/xxx.shx"]);
     * ```
     */
    setFont(urls: string[]): Promise<void>;
    /**
     * Compares two dxf files. Note that:
     * - It only compares model spaces.
     * - It shouldn't load anything else before and after compare.
     * @param modelCfg1 The first dxf to be compared
     * @param modelCfg2 The second dxf to be compared
     * @param onProgress loading progress
     */
    compare(modelCfg1: Model2dConfig, modelCfg2: Model2dConfig, compareCfg?: DxfCompareConfig, onProgress?: (event: ProgressEvent) => void): Promise<void>;
    /**
     * Returns the comparison diff (per-change records) from the last successful `compare`.
     * @returns Compare changes keyed by id, or undefined if not yet compared.
     * @example
     * ``` typescript
     * const changes = compareHelper.getChanges();
     * console.log(changes);
     * ```
     */
    getChanges(): Record<number, DxfChange> | undefined;
    /**
     * Zooms the camera to the bounding box of a single compare change (with padding).
     * @param changeId Change id: positive integer, starting at 1.
     * @example
     * ``` typescript
     * const changeId = 1;
     * compareHelper.zoomToChange(changeId);
     * ```
     */
    zoomToChange(changeId: number): void;
    /**
     * Sets spinner visibility
     */
    protected setSpinnerVisibility(visible: boolean): void;
    /**
     * Increases job count, and show spinner accordingly
     */
    protected increaseJobCount(): void;
    /**
     * Decreases job count, and hide spinner accordingly
     */
    protected decreaseJobCount(): void;
}
