import * as THREE from "three";
import type { ViewerI18nLanguage } from "../Locale";
/**
 * Camera projection type.
 */
export declare enum CameraProjection {
    Perspective = "Perspective",
    Orthographic = "Orthographic"
}
/**
 * Camera info
 */
export interface CameraInfo {
    /**
     * Camera projection type
     */
    projection: CameraProjection;
    /**
     * The camera position
     */
    position: THREE.Vector3;
    /**
     * The target that the camera looks to
     */
    target: THREE.Vector3;
    /**
     * @hidden
     */
    up?: THREE.Vector3;
    /**
     * The camera zoom
     */
    zoom?: number;
    /**
     * The camera's near clip plane
     */
    near?: number;
    /**
     * The camera's far clip plane
     */
    far?: number;
    /**
     * Used by perspective camera
     */
    fov?: number;
    /**
     * Used by perspective camera
     */
    aspect?: number;
    /**
     * Used by orthographic camera
     */
    left?: number;
    /**
     * Used by orthographic camera
     */
    right?: number;
    /**
     * Used by orthographic camera
     */
    bottom?: number;
    /**
     * Used by orthographic camera
     */
    top?: number;
}
/**
 * Configuration for loading a model into the viewer.
 */
export interface ModelConfig {
    /**
     * Unique identifier for the model.
     * If not provided, the source URL will be used as the model ID.
     */
    modelId?: string;
    /**
     * Display name for the model.
     */
    name?: string;
    /**
     * Source URL or path of the model file to load.
     * Supported formats include DXF, DWG, PDF (for 2D), and glTF, GLB, OBJ, STL (for 3D).
     */
    src: string;
    /**
     * Raw file bytes when the host cannot expose a fetchable URL.
     * When set, loaders use this buffer instead of downloading {@link src}.
     * For 3D buffer loading, {@link fileFormat} is required.
     */
    data?: ArrayBuffer | Uint8Array;
    /**
     * Explicit file format (extension without dot), e.g. `glb`, `dwg`, `stl`.
     * Required when {@link data} is set for 3D buffer loading; also used when the format cannot be inferred from {@link src}.
     * @hidden
     */
    fileFormat?: string;
    /**
     * File encoding for text-based formats (e.g., DXF).
     * Common encodings include "UTF-8", "gb2312", etc.
     * @hidden
     */
    encoding?: string;
    /**
     * Transformation matrix as a float array of length 16 (4x4 matrix).
     * Defines the model's position, rotation, and scale in world space.
     * This has higher priority than separate position/rotation/scale properties.
     */
    matrix?: number[];
    /**
     * This is used when 'src' is a url, and it requires one or more headers in order to
     * request the model. E.g., if it needs an authorization header, then it can be:
     * requestHeader: { "Authorization": "Bearer <your token>" }
     */
    requestHeader?: {
        [header: string]: string;
    };
    /**
     * Whether to merge meshes/lines/points with the same material for performance optimization.
     * @hidden
     * @default false
     */
    merge?: boolean;
    /**
     * When true, mesh geometry is quantized after load.
     * When false, quantization is skipped.
     * When omitted, {@link Viewer3d} uses {@link BaseViewer.enableQuantization};
     * @hidden
     */
    quantize?: boolean;
    /**
     * Whether to generate and display edges/outlines for the model.
     * Useful for Viewer3d to show wireframe edges.
     * @hidden
     */
    edges?: boolean;
    /**
     * Whether the model is visible by default.
     * If set to false, the model will not be loaded.
     * @hidden
     * @default true
     */
    visible?: boolean;
    /**
     * Material file URLs for OBJ models.
     * MTL (Material Template Library) files define materials and textures.
     * @hidden
     */
    mtlUrls?: string[];
}
/**
 * @inheritdoc
 */
export interface Model2dConfig extends ModelConfig {
    /**
     * If to ignore anything of paper space.
     * There are some scenarios to ignore paper space by default, includes:
     * - Dxf overlay, aka, loading more than one dxf files into a viewer. We'll only load model space for the first file.
     * - Dxf compare. Since we'll only compare model space, it won't load paper space at all.
     *
     * This option is useful when user want to explicitly ignore paper space.
     * @default false
     */
    ignorePaperSpace?: boolean;
    /**
     * Applies this color to everything in this model.
     * This allows user to show a drawing with a pure color (black, white, etc.).
     * Color value is between 0 and 1, e.g., [1, 0, 0] means 'red'.
     */
    overrideColor?: number[];
}
/**
 * DOM overlay watermark on the render area (pointer events pass through).
 */
