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