import { isValidElement as s } from "react";
const m = 6, p = [
  "type",
  "render",
  "__emotion_base",
  "__emotion_real",
  "WrappedComponent"
], f = (e, n = 0, t = /* @__PURE__ */ new WeakSet()) => {
  if (!e || n > m || typeof e != "object" && typeof e != "function")
    return !1;
  const r = e;
  if (t.has(r))
    return !1;
  if (t.add(r), r.isM4LImageComponent === !0)
    return !0;
  for (const o of p)
    if (r[o] && f(r[o], n + 1, t))
      return !0;
  return !1;
}, a = (e) => s(e) ? f(e.type) : !1;
export {
  a as isImageComponentElement
};
