webpackJsonp([24],{1853:function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){return(0,s.default)({},t,{createIncomingHookRequest:e.requests.integrations.createIncomingHook})}function a(e){return{actions:(0,c.bindActionCreators)({createIncomingHook:d.createIncomingHook},e)}}Object.defineProperty(t,"__esModule",{value:!0});var u=r(19),s=n(u),i=r(41),c=r(20),d=r(672),f=r(2158),l=n(f);t.default=(0,i.connect)(o,a)(l.default)},2158:function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(113),a=n(o),u=r(114),s=n(u),i=r(6),c=n(i),d=r(4),f=n(d),l=r(5),p=n(l),m=r(7),g=n(m),k=r(8),v=n(k),_=r(1),h=n(_),H=r(44),b=r(2),I=n(b),q=r(1829),R=n(q),y={id:"integrations.add",defaultMessage:"Add"},w={id:"add_incoming_webhook.save",defaultMessage:"Save"},E=function(e){function t(e){var r=this;(0,f.default)(this,t);var n=(0,g.default)(this,(t.__proto__||(0,c.default)(t)).call(this,e));return n.addIncomingHook=function(){var e=(0,s.default)(a.default.mark(function e(t){var o;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n.setState({serverError:""}),e.next=3,n.props.actions.createIncomingHook(t);case 3:if(!(o=e.sent)){e.next=7;break}return H.browserHistory.push("/"+n.props.team.name+"/integrations/confirm?type=incoming_webhooks&id="+o.id),e.abrupt("return");case 7:n.props.createIncomingHookRequest.error&&n.setState({serverError:n.props.createIncomingHookRequest.error.message});case 8:case"end":return e.stop()}},e,r)}));return function(t){return e.apply(this,arguments)}}(),n.state={serverError:""},n}return(0,v.default)(t,e),(0,p.default)(t,[{key:"render",value:function(){return h.default.createElement(R.default,{team:this.props.team,header:y,footer:w,action:this.addIncomingHook,serverError:this.state.serverError})}}]),t}(h.default.PureComponent);E.propTypes={team:I.default.object.isRequired,createIncomingHookRequest:I.default.object.isRequired,actions:I.default.shape({createIncomingHook:I.default.func.isRequired}).isRequired},t.default=E}});
//# sourceMappingURL=24.a1c7e760229a83a0603a.js.map