import { Range3d, Transform } from "@itwin/core-geometry";
import { ElementAlignedBox3d, RenderFeatureTable } from "@itwin/core-common";
import { IModelAppOptions } from "../IModelApp";
import { IModelConnection } from "../IModelConnection";
import { MeshParams } from "../common/internal/render/MeshParams";
import { PointStringParams } from "../common/internal/render/PointStringParams";
import { PolylineParams } from "../common/internal/render/PolylineParams";
import { ViewRect } from "../common/ViewRect";
import { Decorations } from "./Decorations";
import { GraphicBranch, GraphicBranchOptions } from "./GraphicBranch";
import { CustomGraphicBuilderOptions, GraphicBuilder, ViewportGraphicBuilderOptions } from "./GraphicBuilder";
import { Pixel } from "./Pixel";
import { PrimitiveBuilder } from "../internal/render/PrimitiveBuilder";
import { PointCloudArgs } from "../common/internal/render/PointCloudPrimitive";
import { GraphicList, RenderGraphic } from "./RenderGraphic";
import { RenderMemory } from "./RenderMemory";
import { RenderPlan } from "./RenderPlan";
import { RenderAreaPattern, RenderSystem } from "./RenderSystem";
import { RenderTarget } from "./RenderTarget";
import { Scene } from "./Scene";
import { _implementationProhibited } from "../common/internal/Symbols";
import { RenderGeometry } from "../internal/render/RenderGeometry";
/** Contains extensible mock implementations of the various components of a RenderSystem, intended for use in tests.
 * Use these for tests instead of the default RenderSystem wherever possible because:
 *  (1) Electron has a bug on Windows in which it fails to obtain a WebGLRenderingContext when running inside a VM (e.g., during CI job); and
 *  (2) To decouple the logic which uses aspects of the RenderSystem from the full implementation.
 * Any and all of these types can be extended for the purposes of specific tests.
 * To use this:
 *  (1) If overriding anything in the implementation supplied herein, pass a SystemFactory function to MockRender.App.systemFactory.
 *  (2) Call MockRender.App.startup() instead of IModelApp.startup() before tests begin.
 *  (3) Likewise call MockRender.App.shutdown() when finished. This resets the SystemFactory to its default.
 * @note The APIs within this namespace are intended *strictly* for use with unit tests.
 * @internal
 */
export declare namespace MockRender {
    /** @internal */
    abstract class Target extends RenderTarget {
        private readonly _system;
        protected readonly [_implementationProhibited]: undefined;
        protected constructor(_system: RenderSystem);
        get renderSystem(): RenderSystem;
        get wantInvertBlackBackground(): boolean;
        get analysisFraction(): number;
        set analysisFraction(_fraction: number);
        changeScene(_scene: Scene): void;
        changeDynamics(_dynamics?: GraphicList): void;
        changeDecorations(_decs: Decorations): void;
        changeRenderPlan(_plan: RenderPlan): void;
        drawFrame(_sceneTime?: number): void;
        updateViewRect(): boolean;
        readPixels(_rect: ViewRect, _selector: Pixel.Selector, receiver: Pixel.Receiver, _excludeNonLocatable: boolean): void;
        get screenSpaceEffects(): Iterable<string>;
        set screenSpaceEffects(_effects: Iterable<string>);
    }
    /** @internal */
    class OnScreenTarget extends Target {
        private readonly _canvas;
        constructor(system: RenderSystem, _canvas: HTMLCanvasElement);
        get viewRect(): ViewRect;
        setViewRect(_rect: ViewRect, _temp: boolean): void;
    }
    /** @internal */
    class OffScreenTarget extends Target {
        private readonly _viewRect;
        constructor(system: RenderSystem, _viewRect: ViewRect);
        get viewRect(): ViewRect;
        setViewRect(rect: ViewRect, _temp: boolean): void;
    }
    /** @internal */
    class Builder extends PrimitiveBuilder {
        constructor(system: System, options: CustomGraphicBuilderOptions | ViewportGraphicBuilderOptions);
    }
    class Graphic extends RenderGraphic {
        constructor();
        dispose(): void;
        collectStatistics(_stats: RenderMemory.Statistics): void;
        unionRange(): void;
    }
    class List extends Graphic {
        readonly graphics: RenderGraphic[];
        constructor(graphics: RenderGraphic[]);
        dispose(): void;
    }
    class Branch extends Graphic {
        readonly branch: GraphicBranch;
        readonly transform: Transform;
        readonly options?: GraphicBranchOptions | undefined;
        constructor(branch: GraphicBranch, transform: Transform, options?: GraphicBranchOptions | undefined);
        dispose(): void;
    }
    class Batch extends Graphic {
        readonly graphic: RenderGraphic;
        readonly featureTable: RenderFeatureTable;
        readonly range: ElementAlignedBox3d;
        constructor(graphic: RenderGraphic, featureTable: RenderFeatureTable, range: ElementAlignedBox3d);
        dispose(): void;
    }
    /** @internal */
    class Geometry implements RenderGeometry {
        readonly renderGeometryType: "mesh" | "polyline" | "point-string";
        noDispose: boolean;
        readonly isInstanceable = true;
        isDisposed: boolean;
        constructor(renderGeometryType: "mesh" | "polyline" | "point-string");
        dispose(): void;
        collectStatistics(): void;
        computeRange(): Range3d;
    }
    /** @internal */
    class AreaPattern implements RenderAreaPattern {
        readonly [_implementationProhibited] = "renderAreaPattern";
        dispose(): void;
        collectStatistics(): void;
    }
    class System extends RenderSystem {
        get isValid(): boolean;
        dispose(): void;
        get maxTextureSize(): number;
        constructor();
        /** @internal */
        doIdleWork(): boolean;
        /** @internal */
        createTarget(canvas: HTMLCanvasElement): OnScreenTarget;
        /** @internal */
        createOffscreenTarget(rect: ViewRect): RenderTarget;
        createGraphic(options: CustomGraphicBuilderOptions | ViewportGraphicBuilderOptions): GraphicBuilder;
        createGraphicList(primitives: RenderGraphic[]): List;
        createGraphicBranch(branch: GraphicBranch, transform: Transform, options?: GraphicBranchOptions): Branch;
        createBatch(graphic: RenderGraphic, features: RenderFeatureTable, range: ElementAlignedBox3d): Batch;
        /** @internal */
        createMesh(_params: MeshParams): Graphic;
        /** @internal */
        createPolyline(_params: PolylineParams): Graphic;
        /** @internal */
        createPointString(_params: PointStringParams): Graphic;
        /** @internal */
        createPointCloud(_args: PointCloudArgs, _imodel: IModelConnection): Graphic;
        createRenderGraphic(): Graphic;
        /** @internal */
        createMeshGeometry(): Geometry;
        /** @internal */
        createPolylineGeometry(): Geometry;
        /** @internal */
        createPointStringGeometry(): Geometry;
        /** @internal */
        createAreaPattern(): AreaPattern;
        /** @internal */
        createGraphicFromTemplate(): Graphic;
    }
    type SystemFactory = () => RenderSystem;
    /** An implementation of IModelApp which uses a MockRender.System by default. */
    class App {
        static systemFactory: SystemFactory;
        static startup(opts?: IModelAppOptions): Promise<void>;
        static shutdown(): Promise<void>;
        protected static createDefaultRenderSystem(): System;
    }
}
//# sourceMappingURL=MockRender.d.ts.map