var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var import_node_test = __toESM(require("node:test"));
var import_strict = __toESM(require("node:assert/strict"));
var THREE = __toESM(require("three"));
var import_src = require("../src/index.js");
(0, import_node_test.default)("attachBoxelOverlays adds helpers and disposes cleanly", () => {
  const THREERef = THREE;
  const target = new THREERef.Object3D();
  target.userData.size = [1, 2, 3];
  target.userData.sockets = [
    [0.5, 1, 0],
    [-0.5, 0, 0]
  ];
  const handles = (0, import_src.attachBoxelOverlays)({ THREE: THREERef, target }, { origin: true, bounds: true, sockets: true, color: 16711935, opacity: 0.5 });
  import_strict.default.ok(handles.origin, "origin helper not attached");
  import_strict.default.ok(handles.bounds && handles.bounds.length === 1, "bounds helper missing");
  import_strict.default.ok(handles.sockets && handles.sockets.length === 2, "socket helpers missing");
  import_strict.default.strictEqual(target.children.includes(handles.origin), true);
  handles.dispose();
  import_strict.default.strictEqual(target.children.length, 0, "helpers should be removed after dispose");
});
