Liferay.Loader.define("@liferay/content-dashboard-web@2.0.69/js/ContentDashboardManagementToolbarPropsTransformer",["module","exports","require","frontend-js-web"],(function(e,t,l){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{portletNamespace:t}=e,l=function(e,t){if(null==e)return{};var l,o,n=function(e,t){if(null==e)return{};var l,o,n={},a=Object.keys(e);for(o=0;o<a.length;o++)l=a[o],t.indexOf(l)>=0||(n[l]=e[l]);return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)l=a[o],t.indexOf(l)>=0||Object.prototype.propertyIsEnumerable.call(e,l)&&(n[l]=e[l])}return n}(e,["portletNamespace"]);return a(a({},l),{},{onFilterDropdownItemClick(e,{item:l}){const n=null==l?void 0:l.data,a=null==n?void 0:n.action;var c;"selectAssetCategory"===a?(c=n,(0,o.openSelectionModal)({buttonAddLabel:Liferay.Language.get("select"),height:"70vh",iframeBodyCssClass:"",multiple:!0,onSelect:e=>{if(e){const l=Object.keys(e).filter((t=>!e[t].unchecked));let n=null==c?void 0:c.redirectURL;l.forEach((l=>{n=(0,o.addParams)("".concat(t,"assetCategoryId=").concat(e[l].categoryId),n)})),(0,o.navigate)(n)}},selectEventName:"".concat(t,"selectedAssetCategory"),size:"md",title:null==c?void 0:c.dialogTitle,url:null==c?void 0:c.selectAssetCategoryURL})):"selectAssetTag"===a?(e=>{(0,o.openSelectionModal)({buttonAddLabel:Liferay.Language.get("select"),height:"70vh",multiple:!0,onSelect:l=>{if(l){const n=l.map((e=>e.value));let a=null==e?void 0:e.redirectURL;n.forEach((e=>{a=(0,o.addParams)("".concat(t,"assetTagId=").concat(e),a)})),(0,o.navigate)(a)}},selectEventName:"".concat(t,"selectedAssetTag"),size:"lg",title:null==e?void 0:e.dialogTitle,url:null==e?void 0:e.selectTagURL})})(n):"selectAuthor"===a?(e=>{(0,o.openSelectionModal)({buttonAddLabel:Liferay.Language.get("select"),height:"70vh",multiple:!0,onSelect:l=>{if(l){let n=null==e?void 0:e.redirectURL;l.forEach((e=>{n=(0,o.addParams)("".concat(t,"authorIds=").concat(e.id),n)})),(0,o.navigate)(n)}},selectEventName:"".concat(t,"selectedAuthorItem"),size:"lg",title:null==e?void 0:e.dialogTitle,url:null==e?void 0:e.selectAuthorURL})})(n):"selectContentDashboardItemSubtype"===a?(e=>{(0,o.openSelectionModal)({buttonAddLabel:Liferay.Language.get("select"),height:"70vh",multiple:!0,onSelect:l=>{let n=null==e?void 0:e.redirectURL;l.forEach((e=>{n=(0,o.addParams)("".concat(t,"contentDashboardItemSubtypePayload=").concat(JSON.stringify(e)),n)})),(0,o.navigate)(n)},selectEventName:"".concat(t,"selectedContentDashboardItemSubtype"),size:"md",title:null==e?void 0:e.dialogTitle,url:null==e?void 0:e.selectContentDashboardItemSubtypeURL})})(n):"selectScope"===a?(e=>{(0,o.openSelectionModal)({height:"70vh",id:"".concat(t,"selectedScopeIdItem"),onSelect:l=>{(0,o.navigate)((0,o.addParams)("".concat(t,"scopeId=").concat(l.groupid),null==e?void 0:e.redirectURL))},selectEventName:"".concat(t,"selectedScopeIdItem"),size:"lg",title:null==e?void 0:e.dialogTitle,url:null==e?void 0:e.selectScopeURL})})(n):"selectFileExtension"===a&&(e=>{(0,o.openSelectionModal)({buttonAddLabel:Liferay.Language.get("select"),height:"70vh",multiple:!0,onSelect:l=>{let n=null==e?void 0:e.redirectURL;l.forEach((e=>{n=(0,o.addParams)("".concat(t,"fileExtension=").concat(e),n)})),(0,o.navigate)(n)},selectEventName:"".concat(t,"selectedFileExtension"),size:"md",title:null==e?void 0:e.dialogTitle,url:null==e?void 0:e.selectFileExtensionURL})})(n)}})};var o=l("frontend-js-web");function n(e,t){var l=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),l.push.apply(l,o)}return l}function a(e){for(var t=1;t<arguments.length;t++){var l=null!=arguments[t]?arguments[t]:{};t%2?n(Object(l),!0).forEach((function(t){c(e,t,l[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(l)):n(Object(l)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(l,t))}))}return e}function c(e,t,l){return t in e?Object.defineProperty(e,t,{value:l,enumerable:!0,configurable:!0,writable:!0}):e[t]=l,e}}}));
//# sourceMappingURL=ContentDashboardManagementToolbarPropsTransformer.js.map