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