/*!
 * Copyright (c) 2026 Vertex Software LLC. All rights reserved.
 */
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { h } from "@stencil/core";
import { Rectangle } from "@vertexvis/geometry";
import classNames from "classnames";
import { getBoundingBox2dAnchorPosition } from "../viewer-markup/markup-utils";
import { RelativeAnchor } from "../viewer-markup/viewer-markup-components";
export const BoundingBox2d = ({ bounds, offset, onTopLeftAnchorPointerDown, onLeftAnchorPointerDown, onTopRightAnchorPointerDown, onRightAnchorPointerDown, onBottomLeftAnchorPointerDown, onBottomAnchorPointerDown, onBottomRightAnchorPointerDown, onTopAnchorPointerDown, onCenterAnchorPointerDown, }) => {
    const padded = Rectangle.pad(bounds, 6);
    const center = Rectangle.center(padded);
    const transform = offset != null ? `translate(${offset.x}px, ${offset.y}px)` : undefined;
    return (h("div", { class: "bounds-container" }, h("div", { class: "bounds-outline", style: {
            top: `${padded.y}px`,
            left: `${padded.x}px`,
            width: `${padded.width}px`,
            height: `${padded.height}px`,
            transform,
        } }), h(RelativeAnchor, { transform: transform, id: "bounding-box-2d-top-left-anchor", name: "top-left-anchor", point: getBoundingBox2dAnchorPosition(padded, 'top-left'), onPointerDown: onTopLeftAnchorPointerDown }, h("div", { class: classNames('bounds-default-anchor', 'bounds-edge-anchor') })), h(RelativeAnchor, { transform: transform, id: "bounding-box-2d-left-anchor", name: "left-anchor", point: getBoundingBox2dAnchorPosition(padded, 'left'), onPointerDown: onLeftAnchorPointerDown }, h("div", { class: classNames('bounds-default-anchor', 'bounds-edge-anchor') })), h(RelativeAnchor, { transform: transform, id: "bounding-box-2d-top-right-anchor", name: "top-right-anchor", point: getBoundingBox2dAnchorPosition(padded, 'top-right'), onPointerDown: onTopRightAnchorPointerDown }, h("div", { class: classNames('bounds-default-anchor', 'bounds-edge-anchor') })), h(RelativeAnchor, { transform: transform, id: "bounding-box-2d-right-anchor", name: "right-anchor", point: getBoundingBox2dAnchorPosition(padded, 'right'), onPointerDown: onRightAnchorPointerDown }, h("div", { class: classNames('bounds-default-anchor', 'bounds-edge-anchor') })), h(RelativeAnchor, { transform: transform, id: "bounding-box-2d-bottom-left-anchor", name: "bottom-left-anchor", point: getBoundingBox2dAnchorPosition(padded, 'bottom-left'), onPointerDown: onBottomLeftAnchorPointerDown }, h("div", { class: classNames('bounds-default-anchor', 'bounds-edge-anchor') })), h(RelativeAnchor, { transform: transform, id: "bounding-box-2d-bottom-anchor", name: "bottom-anchor", point: getBoundingBox2dAnchorPosition(padded, 'bottom'), onPointerDown: onBottomAnchorPointerDown }, h("div", { class: classNames('bounds-default-anchor', 'bounds-edge-anchor') })), h(RelativeAnchor, { transform: transform, id: "bounding-box-2d-bottom-right-anchor", name: "bottom-right-anchor", point: getBoundingBox2dAnchorPosition(padded, 'bottom-right'), onPointerDown: onBottomRightAnchorPointerDown }, h("div", { class: classNames('bounds-default-anchor', 'bounds-edge-anchor') })), h(RelativeAnchor, { transform: transform, id: "bounding-box-2d-top-anchor", name: "top-anchor", point: getBoundingBox2dAnchorPosition(padded, 'top'), onPointerDown: onTopAnchorPointerDown }, h("div", { class: classNames('bounds-default-anchor', 'bounds-edge-anchor') })), h(RelativeAnchor, { transform: transform, id: "bounding-box-2d-center-anchor", name: "center-anchor", point: center, onPointerDown: onCenterAnchorPointerDown }, h("div", { class: classNames('bounds-default-anchor', 'bounds-center-anchor') }))));
};
//# sourceMappingURL=viewer-markup-circle-components.js.map
