Liferay.Loader.define("@liferay/object-js-components-web@1.0.33/components/AutoComplete/index",["module","exports","require","@frontend-taglib-clay$clayui/drop-down","liferay!frontend-js-react-web$react","../FieldBase","./index.scss","./CustomSelect"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function AutoComplete({children:e,className:t,contentRight:a,disabled:c,emptyStateMessage:d,error:i,feedbackMessage:o,hasEmptyItem:f,id:s,items:m,label:p,onChangeQuery:g,onSelectEmptyStateItem:y,onSelectItem:b,placeholder:h,query:v,required:C=!1,value:E}){const[j,w]=(0,r.useState)(!1),_={id:"",label:Liferay.Language.get("choose-an-option")};return r.default.createElement(n.FieldBase,{className:t,disabled:c,errorMessage:i,helpMessage:o,id:s,label:p,required:C},r.default.createElement(l.default,{active:!c&&j,onActiveChange:e=>w(!c&&e),trigger:r.default.createElement(u.CustomSelect,{contentRight:r.default.createElement(r.default.Fragment,null,E&&a),disabled:c,placeholder:null!=h?h:Liferay.Language.get("choose-an-option"),value:E})},r.default.createElement(l.default.Search,{onChange:g,placeholder:Liferay.Language.get("search"),value:v}),m.length?r.default.createElement(l.default.ItemList,null,f&&r.default.createElement(l.default.Item,{onClick:()=>{w(!1),y&&y(_)}},r.default.createElement("div",{className:"d-flex justify-content-between"},r.default.createElement("div",null,_.label))),m.map(((t,a)=>r.default.createElement(l.default.Item,{key:a,onClick:()=>{w(!1),b(t)}},e&&e(t))))):r.default.createElement(l.default.ItemList,null,r.default.createElement(l.default.Item,null,d))))};var l=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(a("@frontend-taglib-clay$clayui/drop-down")),r=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={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=l?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(a,r,n):a[r]=e[r]}a.default=e,t&&t.set(e,a);return a}(a("liferay!frontend-js-react-web$react")),n=a("../FieldBase");a("./index.scss");var u=a("./CustomSelect");function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}}}));
//# sourceMappingURL=index.js.map