import { z as a } from "zod";
a.enum(["locationChange", "heightChange", "themeChange", "searchParams", "setFallback"]);
class i {
  static sendMessageToParentWindow({ message: e, channel: t, origin: r = "*" }) {
    const s = JSON.stringify({ ...e, channel: t });
    if (!this.isInIframe()) {
      console.log("Message to parent window ignored: ", { ...e, channel: t });
      return;
    }
    window.parent.postMessage(s, r);
  }
  static isInIframe() {
    try {
      return window.self !== window.top;
    } catch {
      return !0;
    }
  }
}
export {
  i as ChildUtils
};
