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