/**
 * 选区（selection zone）图元展示：虚线框 + 左上角标题标签。
 *
 * 成员关系按「几何完全包含」实时计算（见 utils/floorMapSelectionZone），此组件仅负责视觉。
 * 内部 body 设 `pointer-events: none`，仅外层定位容器接收拖拽，保证框内图元仍可单独点选/拖动。
 */
import React from 'react';
import useEngineContext from "../../../hooks/useEngineContext";
import { getFloorMapDisplayLocale, getFloorMapLayoutText } from "../utils/floorMapCanvasDisplay";
import "./FloorMapSelectionZoneElement.less";
var PREFIX = 'pisell-floor-map-selection-zone';
var I18N_BADGE = 'pisell-floor-map-layout.selection-zone.title-badge';
var I18N_UNNAMED = 'pisell-floor-map-layout.selection-zone.unnamed';
export function FloorMapSelectionZoneElement(props) {
  var engineCtx = useEngineContext();
  var displayLocale = getFloorMapDisplayLocale(engineCtx);
  var raw = props.name != null ? String(props.name).trim() : '';
  var hasName = raw.length > 0;
  var displayName = hasName ? raw : getFloorMapLayoutText(I18N_UNNAMED, displayLocale);
  return /*#__PURE__*/React.createElement("div", {
    className: PREFIX
  }, /*#__PURE__*/React.createElement("div", {
    className: "".concat(PREFIX, "__body"),
    "aria-hidden": true
  }), /*#__PURE__*/React.createElement("div", {
    className: "".concat(PREFIX, "__title")
  }, /*#__PURE__*/React.createElement("span", {
    className: "".concat(PREFIX, "__title-badge")
  }, getFloorMapLayoutText(I18N_BADGE, displayLocale)), /*#__PURE__*/React.createElement("span", {
    className: "".concat(PREFIX, "__title-text").concat(hasName ? '' : " ".concat(PREFIX, "__title-text--placeholder"))
  }, displayName)));
}