Liferay.Loader.define("data-engine-taglib@3.3.53/data_layout_builder/js/components/search-input/SearchInput.es",["module","exports","require","@frontend-taglib-clay$clayui/button","@frontend-taglib-clay$clayui/form","@frontend-taglib-clay$clayui/icon","liferay!frontend-js-react-web$react"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a("@frontend-taglib-clay$clayui/button"),n=a("@frontend-taglib-clay$clayui/form"),l=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(a("@frontend-taglib-clay$clayui/icon")),u=function _interopRequireWildcard(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache();if(t&&t.has(e))return t.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var l=r?Object.getOwnPropertyDescriptor(e,n):null;l&&(l.get||l.set)?Object.defineProperty(a,n,l):a[n]=e[n]}a.default=e,t&&t.set(e,a);return a}(a("liferay!frontend-js-react-web$react"));function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}var c=u.default.forwardRef((({onChange:e=(()=>{}),searchText:t=""},a)=>{const[c,i]=(0,u.useState)(t),o=(0,u.useRef)(null),f=a||o;(0,u.useEffect)((()=>{i(t)}),[t]);const onClear=()=>{i(""),e(""),f.current.focus()};let d=u.default.createElement(l.default,{className:"mr-2 mt-0",symbol:"search"});return c&&(d=u.default.createElement(r.ClayButtonWithIcon,{"aria-label":Liferay.Language.get("clear"),displayType:"unstyled",key:"clearButton",onClick:onClear,symbol:"times"})),u.default.createElement(n.ClayInput.Group,null,u.default.createElement(n.ClayInput.GroupItem,null,u.default.createElement(n.ClayInput,{"aria-label":Liferay.Language.get("search"),className:"input-group-inset input-group-inset-after",onChange:({target:{value:t}})=>{i(t),e(t)},placeholder:"".concat(Liferay.Language.get("search"),"..."),ref:f,type:"text",value:c}),u.default.createElement(n.ClayInput.GroupInsetItem,{after:!0},d)))}));t.default=c}}));
//# sourceMappingURL=SearchInput.es.js.map