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