Liferay.Loader.define("@liferay/object-js-components-web@1.0.33/components/Select/BaseSelect",["module","exports","require","@frontend-taglib-clay$clayui/autocomplete","@frontend-taglib-clay$clayui/drop-down","liferay!frontend-js-react-web$react","../FieldBase","./index.scss"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.BaseSelect=function BaseSelect(e){let{children:t,className:r,disabled:i,dropdownActive:c,error:u,feedbackMessage:d,id:f,label:s,placeholder:p=Liferay.Language.get("choose-an-option"),required:b,setDropdownActive:y,trigger:O,value:g}=e,j=function _objectWithoutProperties(e,t){if(null==e)return{};var r,n,o=function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,["children","className","disabled","dropdownActive","error","feedbackMessage","id","label","placeholder","required","setDropdownActive","trigger","value"]);const w=(0,a.useRef)(null);return a.default.createElement(l.FieldBase,{className:r,disabled:i,errorMessage:u,helpMessage:d,id:f,label:s,required:b},a.default.createElement(n.default,null,O?(0,a.cloneElement)(O,function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach((function(t){_defineProperty(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({disabled:i,placeholder:p,ref:w,value:g},j)):a.default.createElement(n.default.Input,_extends({defaultValue:g,disabled:i,onClick:()=>y((e=>!e)),placeholder:p,ref:w,value:g},j)),a.default.createElement(n.default.DropDown,_extends({active:c,alignElementRef:O?void 0:w,alignmentByViewport:!0,closeOnClickOutside:!0,onSetActive:y},j),a.default.createElement(o.default.ItemList,j,t))))};var n=_interopRequireDefault(r("@frontend-taglib-clay$clayui/autocomplete")),o=_interopRequireDefault(r("@frontend-taglib-clay$clayui/drop-down")),a=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={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var a=n?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react")),l=r("../FieldBase");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}}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r("./index.scss")}}));
//# sourceMappingURL=BaseSelect.js.map