"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const validProp = require("./dist-es-motion-utils-valid-prop.cjs");
let shouldForward = (key) => !validProp.isValidMotionProp(key);
function loadExternalIsValidProp(isValidProp) {
  if (!isValidProp)
    return;
  shouldForward = (key) => key.startsWith("on") ? !validProp.isValidMotionProp(key) : isValidProp(key);
}
try {
  loadExternalIsValidProp(require("@emotion/is-prop-valid").default);
} catch (_a) {
}
function filterProps(props, isDom, forwardMotionProps) {
  const filteredProps = {};
  for (const key in props) {
    if (key === "values" && typeof props.values === "object")
      continue;
    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=dist-es-render-dom-utils-filter-props.cjs.map
