Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.174/page_editor/app/selectors/selectPageContentDropdownItems",["module","exports","require","frontend-js-web","../utils/findPageContent"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.selectPageContentDropdownItems=function selectPageContentDropdownItems(e,t=""){return r=>{const a=(0,i.default)(r.pageContents,e);if(!a)return null;const{addItems:s,editImage:o,editURL:u,permissionsURL:l,viewItemsURL:g,viewUsagesURL:p}=a.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"}),o&&f.push(_objectSpread(_objectSpread({},o),{},{label:Liferay.Language.get("edit-image")})),g&&f.push({label:Liferay.Language.get("view-items"),onClick:()=>(0,n.openModal)({title:Liferay.Language.get("view-items"),url:g}),symbolLeft:"list-ul"}),s&&(f.push({type:"divider"}),f.push({items:s,label:Liferay.Language.get("add-items"),symbolLeft:"plus",type:"contextual"})),l&&(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:l}),symbolLeft:"password-policies"})),p&&(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:p}),symbolLeft:"list-ul"})),f.length?f:null}};var n=r("frontend-js-web"),i=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r("../utils/findPageContent"));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