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