const GLOBAL_KEY = /* @__PURE__ */ Symbol.for("@open-mercato/shared.loggerExtension");
function store() {
  const globalStore = globalThis;
  let current = globalStore[GLOBAL_KEY];
  if (!current) {
    current = {};
    globalStore[GLOBAL_KEY] = current;
  }
  return current;
}
function registerLoggerExtension(extension) {
  store().active = extension;
  return () => {
    const current = store();
    if (current.active === extension) current.active = void 0;
  };
}
function getLoggerExtension() {
  return store().active;
}
function resetLoggerExtension() {
  store().active = void 0;
}
export {
  getLoggerExtension,
  registerLoggerExtension,
  resetLoggerExtension
};
//# sourceMappingURL=extension.js.map
