Liferay.Loader.define("@liferay/search-experiences-web@3.0.30/sxp_blueprint_admin/js/shared/SearchInput",["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=_interopRequireDefault(a("@frontend-taglib-clay$clayui/button")),n=a("@frontend-taglib-clay$clayui/form"),l=_interopRequireDefault(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}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var i=function SearchInput({disabled:e,onChange:t,onEnter:a}){const[i,c]=(0,u.useState)("");return 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:"form-control input-group-inset input-group-inset-after",disabled:e,onChange:e=>{t(e.target.value),c(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),a&&a())},placeholder:Liferay.Language.get("search"),type:"text",value:i}),i&&!a?u.default.createElement(n.ClayInput.GroupInsetItem,{after:!0,tag:"span"},u.default.createElement(r.default,{displayType:"unstyled",onClick:()=>{t(""),c("")},title:Liferay.Language.get("clear")},u.default.createElement(l.default,{symbol:"times-circle"}))):u.default.createElement(n.ClayInput.GroupInsetItem,{after:!0,tag:"span"},u.default.createElement(r.default,{disabled:e,displayType:"unstyled",onClick:a,title:Liferay.Language.get("search")},u.default.createElement(l.default,{symbol:"search"})))))};t.default=i}}));
//# sourceMappingURL=SearchInput.js.map