Liferay.Loader.define("account-admin-web@2.0.37/account_groups_admin/js/AccountGroupAccountEntriesManagementToolbarPropsTransformer",["module","exports","require","frontend-js-web"],(function(e,t,n){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{additionalProps:{accountGroupName:t,assignAccountGroupAccountEntriesURL:n,removeAccountGroupAccountEntriesURL:o,selectAccountGroupAccountEntriesURL:u},portletNamespace:a}=e;return c(c({},function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["additionalProps","portletNamespace"])),{},{onActionButtonClick:(e,{item:t})=>{var n;if("removeAccountGroupAccountEntries"===(null==t||null===(n=t.data)||void 0===n?void 0:n.action)&&confirm(Liferay.Language.get("are-you-sure-you-want-to-remove-the-selected-accounts"))){const e=document.getElementById("".concat(a,"fm"));e&&(0,r.postForm)(e,{data:{accountEntryIds:Liferay.Util.listCheckedExcept(e,"".concat(a,"allRowIds"))},url:o})}},onCreateButtonClick:()=>{(0,r.openSelectionModal)({buttonAddLabel:Liferay.Language.get("assign"),multiple:!0,onSelect:e=>{if(!(null==e?void 0:e.length))return;const t=document.getElementById("".concat(a,"fm"));if(t){const o=e.map((e=>e.value));(0,r.postForm)(t,{data:{accountEntryIds:o.join(",")},url:n})}},title:Liferay.Util.sub(Liferay.Language.get("assign-accounts-to-x"),t),url:u})}})};var r=n("frontend-js-web");function o(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 c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}}}));
//# sourceMappingURL=AccountGroupAccountEntriesManagementToolbarPropsTransformer.js.map