webpackJsonp([26],{2147:function(e,t,r){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function n(e,t){return(0,o.default)({},t)}function d(e){return{actions:(0,i.bindActionCreators)({addCommand:f.addCommand},e)}}Object.defineProperty(t,"__esModule",{value:!0});var u=r(19),o=a(u),s=r(29),i=r(20),f=r(743),c=r(2390),l=a(c);t.default=(0,s.connect)(n,d)(l.default)},2390:function(e,t,r){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var n=r(76),d=a(n),u=r(77),o=a(u),s=r(6),i=a(s),f=r(4),c=a(f),l=r(5),m=a(l),p=r(7),v=a(p),_=r(8),h=a(_),b=r(2),C=a(b),y=r(1),E=a(y),M=r(41),g=r(2108),k=a(g),w={id:"integrations.add",defaultMessage:"Add"},x={id:"add_command.save",defaultMessage:"Save"},j=function(e){function t(e){var r=this;(0,c.default)(this,t);var a=(0,v.default)(this,(t.__proto__||(0,i.default)(t)).call(this,e));return a.addCommand=function(){var e=(0,o.default)(d.default.mark(function e(t){var n,u,o;return d.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a.setState({serverError:""}),e.next=3,a.props.actions.addCommand(t);case 3:if(n=e.sent,u=n.data,o=n.error,!u){e.next=9;break}return M.browserHistory.push("/"+a.props.team.name+"/integrations/commands/confirm?type=commands&id="+u.id),e.abrupt("return");case 9:o&&a.setState({serverError:o.message});case 10:case"end":return e.stop()}},e,r)}));return function(t){return e.apply(this,arguments)}}(),a.state={serverError:""},a}return(0,h.default)(t,e),(0,m.default)(t,[{key:"render",value:function(){return E.default.createElement(k.default,{team:this.props.team,header:w,footer:x,renderExtra:"",action:this.addCommand,serverError:this.state.serverError})}}]),t}(E.default.PureComponent);j.propTypes={team:C.default.object,actions:C.default.shape({addCommand:C.default.func.isRequired}).isRequired},t.default=j}});
//# sourceMappingURL=26.7af66d7bb463c22345a8.js.map