Liferay.Loader.define("portal-search-ranking-web@3.0.58/js/RankingPortletManagementToolbarPropsTransformer",["module","exports","require","frontend-js-web"],(function(e,t,n){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function propsTransformer(e){let{additionalProps:{activateResultsRankingEntryURL:t,deactivateResultsRankingEntryURL:n,deleteResultsRankingEntryURL:o},portletNamespace:a}=e,c=function _objectWithoutProperties(e,t){if(null==e)return{};var n,r,o=function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["additionalProps","portletNamespace"]);return _objectSpread(_objectSpread({},c),{},{onActionButtonClick:(e,{item:c})=>{var s;const i=null==c||null===(s=c.data)||void 0===s?void 0:s.action;"activateResultsRankingsEntries"===i?(()=>{const e=document.getElementById("".concat(a,"fm")),n=document.getElementById("".concat(a,"resultsRankingEntries"));e&&n&&(0,r.postForm)(e,{data:{actionFormInstanceIds:(0,r.getCheckedCheckboxes)(n,"".concat(a,"allRowIds"))},url:t})})():"deactivateResultsRankingsEntries"===i?(()=>{const e=document.getElementById("".concat(a,"fm")),t=document.getElementById("".concat(a,"resultsRankingEntries"));e&&t&&(0,r.postForm)(e,{data:{actionFormInstanceIds:(0,r.getCheckedCheckboxes)(t,"".concat(a,"allRowIds"))},url:n})})():"deleteResultsRankingsEntries"===i&&(0,r.openConfirmModal)({message:Liferay.Language.get("are-you-sure-you-want-to-delete-this"),onConfirm:e=>{if(e){const e=document.getElementById("".concat(a,"fm")),t=document.getElementById("".concat(a,"resultsRankingEntries"));e&&t&&(0,r.postForm)(e,{data:{actionFormInstanceIds:(0,r.getCheckedCheckboxes)(t,"".concat(a,"allRowIds"))},url:o})}}})}})};var r=n("frontend-js-web");function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach((function(t){_defineProperty(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}}}));
//# sourceMappingURL=RankingPortletManagementToolbarPropsTransformer.js.map