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