"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var can_accept_ref_exports = {};
__export(can_accept_ref_exports, {
  canAcceptRef: () => canAcceptRef
});
module.exports = __toCommonJS(can_accept_ref_exports);
const REACT_MEMO_TYPE = Symbol.for("react.memo");
const REACT_LAZY_TYPE = Symbol.for("react.lazy");
const REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
function hasTypeofSymbol(c, type) {
  return c != null && "$$typeof" in c && c.$$typeof === type;
}
function isMemoComponent(c) {
  return hasTypeofSymbol(c, REACT_MEMO_TYPE);
}
function isLazyComponent(c) {
  return hasTypeofSymbol(c, REACT_LAZY_TYPE);
}
function isForwardRef(c) {
  return hasTypeofSymbol(c, REACT_FORWARD_REF_TYPE);
}
function unwrapIfMemo(c) {
  return isMemoComponent(c) ? c.type : c;
}
function isClassComponent(c) {
  return typeof c === "function" && c.prototype && Boolean(c.prototype.isReactComponent);
}
function canAcceptRefImpl(c) {
  return isClassComponent(c) || isForwardRef(c) || // will try to pass a ref to all lazy components since we can't know if they accept refs without loading them
  isLazyComponent(c);
}
function canAcceptRef(c) {
  return canAcceptRefImpl(unwrapIfMemo(c));
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  canAcceptRef
});
//# sourceMappingURL=can-accept-ref.js.map