Liferay.Loader.define("@liferay/address-web@1.0.16/js/RegionsManagementToolbarPropsTransformer",["module","exports","require","frontend-js-web"],(function(e,t,o){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function propsTransformer(e){let{portletNamespace:t}=e,o=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,["portletNamespace"]);return _objectSpread(_objectSpread({},o),{},{onActionButtonClick:(e,{item:o})=>{const n=null==o?void 0:o.data,c=null==n?void 0:n.action;"activateRegions"===c?(e=>{const o=document.getElementById("".concat(t,"fm"));o&&(0,r.postForm)(o,{data:{regionIds:(0,r.getCheckedCheckboxes)(o,"".concat(t,"allRowIds"))},url:null==e?void 0:e.activateRegionsURL})})(n):"deactivateRegions"===c?(e=>{if(confirm(Liferay.Language.get("are-you-sure-you-want-to-deactivate-the-selected-regions"))){const o=document.getElementById("".concat(t,"fm"));o&&(0,r.postForm)(o,{data:{regionIds:(0,r.getCheckedCheckboxes)(o,"".concat(t,"allRowIds"))},url:null==e?void 0:e.deactivateRegionsURL})}})(n):"deleteRegions"===c&&(e=>{if(confirm(Liferay.Language.get("are-you-sure-you-want-to-delete-the-selected-regions"))){const o=document.getElementById("".concat(t,"fm"));o&&(0,r.postForm)(o,{data:{regionIds:(0,r.getCheckedCheckboxes)(o,"".concat(t,"allRowIds"))},url:null==e?void 0:e.deleteRegionsURL})}})(n)}})};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=RegionsManagementToolbarPropsTransformer.js.map