Liferay.Loader.define("@liferay/object-js-components-web@1.0.58/components/Select/BaseSelect",["module","exports","require","@frontend-taglib-clay$clayui/autocomplete","@frontend-taglib-clay$clayui/drop-down","@frontend-taglib-clay$clayui/icon","liferay!frontend-js-react-web$classnames","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:u,dropdownActive:d,error:s,feedbackMessage:f,id:p,label:b,placeholder:y=Liferay.Language.get("choose-an-option"),required:g,setDropdownActive:O,trigger:j,value:w}=e,m=function _objectWithoutProperties(e,t){if(null==e)return{};var r,n,a=function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["children","className","disabled","dropdownActive","error","feedbackMessage","id","label","placeholder","required","setDropdownActive","trigger","value"]);const v=(0,i.useRef)(null);return i.default.createElement(c.FieldBase,{className:r,disabled:u,errorMessage:s,helpMessage:f,id:p,label:b,required:g},i.default.createElement(n.default,null,j?(0,i.cloneElement)(j,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:u,placeholder:y,ref:v,value:w},m)):i.default.createElement(i.default.Fragment,null,i.default.createElement(l.default,{className:(0,o.default)("base-select__input-icon",{"base-select__input-icon--disabled":u}),onClick:()=>!u&&O((e=>!e)),symbol:"caret-double"}),i.default.createElement(n.default.Input,_extends({defaultValue:w,disabled:u,onClick:()=>O((e=>!e)),placeholder:y,ref:v,value:w},m))),i.default.createElement(n.default.DropDown,_extends({active:d,alignElementRef:j?void 0:v,alignmentByViewport:!0,closeOnClickOutside:!0,onSetActive:O},m),i.default.createElement(a.default.ItemList,m,t))))};var n=_interopRequireDefault(r("@frontend-taglib-clay$clayui/autocomplete")),a=_interopRequireDefault(r("@frontend-taglib-clay$clayui/drop-down")),l=_interopRequireDefault(r("@frontend-taglib-clay$clayui/icon")),o=_interopRequireDefault(r("liferay!frontend-js-react-web$classnames")),i=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 a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var l=n?Object.getOwnPropertyDescriptor(e,a):null;l&&(l.get||l.set)?Object.defineProperty(r,a,l):r[a]=e[a]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react")),c=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