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