(window.webpackJsonp=window.webpackJsonp||[]).push([[76],{29782:function(e,t,a){"use strict";a.r(t),function(e){a.d(t,"default",(function(){return u}));var n,i=a(2),s=a.n(i),o=a(2353),l=a(7326),r=a(7145),c=a(7124),d=a(9),m=a(6743),_=a.n(m),p=a(5950),v=a(8767),y=a(5929);let u=Object(o.observer)(n=class extends i.Component{constructor(e){super(e),this.state={isCopyingReleaseId:!1},this.handleCopyReleaseIdToClipboard=this.handleCopyReleaseIdToClipboard.bind(this),this.renderReleaseEditor=this.renderReleaseEditor.bind(this)}componentWillUnmount(){clearTimeout(this.copiedTimeout)}handleCopyReleaseIdToClipboard(){const t=e.get(this.props,"contextData.model.activeRelease.id","");this.state.isCopyingReleaseId||(r.default.copy(t),this.setState({isCopyingReleaseId:!0},(()=>{this.copiedTimeout=setTimeout((()=>this.setState({isCopyingReleaseId:!1})),3e3)})))}renderReleaseEditor(e){const t=Object(y.getStore)("CurrentUserStore");return e?s.a.createElement("div",{className:"release-info-editors__editor",key:e},s.a.createElement(v.default,{ref:"avatar",size:"medium",userId:e}),s.a.createElement("div",{className:"release-info-editors__editor--name"},p.default.getUserNameForId(e,t))):"Deactivated User"}renderReleaseIdCopyStatusIcon(){return this.state.isCopyingReleaseId?s.a.createElement(d.Icon,{name:"icon-state-success-stroke",className:"pm-icon pm-icon-normal success-tick-icon"}):s.a.createElement(d.Icon,{name:"icon-action-copy-stroke",className:"pm-icon pm-icon-normal"})}render(){const t=e.get(this.props,"contextData.model.activeRelease",{}),a=_()(e.get(t,"createdAt")).format("DD MMM YYYY, h:mm A"),n=e.get(t,"createdBy"),i=e.get(t,"id");return s.a.createElement("div",{className:"release-info-context-view-wrapper"},s.a.createElement(l.ContextBarViewHeader,{title:"Release details",onClose:this.props.onClose}),s.a.createElement("div",{className:"release-info-context-view"},s.a.createElement("div",{className:"release-info-context-view__entity"},s.a.createElement("div",{className:"release-info-context-view__entity__label"},"Release ID"),s.a.createElement("div",{className:"release-info-context-view__entity__content"},s.a.createElement("div",{className:"release-info-context-view__entity__content__id--entity",title:i},i),s.a.createElement(c.Button,{tooltip:"Copy",type:"icon",onClick:this.handleCopyReleaseIdToClipboard},this.renderReleaseIdCopyStatusIcon()))),s.a.createElement("div",{className:"release-info-context-view__entity"},s.a.createElement("div",{className:"release-info-context-view__entity__label"},"Created by"),s.a.createElement("div",{className:"release-info-context-view__entity__content"},this.renderReleaseEditor(n))),s.a.createElement("div",{className:"release-info-context-view__entity"},s.a.createElement("div",{className:"release-info-context-view__entity__label"},"Created on"),s.a.createElement("div",{className:"release-info-context-view__entity__content"},s.a.createElement("div",{className:"release-info-context-view__entity__content__id",title:a},a)))))}})||n}.call(this,a(2753))}}]);