Liferay.Loader.define("@liferay/frontend-data-set-web@1.0.31/management_bar/components/MainSearch",["module","exports","require","@frontend-taglib-clay$clayui/button","@frontend-taglib-clay$clayui/form","liferay!frontend-js-react-web$react","../../FrontendDataSetContext"],(function(e,t,a){var n;window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a("@frontend-taglib-clay$clayui/button"),l=a("@frontend-taglib-clay$clayui/form"),o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(a,r,l):a[r]=e[r]}a.default=e,t&&t.set(e,a);return a}(a("liferay!frontend-js-react-web$react")),u=(n=a("../../FrontendDataSetContext"))&&n.__esModule?n:{default:n};function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}var c=function({setShowMobile:e}){const{searchParam:t,updateSearchParam:a}=(0,o.useContext)(u.default),[n,i]=(0,o.useState)(t);return(0,o.useEffect)((()=>{i(t||"")}),[t]),o.default.createElement(l.ClayInput.Group,null,o.default.createElement(l.ClayInput.GroupItem,null,o.default.createElement(l.ClayInput,{"aria-label":Liferay.Language.get("search"),className:"input-group-inset input-group-inset-after",onChange:e=>i(e.target.value),onKeyDown:function(e){if("Enter"===e.key)return e.preventDefault(),a(n)},placeholder:Liferay.Language.get("search"),value:n}),o.default.createElement(l.ClayInput.GroupInsetItem,{after:!0,tag:"div"},o.default.createElement(r.ClayButtonWithIcon,{"aria-label":Liferay.Language.get("clear"),className:"navbar-breakpoint-d-none",disabled:!n.length,displayType:"unstyled",monospaced:!1,onClick:t=>{t.preventDefault(),i(""),e(!1),a("")},style:{opacity:n.length?1:0,pointerEvents:n.length?"auto":"none"},symbol:"times-circle"}),o.default.createElement(r.ClayButtonWithIcon,{"aria-label":Liferay.Language.get("search"),displayType:"unstyled",monospaced:!1,onClick:e=>{e.preventDefault(),a(n)},symbol:"search",type:"submit"}))))};t.default=c}}));
//# sourceMappingURL=MainSearch.js.map