Liferay.Loader.define("segments-web@3.0.68/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=u(a("@frontend-taglib-clay$clayui/button")),r=u(a("@frontend-taglib-clay$clayui/drop-down")),l=u(a("@frontend-taglib-clay$clayui/icon")),o=u(a("liferay!frontend-js-react-web$classnames")),c=(u(a("liferay!frontend-js-react-web$prop-types")),function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();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 i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function u(e){return e&&e.__esModule?e:{default:e}}var f=function({className:e,conjunctionName:t,editing:a,onSelect:i,supportedConjunctions:u=[]}){const[f,s]=(0,c.useState)(!1),d=(0,o.default)({"conjunction-button":a,"conjunction-label":!a},e),[y,p]=(0,c.useState)(null);return(0,c.useEffect)((()=>{const e=u.find((e=>e.name.toLowerCase()===t.toLowerCase()));p(e.label)}),[t,u]),a?c.default.createElement(r.default,{active:f,className:d,onActiveChange:s,trigger:c.default.createElement(n.default,{className:"text-capitalize",displayType:"secondary",small:!0},y,c.default.createElement(l.default,{className:"ml-2",symbol:"caret-bottom"}))},c.default.createElement(r.default.ItemList,null,u.map((e=>c.default.createElement(r.default.Item,{className:"text-capitalize",key:e.name,onClick:()=>function(e){s(!1),i(e)}(e.name)},e.label))))):c.default.createElement("div",{className:d},y)};t.default=f}}));
//# sourceMappingURL=Conjunction.es.js.map