import{objectWithoutProperties as o,extends as e,objectSpread2 as r}from"../../_virtual/_rollupPluginBabelHelpers.js";import n from"react";import{chainRefFunctions as t,chainFunctions as s}from"../../utils/function-utils.js";var p=["children"],l=n.forwardRef((function(s,l){var i=s.children,a=o(s,p);return n.Children.map(i,(function(o){return n.isValidElement(o)?"string"!=typeof o.type?n.createElement("span",e({ref:l},a),n.cloneElement(o,r({},o.props))):n.cloneElement(o,r(r(r({},a),o.props),{},{onClick:u("onClick",o.props,a),onBlur:u("onBlur",o.props,a),onMouseEnter:u("onMouseEnter",o.props,a),onMouseLeave:u("onMouseLeave",o.props,a),onMouseDown:u("onMouseDown",o.props,a),onFocus:u("onFocus",o.props,a),ref:t([o.ref,l])})):null}))}));function u(o,e,r){return s([e[o],r[o]],!0)}export{l as Refable};
