Liferay.Loader.define("segments-web@3.0.77/js/components/criteria_builder/Conjunction.es",["module","exports","require","@frontend-taglib-clay$clayui/button","@frontend-taglib-clay$clayui/drop-down","@frontend-taglib-clay$clayui/icon","liferay!frontend-js-react-web$classnames","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","../../utils/types.es"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=_interopRequireDefault(a("@frontend-taglib-clay$clayui/button")),r=_interopRequireDefault(a("@frontend-taglib-clay$clayui/drop-down")),l=_interopRequireDefault(a("@frontend-taglib-clay$clayui/icon")),i=_interopRequireDefault(a("liferay!frontend-js-react-web$classnames")),o=(_interopRequireDefault(a("liferay!frontend-js-react-web$prop-types")),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={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(a,r,l):a[r]=e[r]}a.default=e,t&&t.set(e,a);return a}(a("liferay!frontend-js-react-web$react")));a("../../utils/types.es");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}}var c=function Conjunction({className:e,conjunctionName:t,editing:a,onSelect:c,supportedConjunctions:u=[]}){const[f,d]=(0,o.useState)(!1),s=(0,i.default)({"conjunction-button":a,"conjunction-label":!a},e),[p,y]=(0,o.useState)(null);return(0,o.useEffect)((()=>{const e=u.find((e=>e.name.toLowerCase()===t.toLowerCase()));y(e.label)}),[t,u]),a?o.default.createElement(r.default,{active:f,className:s,onActiveChange:d,trigger:o.default.createElement(n.default,{className:"text-capitalize",displayType:"secondary",small:!0},p,o.default.createElement(l.default,{className:"ml-2",symbol:"caret-bottom"}))},o.default.createElement(r.default.ItemList,null,u.map((e=>o.default.createElement(r.default.Item,{className:"text-capitalize",key:e.name,onClick:()=>function _handleItemClick(e){d(!1),c(e)}(e.name)},e.label))))):o.default.createElement("div",{className:s},p)};t.default=c}}));
//# sourceMappingURL=Conjunction.es.js.map