import { createLogger } from "@open-mercato/shared/lib/logger";
const logger = createLogger("catalog");
let productSeoTranslator = null;
function setProductSeoTranslator(t) {
  productSeoTranslator = t;
}
function getProductSeoTranslator() {
  return productSeoTranslator ?? void 0;
}
const listeners = /* @__PURE__ */ new Set();
function publishProductSeoValidation(payload) {
  listeners.forEach((listener) => {
    try {
      listener(payload);
    } catch (err) {
      logger.error("product-seo Failed to notify listener", { err });
    }
  });
}
function subscribeProductSeoValidation(listener) {
  listeners.add(listener);
  return () => listeners.delete(listener);
}
export {
  getProductSeoTranslator,
  publishProductSeoValidation,
  setProductSeoTranslator,
  subscribeProductSeoValidation
};
//# sourceMappingURL=state.js.map
