import { struct as c } from "../../../utils/struct/main.js";
import { enumerable as t, getter as s } from "../../../utils/struct/property.js";
const e = /* @__PURE__ */ Symbol("<<NO_ERR>>");
function _(r) {
  if (r === e)
    throw new TypeError("Illegal error");
}
const l = () => {
  let r = e;
  const n = () => {
    r = e;
  }, E = (o) => {
    _(o), r = o;
  };
  return c({
    error: s(() => r === e ? void 0 : r),
    hasError: s(() => r !== e),
    reset: t(n),
    set: t(E)
  });
};
export {
  l as createErrorContainer
};
