Liferay.Loader.define("change-tracking-web@2.0.87/publications/js/components/ViewPublicationsDropdownMenu",["module","exports","require","@frontend-taglib-clay$clayui/button","@frontend-taglib-clay$clayui/drop-down","liferay!frontend-js-react-web$react","./manage-collaborators-modal/ManageCollaborators"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function ViewPublicationsDropdownMenu(e){let{checkoutURL:t,deleteURL:r,editURL:o,isPublicationTemplate:s,namespace:u,permissionsURL:c,publishURL:f,reviewURL:p,scheduleURL:d,spritemap:g}=e,y=function _objectWithoutProperties(e,t){if(null==e)return{};var r,a,n=function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var r,a,n={},l=Object.keys(e);for(a=0;a<l.length;a++)r=l[a],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)r=l[a],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,["checkoutURL","deleteURL","editURL","isPublicationTemplate","namespace","permissionsURL","publishURL","reviewURL","scheduleURL","spritemap"]);const[b,m]=(0,l.useState)(!1);if(!u)return l.default.createElement(n.ClayDropDownWithItems,{alignmentPosition:n.Align.BottomLeft,items:[{href:p,label:Liferay.Language.get("review-changes"),symbolLeft:"list-ul"}],spritemap:g,trigger:l.default.createElement(a.ClayButtonWithIcon,{displayType:"unstyled",small:!0,spritemap:g,symbol:"ellipsis-v"})});const h=[];t&&h.push({href:t,label:Liferay.Language.get("work-on-publication"),symbolLeft:"radio-button"});o&&h.push({href:o,label:Liferay.Language.get("edit"),symbolLeft:"pencil"});s||h.push({href:p,label:Liferay.Language.get("review-changes"),symbolLeft:"list-ul"});c&&(h.push({label:Liferay.Language.get("invite-users"),onClick:()=>m(!0),symbolLeft:"users"}),h.push({href:c,label:Liferay.Language.get("permissions"),symbolLeft:"password-policies"}));r&&h.push({type:"divider"},{href:r,label:Liferay.Language.get("delete"),symbolLeft:"times-circle"});f&&h.push({type:"divider"});d&&h.push({href:d,label:Liferay.Language.get("schedule"),symbolLeft:"calendar"});f&&h.push({href:f,label:Liferay.Language.get("publish"),symbolLeft:"change"});const L=l.default.createElement(n.ClayDropDownWithItems,{alignmentPosition:n.Align.BottomLeft,items:h,spritemap:g,trigger:l.default.createElement(a.ClayButtonWithIcon,{displayType:"unstyled",small:!0,spritemap:g,symbol:"ellipsis-v"})});return s?L:l.default.createElement(i.default,_extends({namespace:u,setShowModal:m,showModal:b,trigger:L},y))};var a=r("@frontend-taglib-clay$clayui/button"),n=r("@frontend-taglib-clay$clayui/drop-down"),l=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={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var l=a?Object.getOwnPropertyDescriptor(e,n):null;l&&(l.get||l.set)?Object.defineProperty(r,n,l):r[n]=e[n]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react")),i=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r("./manage-collaborators-modal/ManageCollaborators"));function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}}}));
//# sourceMappingURL=ViewPublicationsDropdownMenu.js.map