/*!
 * Copyright (c) 2026 Vertex Software LLC. All rights reserved.
 */
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { Fragment, h } from "@stencil/core";
import { translateWorldLineToViewport, } from "../viewer-measurement-distance/utils";
export const MeasurementOverlayView = ({ overlay, viewport, camera }) => {
    if (overlay.type === 'line') {
        return (h(LineOverlayView, { overlay: overlay, viewport: viewport, camera: camera }));
    }
    else {
        return (h(DistanceVectorOverlayView, { overlay: overlay, viewport: viewport, camera: camera }));
    }
};
const LineOverlayView = ({ overlay, camera, viewport }) => {
    const { start, end } = translateWorldLineToViewport(overlay, {
        camera,
        viewport,
    });
    return (h("vertex-viewer-measurement-line", { class: "measurement-line", start: start, end: end }));
};
const DistanceVectorOverlayView = ({ overlay: { x, y, z }, camera, viewport }) => {
    const params = { camera, viewport };
    const { start: xs, end: xe } = translateWorldLineToViewport(x, params);
    const { start: ys, end: ye } = translateWorldLineToViewport(y, params);
    const { start: zs, end: ze } = translateWorldLineToViewport(z, params);
    return (h(Fragment, null, h("vertex-viewer-measurement-line", { class: "measurement-line distance-vector-x", start: xs, end: xe }), h("vertex-viewer-measurement-line", { class: "measurement-line distance-vector-y", start: ys, end: ye }), h("vertex-viewer-measurement-line", { class: "measurement-line distance-vector-z", start: zs, end: ze })));
};
//# sourceMappingURL=viewer-measurement-overlays-components.js.map
