Liferay.Loader.define("@liferay/frontend-data-set-web@1.0.31/management_bar/components/CreationMenu",["module","exports","require","@frontend-taglib-clay$clayui/button","@frontend-taglib-clay$clayui/drop-down","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","../../FrontendDataSetContext","../../utils/actionItems/index"],(function(e,t,n){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n("@frontend-taglib-clay$clayui/button"),r=c(n("@frontend-taglib-clay$clayui/drop-down")),l=(c(n("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=u();if(t&&t.has(e))return t.get(e);var n={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var l=a?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(n,r,l):n[r]=e[r]}n.default=e,t&&t.set(e,n);return n}(n("liferay!frontend-js-react-web$react"))),o=c(n("../../FrontendDataSetContext")),i=n("../../utils/actionItems/index");function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function c(e){return e&&e.__esModule?e:{default:e}}var f=function({primaryItems:e}){const[t,n]=(0,l.useState)(!1),u=(0,l.useContext)(o.default);return(null==e?void 0:e.length)>0&&l.default.createElement("ul",{className:"navbar-nav"},l.default.createElement("li",{className:"nav-item"},e.length>1?l.default.createElement(r.default,{active:t,onActiveChange:n,trigger:l.default.createElement(a.ClayButtonWithIcon,{className:"nav-btn nav-btn-monospaced",symbol:"plus"})},l.default.createElement(r.default.ItemList,null,e.map(((e,t)=>l.default.createElement(r.default.Item,{key:t,onClick:t=>{t.preventDefault(),n(!1),(0,i.triggerAction)(e,u)}},e.label))))):l.default.createElement(a.ClayButtonWithIcon,{className:"nav-btn nav-btn-monospaced","data-tooltip-align":"top",onClick:()=>(0,i.triggerAction)(e[0],u),symbol:"plus",title:e[0].label})))};t.default=f}}));
//# sourceMappingURL=CreationMenu.js.map