"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const validProp = require("../../../motion/utils/valid-prop.js");
var shouldForward = function(key) {
  return !validProp.isValidMotionProp(key);
};
function loadExternalIsValidProp(isValidProp) {
  if (!isValidProp)
    return;
  shouldForward = function(key) {
    return key.startsWith("on") ? !validProp.isValidMotionProp(key) : isValidProp(key);
  };
}
try {
  loadExternalIsValidProp(require("@emotion/is-prop-valid").default);
} catch (_a) {
}
function filterProps(props, isDom, forwardMotionProps) {
  var filteredProps = {};
  for (var key in props) {
    if (shouldForward(key) || forwardMotionProps === true && validProp.isValidMotionProp(key) || !isDom && !validProp.isValidMotionProp(key) || // If trying to use native HTML drag events, forward drag listeners
    props["draggable"] && key.startsWith("onDrag")) {
      filteredProps[key] = props[key];
    }
  }
  return filteredProps;
}
exports.filterProps = filterProps;
exports.loadExternalIsValidProp = loadExternalIsValidProp;
//# sourceMappingURL=filter-props.js.map
