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));
}
export {
  canAcceptRef
};
//# sourceMappingURL=can-accept-ref.js.map