(this.webpackJsonp=this.webpackJsonp||[]).push([[129],{cfYI:function(e,t,n){},oeDK:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,u=void 0;try{for(var l,o=e[Symbol.iterator]();!(a=(l=o.next()).done)&&(n.push(l.value),!t||n.length!==t);a=!0);}catch(e){r=!0,u=e}finally{try{!a&&o.return&&o.return()}finally{if(r)throw u}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},u=n("q1tI"),l=s(u),o=n("eO8H");n("cfYI");var c=s(n("CnBM")),i=s(n("HUFq"));function s(e){return e&&e.__esModule?e:{default:e}}var f=(0,c.default)({loader:function(){return Promise.all([n.e(0),n.e(1),n.e(3),n.e(114)]).then(n.t.bind(null,"Fu44",7))},loading:i.default}),d=(0,c.default)({loader:function(){return Promise.all([n.e(0),n.e(1),n.e(3),n.e(115)]).then(n.t.bind(null,"6P6j",7))},loading:i.default});t.default=function(e){var t=e.match.params.username,n=e.history.location.pathname,c=e.user,i=(0,u.useState)("undo"),s=r(i,2),p=s[0],m=s[1],E=(0,u.useState)(0),h=r(E,2),v=h[0],y=h[1],b=(0,u.useState)(0),_=r(b,2),j=_[0],S=_[1],g=(0,u.useState)(0),w=r(g,2),N=w[0],O=w[1],P=(0,u.useState)(!0),k=r(P,2),I=(k[0],k[1],e.current_user);function M(t,n){var a=n;"apply"===t?O(N-n):"undo"===t?S(j-n):(y(0),a=v),(a||0===a)&&e.deleteUndoEvent(a)}return(0,u.useEffect)((function(){t&&I&&I.login!==t&&e.history.push("/"+t)}),[I,t]),(0,u.useEffect)((function(){c&&(S(c.undo_transfer_projects),O(c.undo_join_projects),y(c.undo_messages))}),[c]),(0,u.useEffect)((function(){n&&t&&(n==="/"+t+"/notice"&&m("undo"),n==="/"+t+"/notice/apply"&&m("apply"))}),[n,c]),l.default.createElement("div",null,l.default.createElement("ul",{className:"noticeMenu"},l.default.createElement("li",{className:"undo"===p?"active":""},l.default.createElement(o.Link,{to:"/"+t+"/notice"},l.default.createElement("span",null,"接收仓库"),j?l.default.createElement("span",{className:"unNum"},j):"")),l.default.createElement("li",{className:"apply"===p?"active":""},l.default.createElement(o.Link,{to:"/"+t+"/notice/apply"},l.default.createElement("span",null,"成员申请"),N?l.default.createElement("span",{className:"unNum"},N):""))),l.default.createElement(o.Switch,null,l.default.createElement(o.Route,{path:"/:username/notice/apply",render:function(t){return l.default.createElement(f,a({},e,t,{deleteEvent:M}))}}),l.default.createElement(o.Route,{path:"/:username/notice",render:function(t){return l.default.createElement(d,a({},e,t,{deleteEvent:M}))}})))}}}]);