"use strict";(self.webpackChunk_jbrowse_web=self.webpackChunk_jbrowse_web||[]).push([[2692],{82692:function(e,n,t){t.r(n),t.d(n,{default:function(){return Z}});var r=t(34795),a=t(96234),c=t(77162),o=t.n(c),s=t(30969),i=t(22714),l=t(83483),u=t(64501),f=t(32343),d=t(93138),p=t(80975),b=t(14008),g=t(9077),j=t(81073),h=t(47762),C=t(37574),x=(0,i.Z)((function(e){return{closeButton:{position:"absolute",right:e.spacing(1),top:e.spacing(1),color:e.palette.grey[500]}}}));function Z(e){var n=e.config,t=e.handleClose,c=x(),i=(0,s.useState)(),Z=(0,a.Z)(i,2),k=Z[0],v=Z[1],w=(0,s.useState)(),m=(0,a.Z)(w,2),S=m[0],O=m[1],q=(0,j.getSession)(n),y=q.rpcManager,B=(0,g.readConfObject)(n);(0,s.useEffect)((function(){var e=new AbortController,t=e.signal,a=!1;return(0,r.Z)(o().mark((function e(){var r,c;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r=(0,g.readConfObject)(n,"adapter"),e.next=4,y.call(n.trackId,"CoreGetInfo",{adapterConfig:r,signal:t});case 4:c=e.sent,a||v(c),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),a||(console.error(e.t0),O(e.t0));case 11:case"end":return e.stop()}}),e,null,[[0,8]])})))(),function(){e.abort(),a=!0}}),[n,y]);var _=(0,g.readConfObject)(n,"name");"ReferenceSequenceTrack"===(0,g.readConfObject)(n,"type")&&(_="Reference Sequence",q.assemblies.forEach((function(e){e.sequence===n.configuration&&(_="Reference Sequence (".concat((0,g.readConfObject)(e,"name"),")"))})));var A="string"===typeof k?{header:"<pre>".concat(k.replace(/</g,"&lt;").replace(/>/g,"&gt;"),"</pre>")}:k||{};return(0,C.jsxs)(l.Z,{open:!0,onClose:t,children:[(0,C.jsxs)(u.Z,{children:[_,(0,C.jsx)(f.Z,{className:c.closeButton,onClick:function(){return t()},children:(0,C.jsx)(b.Z,{})})]}),(0,C.jsxs)(d.Z,{children:[(0,C.jsx)(h.BaseCard,{title:"Configuration",children:(0,C.jsx)(h.Attributes,{attributes:B,omit:["displays","baseUri","refNames"]})}),null!==k?(0,C.jsx)(h.BaseCard,{title:"File info",children:S?(0,C.jsx)(p.Z,{color:"error",children:"".concat(S)}):k?(0,C.jsx)(h.Attributes,{attributes:A}):"Loading file data..."}):null]})]})}}}]);
//# sourceMappingURL=2692.35880114.chunk.js.map