export interface WatermarkConfig {
    /** Text to draw. Whitespace-only is treated as empty (no overlay). */
    text: string;
    /** Opacity multiplier for the text (0–1). Default ~0.14. */
    opacity?: number;
    /** CSS color, e.g. `rgba(180,180,180,0.35)` or `#888`. */
    color?: string;
    /** CSS font size, e.g. `16px`. */
    fontSize?: string;
}
/**
 * Common viewer config
 */
export interface BaseViewerConfig {
    /**
     * @description canvas id to contain the viewer.
     */
    containerId: string;
    /**
     * Language of the viewer.
     * @description Default is `en`.
     */
    language?: ViewerI18nLanguage;
    /**
     * @hidden
     */
    logLevel?: "debug" | "info" | "warn" | "error" | "silent";
    /**
     * @hidden
     */
    enableSpinner?: boolean;
    /**
     * @hidden
     */
    enableProgressBar?: boolean;
    /**
     * @description just for react native
     * @hidden
     */
    context?: WebGLRenderingContext | WebGL2RenderingContext;
    /**
     * @description just for react native
     * @hidden
     */
    context2d?: CanvasRenderingContext2D;
}
/**
 * This wrappers most config for Viewer3d
 */
export interface Viewer3dConfig extends BaseViewerConfig {
    /**
     * Default is `meters`
     * @hidden
     */
    units?: string;
    /**
     * Enables scene graph editing (delete selected nodes, future copy/paste/undo).
     * Off by default for view-only {@link Viewer3d} embeds; enable in CAD Editor.
     */
    enableSceneEditing?: boolean;
}
/**
 * This wrappers most config for Viewer2d
 */
export interface Viewer2dConfig extends BaseViewerConfig {
    /**
     * Enables layout bar so we can switch to other layouts.
     * The default layout bar is an example UI of the viewer, since plenty of APIs are exposed,
     * you are recommended to create your own layout bar with customized style, location, etc.
     */
    enableLayoutBar?: boolean;
    /**
     * If to cache model into indexeddb (or maybe local storage in future).
     * If enabled, it will get model data from cache the next time model is loaded.
     * @hidden
     * @default true
     */
    enableLocalCache?: boolean;
}
/**
 * Dxf compare config.
 */
export interface DxfCompareConfig {
    /**
     * Enables to compare properties (color, linetype, line width, etc.)
     */
    enableDetailComparision: boolean;
    /**
     * The color of the added entities.
     */
    addedColor: THREE.Color;
    /**
     * The color of the removed entities.
     */
    removedColor: THREE.Color;
}
/**
 * A default Viewer3dConfig as a template, which enables most plugins.
 * @hidden
 */
export declare const DefaultViewer3dConfig: Viewer3dConfig;
/**
 * @hidden
 */
export interface IsolateObjectsParam {
    id: string;
    modelId: string;
}
/**
 * @hidden
 */
export interface IsolateObjectsParams {
    familyInstanceIds: IsolateObjectsParam[];
}
/**
 * @hidden
 */
export interface ScreenshotConfig {
    type: string;
    quality: number;
    includeOverlay: boolean;
}
/**
 * Viewpoint definition.
 */
export interface Viewpoint {
    /**
     * The camera location
     */
    eye: THREE.Vector3;
    /**
     * The location that the camera looks to
     */
    look: THREE.Vector3;
    /**
     * @hidden
     */
    up?: THREE.Vector3;
    /**
     * The camera zoom, used by Orthographic camera.
     */
    zoom?: number;
}
/**
 * View direction.
 */
export declare enum ViewDirection {
    Top = "Top",
    Bottom = "Bottom",
    Front = "Front",
    Back = "Back",
    Left = "Left",
    Right = "Right"
}
/**
 * Icon class.
 * Used by toolbar and bottom bar icons, etc.
 */
export interface IconClass {
    /**
     * The default icon.
     */
    default: string;
    /**
     * The icon when item is actived.
     */
    active?: string;
    /**
     * The icon font class name.
     */
    iconFont?: string;
}
