(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[35],{X494:function(t,e,a){"use strict";var n=a("g09b");Object.defineProperty(e,"__esModule",{value:!0}),e.querySocialiteClients=l,e.updateSocialiteClients=d;var r=n(a("d6i3")),i=n(a("1l/V")),u=n(a("sy1d"));function l(t){return c.apply(this,arguments)}function c(){return c=(0,i.default)(r.default.mark(function t(e){return r.default.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,u.default)("/api/socialiteClients",{params:e}));case 1:case"end":return t.stop()}},t)})),c.apply(this,arguments)}function d(t){return s.apply(this,arguments)}function s(){return s=(0,i.default)(r.default.mark(function t(e){return r.default.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,u.default)("/api/socialiteClients/".concat(e.id),{method:"PUT",data:e}));case 1:case"end":return t.stop()}},t)})),s.apply(this,arguments)}},muqs:function(t,e,a){"use strict";var n=a("g09b");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(a("gWZ8")),i=n(a("p0pE")),u=n(a("d6i3")),l=a("X494"),c={namespace:"adminSocialiteClient",state:{data:{list:[],pagination:{}}},effects:{fetch:u.default.mark(function t(e,a){var n,r,i,c;return u.default.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return n=e.payload,r=a.call,i=a.put,t.next=4,r(l.querySocialiteClients,n);case 4:return c=t.sent,t.next=7,i({type:"save",payload:c});case 7:case"end":return t.stop()}},t)}),update:u.default.mark(function t(e,a){var n,r,i,c,d;return u.default.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return n=e.payload,r=e.callback,i=a.call,c=a.put,t.next=4,i(l.updateSocialiteClients,n);case 4:return d=t.sent,t.next=7,c({type:"edit",payload:d});case 7:r&&r();case 8:case"end":return t.stop()}},t)})},reducers:{save:function(t,e){return(0,i.default)({},t,{data:e.payload})},edit:function(t,e){if(void 0===t)return{data:{list:[],pagination:{}}};var a=(0,r.default)(t.data.list);return a.forEach(function(t,n){t.id===e.payload.data.id&&(a[n]=e.payload.data)}),{data:(0,i.default)({},t.data,{list:a})}}}},d=c;e.default=d}}]);