Liferay.Loader.define("@liferay/document-library-web@6.0.111/document_library/js/DLFileEntryDropdownPropsTransformer",["module","exports","require","frontend-js-web"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(t){let{items:r,portletNamespace:n}=t;return a(a({},function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(t,["items","portletNamespace"])),{},{items:r.map((t=>{var r;return"group"===(null==t?void 0:t.type)?a(a({},t),{},{items:null===(r=t.items)||void 0===r?void 0:r.map((t=>a(a({},t),{},{onClick(r){var o;const a=null===(o=t.data)||void 0===o?void 0:o.action;a&&(r.preventDefault(),e[a](t.data,n))}})))}):a(a({},t),{},{onClick(r){var o;const a=null===(o=t.data)||void 0===o?void 0:o.action;a&&(r.preventDefault(),e[a](t.data,n))}})}))})};var n=r("frontend-js-web");function o(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 a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const e={checkin({checkinURL:e},t){Liferay.componentReady("".concat(t,"DocumentLibraryCheckinModal")).then((r=>{r.open(((r,o)=>{let a=e;r&&(a=(0,n.addParams)("".concat(t,"versionIncrease=").concat(encodeURIComponent(r)),a)),o&&(a=(0,n.addParams)("".concat(t,"changeLog=").concat(encodeURIComponent(o)),a)),a=(0,n.addParams)("".concat(t,"updateVersionDetails=true"),a),(0,n.navigate)(a)}))}))},compareTo({compareVersionURL:e,dialogTitle:t,jsNamespace:r,namespace:o,selectFileVersionURL:a}){(0,n.openSelectionModal)({id:"".concat(r,"compareFileVersions"),onSelect(t){let r=e;r=(0,n.addParams)("".concat(o,"sourceFileVersionId=").concat(t.sourceversion),r),r=(0,n.addParams)("".concat(o,"targetFileVersionId=").concat(t.targetversion),r),(0,n.navigate)(r)},selectEventName:"".concat(o,"selectFileVersionFm"),title:t,url:a})},delete({deleteURL:e}){(0,n.openConfirmModal)({message:Liferay.Language.get("are-you-sure-you-want-to-delete-this"),onConfirm:t=>t&&submitForm(document.hrefFm,e)})},deleteVersion({deleteURL:e}){(0,n.openConfirmModal)({message:Liferay.Language.get("are-you-sure-you-want-to-delete-this"),onConfirm:t=>{t&&submitForm(document.hrefFm,e)}})},editImage({fileEntryId:e,imageURL:t},r){window["".concat(r,"editWithImageEditor")]({fileEntryId:e,imageURL:t})},editOfficeDocument({editURL:e},t){Liferay.componentReady("".concat(t,"DocumentLibraryOpener")).then((t=>{t.edit({formSubmitURL:e})}))},move({parameterName:e,parameterValue:t},r){window["".concat(r,"move")](1,e,t)},permissions({permissionsURL:e}){(0,n.openModal)({title:Liferay.Language.get("permissions"),url:e})},publish({publishURL:e}){(0,n.openConfirmModal)({message:Liferay.Language.get("are-you-sure-you-want-to-publish-the-selected-document"),onConfirm:t=>{t&&(location.href=e)}})}}}}));
//# sourceMappingURL=DLFileEntryDropdownPropsTransformer.js.map