import { jsx as a } from "react/jsx-runtime";
import { useSessionStorageState as o } from "ahooks";
import { EMBED_MODE_KEY as m } from "./constant.js";
function p(e) {
  const i = e.displayName || e.name || "Component";
  function t(n) {
    const [r] = o(m, {
      defaultValue: 0,
      listenStorageChange: !0
    });
    return r === 1 ? null : /* @__PURE__ */ a(e, { ...n });
  }
  return t.displayName = `withHideWhenEmbed(${i})`, t;
}
export {
  p as default
};
