Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.130/page_editor/app/selectors/selectPageContentDropdownItems",["module","exports","require","frontend-js-web","./selectPageContents"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.selectPageContentDropdownItems=function(e,t=""){return r=>{var a;const o=null===(a=(0,n.selectPageContents)(r))||void 0===a?void 0:a.find((t=>t.classPK===e));if(!o)return null;const{addItems:l,editImage:u,editURL:g,permissionsURL:p,viewItemsURL:c,viewUsagesURL:f}=o.actions||{},d=[];return g&&d.push({href:g,label:t?(0,i.sub)(Liferay.Language.get("edit-x"),t):Liferay.Language.get("edit"),symbolLeft:"pencil"}),u&&d.push(s(s({},u),{},{label:Liferay.Language.get("edit-image")})),c&&d.push({label:Liferay.Language.get("view-items"),onClick:()=>(0,i.openModal)({title:Liferay.Language.get("view-items"),url:c}),symbolLeft:"list-ul"}),l&&(d.push({type:"divider"}),d.push({items:l,label:Liferay.Language.get("add-items"),symbolLeft:"plus",type:"contextual"})),p&&(d.push({type:"divider"}),d.push({label:t?(0,i.sub)(Liferay.Language.get("edit-x-permissions"),t):Liferay.Language.get("permissions"),onClick:()=>(0,i.openModal)({title:t?(0,i.sub)(Liferay.Language.get("edit-x-permissions"),t):Liferay.Language.get("permissions"),url:p}),symbolLeft:"password-policies"})),f&&(d.push({type:"divider"}),d.push({label:t?(0,i.sub)(Liferay.Language.get("view-x-usages"),t):Liferay.Language.get("view-usages"),onClick:()=>(0,i.openModal)({title:t?(0,i.sub)(Liferay.Language.get("view-x-usages"),t):Liferay.Language.get("view-usages"),url:f}),symbolLeft:"list-ul"})),d.length?d:null}};var i=r("frontend-js-web"),n=r("./selectPageContents");function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}}}));
//# sourceMappingURL=selectPageContentDropdownItems.js.map