"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const tslib_es6 = require("../../../../../../../tslib@2.6.2/node_modules/tslib/tslib.es6.js");
const React = require("react");
const useProps$1 = require("../html/use-props.js");
const filterProps = require("./utils/filter-props.js");
const isSvgComponent = require("./utils/is-svg-component.js");
const useProps = require("../svg/use-props.js");
function createUseRender(forwardMotionProps) {
  if (forwardMotionProps === void 0) {
    forwardMotionProps = false;
  }
  var useRender = function(Component, props, projectionId, ref, _a, isStatic) {
    var latestValues = _a.latestValues;
    var useVisualProps = isSvgComponent.isSVGComponent(Component) ? useProps.useSVGProps : useProps$1.useHTMLProps;
    var visualProps = useVisualProps(props, latestValues, isStatic);
    var filteredProps = filterProps.filterProps(props, typeof Component === "string", forwardMotionProps);
    var elementProps = tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign({}, filteredProps), visualProps), { ref });
    if (projectionId) {
      elementProps["data-projection-id"] = projectionId;
    }
    return React.createElement(Component, elementProps);
  };
  return useRender;
}
exports.createUseRender = createUseRender;
//# sourceMappingURL=use-render.js.map
