Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.169/page_editor/common/components/SearchForm",["module","exports","require","@frontend-taglib-clay$clayui/button","@frontend-taglib-clay$clayui/form","@frontend-taglib-clay$clayui/icon","frontend-js-web","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function SearchForm({className:t,label:r,onChange:u}){const i="pageEditorSearchFormInput".concat(e++),f=(0,c.useRef)((0,o.debounce)((e=>u(e)),100)),[d,s]=(0,c.useState)("");return c.default.createElement(n.default.Group,{className:t,role:"search"},c.default.createElement("label",{className:"sr-only",htmlFor:i},r||Liferay.Language.get("search-form")),c.default.createElement(n.ClayInput.Group,null,c.default.createElement(n.ClayInput.GroupItem,null,c.default.createElement(n.ClayInput,{id:i,insetAfter:!0,onChange:e=>{s(e.target.value),f.current(e.target.value)},placeholder:"".concat(Liferay.Language.get("search"),"..."),sizing:"sm",spellCheck:"false",value:d}),c.default.createElement(n.ClayInput.GroupInsetItem,{after:!0,tag:"span"},d?c.default.createElement(a.ClayButtonWithIcon,{"aria-label":Liferay.Language.get("clear-search"),borderless:!0,displayType:"secondary",monospaced:!1,onClick:()=>{s(""),f.current("")},size:"sm",symbol:d?"times":"search",title:Liferay.Language.get("clear-search")}):c.default.createElement(l.default,{className:"mt-0 search-icon",symbol:"search"})))))};var a=r("@frontend-taglib-clay$clayui/button"),n=_interopRequireWildcard(r("@frontend-taglib-clay$clayui/form")),l=_interopRequireDefault(r("@frontend-taglib-clay$clayui/icon")),o=r("frontend-js-web"),c=(_interopRequireDefault(r("liferay!frontend-js-react-web$prop-types")),_interopRequireWildcard(r("liferay!frontend-js-react-web$react")));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}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 r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var l=a?Object.getOwnPropertyDescriptor(e,n):null;l&&(l.get||l.set)?Object.defineProperty(r,n,l):r[n]=e[n]}return r.default=e,t&&t.set(e,r),r}let e=0}}));
//# sourceMappingURL=SearchForm.js.map