this.nisje=this.nisje||{},this.nisje.groups=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=537)}({0:function(t,e){!function(){t.exports=this.wp.element}()},1:function(t,e){!function(){t.exports=this.wp.i18n}()},14:function(t,e){!function(){t.exports=this.nisje.settings}()},17:function(t,e){!function(){t.exports=this.wp.data}()},18:function(t,e,n){"use strict";function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}n.d(e,"a",(function(){return r}))},2:function(t,e){!function(){t.exports=this.lodash}()},26:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(44);function o(t,e){if(null==t)return{};var n,o,i=Object(r.a)(t,e);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(t);for(o=0;o<u.length;o++)n=u[o],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}},35:function(t,e){!function(){t.exports=this.wp.apiFetch}()},41:function(t,e){!function(){t.exports=this.nisje.views}()},42:function(t,e){!function(){t.exports=this.wp.dataControls}()},44:function(t,e,n){"use strict";function r(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}n.d(e,"a",(function(){return r}))},5:function(t,e){!function(){t.exports=this.nisje.components}()},537:function(t,e,n){"use strict";n.r(e),n.d(e,"InviteGroupMembersModal",(function(){return _})),n.d(e,"LeaveGroupModal",(function(){return I}));var r={};n.r(r),n.d(r,"removeInviteId",(function(){return b}));var o={};n.r(o),n.d(o,"getInviteIds",(function(){return d}));var i=n(42),u=n(17),c=n(6),s=n(2),a=n(14);function f(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function p(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?f(Object(n),!0).forEach((function(e){Object(c.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var l={invites:Object(a.getOption)("groupInvites",[])};function b(t){return{type:"REMOVE_INVITE_ID",id:t}}function d(t){return t.invites}Object(u.registerStore)("nisje/groups",{reducer:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"REMOVE_INVITE_ID":return p(p({},t),{},{invites:Object(s.without)(t.invites,e.id)});default:return t}},controls:i.controls,actions:r,selectors:o});var O=n(18),v=n(26),j=n(0),y=n(1),g=n(35),h=n.n(g),m=n(5);var _=function(t){var e=t.id,n=t.onRequestClose,r=Object(v.a)(t,["id","onRequestClose"]),o=Object(u.useDispatch)("nisje/notices").createInfoNotice;return Object(j.createElement)(m.UserListModal,Object(O.a)({submit:Object(y.__)("Invite"),handleSubmit:function(t){var r=t.map((function(t){return t.userId}));h()({path:"/dekode-intranet/v1/groups/".concat(e,"/invite"),method:"POST",data:{user_ids:r}}).then((function(){n(),o("Invitations sent")}))},title:Object(y.__)("Invite"),onRequestClose:n},r))},w=n(41);var I=function(t){var e=t.id,n=Object(v.a)(t,["id"]);return Object(j.createElement)(w.DeleteModal,Object(O.a)({button:Object(y.__)("Leave group"),message:Object(y.__)("Are you sure you want to leave this group?"),redirect:"/groups/",restPath:"/buddypress/v1/groups/".concat(e,"/members/").concat(a.currentUserId),successMessage:Object(y.__)("Successfully left the group"),title:Object(y.__)("Leave group")},n))}},6:function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",(function(){return r}))}});