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