(window.webpackJsonp=window.webpackJsonp||[]).push([[68],{29575:function(e,t,i){"use strict";i.r(t),function(e){i.d(t,"default",(function(){return f}));var a,n=i(2),o=i.n(n),c=i(2351),s=i(7394),l=i(7214),r=i(7193),d=i(9),p=i(6837),m=i.n(p),_=i(29576),y=i(11230);function v(){return v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(e[a]=i[a])}return e},v.apply(this,arguments)}let f=Object(c.observer)(a=class extends n.Component{constructor(e){super(e),this.state={entityIdCopied:{id:!1,versionId:!1,schemaId:!1}},this.handleCopyToClipboard=this.handleCopyToClipboard.bind(this)}componentWillUnmount(){clearTimeout(this.copiedTimeout)}handleCopyToClipboard(t){e.get(this.state.entityIdCopied,t)||(l.default.copy(e.get(this.props.contextData,t,"")),this.setState((e=>({entityIdCopied:v({},e.entityIdCopied,{[t]:!0})})),(()=>{this.copiedTimeout=setTimeout((()=>this.setState((e=>({entityIdCopied:v({},e.entityIdCopied,{[t]:!1})})))),3e3)})))}render(){const t=e.get(this.props,"contextData.model",{}),i=m()(t.createdAt).format("DD MMM YYYY, h:mm A");return o.a.createElement("div",{className:"api-info-context-view-wrapper"},o.a.createElement(s.ContextBarViewHeader,{title:"API details",onClose:this.props.onClose}),t.isOffline?o.a.createElement(y.default,{origin:"context-bar"}):o.a.createElement("div",{className:"api-info-context-view"},o.a.createElement("div",{className:"api-info-context-view__entity"},o.a.createElement("div",{className:"api-info-context-view__entity__label"},"ID"),o.a.createElement("div",{className:"api-info-context-view__entity__content"},o.a.createElement("div",{className:"api-info-context-view__entity__content__id--entity",title:t.id},t.id),o.a.createElement(r.Button,{tooltip:"Copy",type:"icon",onClick:()=>this.handleCopyToClipboard("id")},e.get(this.state.entityIdCopied,"id")?o.a.createElement(d.Icon,{name:"icon-state-success-stroke",className:"pm-icon pm-icon-normal success-tick-icon"}):o.a.createElement(d.Icon,{name:"icon-action-copy-stroke",className:"pm-icon pm-icon-normal"})))),o.a.createElement("div",{className:"api-info-context-view__entity"},o.a.createElement("div",{className:"api-info-context-view__entity__label"},"Created by"),o.a.createElement("div",{className:"api-info-context-view__entity__content"},e.get(t,"createdBy.id")?o.a.createElement(_.default,{id:e.get(t,"createdBy.id"),name:e.get(t,"createdBy.name"),username:e.get(t,"createdBy.username"),profileLink:e.get(t,"createdBy.profileLink"),isAccessible:e.get(t,"createdBy.isAccessible")}):"Deactivated User")),o.a.createElement("div",{className:"api-info-context-view__entity"},o.a.createElement("div",{className:"api-info-context-view__entity__label"},"Created on"),o.a.createElement("div",{className:"api-info-context-view__entity__content"},o.a.createElement("div",{className:"api-info-context-view__entity__content__id",title:i},i)))))}})||a}.call(this,i(2751))}}]);