import r from "./index-_virtual16.js";
import a from "./index-chainPropTypes.js";
function u(n) {
  const {
    prototype: e = {}
  } = n;
  return !!e.isReactComponent;
}
function l(n, e, c, p, f) {
  const o = n[e], s = f || e;
  if (o == null || // When server-side rendering React doesn't warn either.
  // This is not an accurate check for SSR.
  // This is only in place for Emotion compat.
  // TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
  typeof window > "u")
    return null;
  let t;
  const i = o.type;
  return typeof i == "function" && !u(i) && (t = "Did you accidentally use a plain function component for an element instead?"), t !== void 0 ? new Error(`Invalid ${p} \`${s}\` supplied to \`${c}\`. Expected an element that can hold a ref. ${t} For more information see https://mui.com/r/caveat-with-refs-guide`) : null;
}
const m = a(r.element, l);
m.isRequired = a(r.element.isRequired, l);
export {
  m as default
};
