(this["webpackJsonp@jbrowse/web"]=this["webpackJsonp@jbrowse/web"]||[]).push([[52],{2309:function(e,t,a){"use strict";a.r(t),a.d(t,"default",(function(){return h}));var n=a(86),r=a(29),c=a(83),o=a.n(c),l=a(1),s=a.n(l),i=a(51),u=a(2240),b=a(2243),f=a(2215),p=a(2244),j=a(2211),d=a(117),O=a.n(d),g=a(82),m=a(85),C=a(460),E=Object(i.a)((function(e){return{closeButton:{position:"absolute",right:e.spacing(1),top:e.spacing(1),color:e.palette.grey[500]}}}));function h(e){var t=e.config,a=e.handleClose,c=E(),i=Object(l.useState)(),d=Object(r.a)(i,2),h=d[0],v=d[1],w=Object(l.useState)(),k=Object(r.a)(w,2),S=k[0],q=k[1],y=Object(m.getSession)(t),B=y.rpcManager,x=Object(g.readConfObject)(t);Object(l.useEffect)((function(){var e=new AbortController,a=e.signal,r=!1;return Object(n.a)(o.a.mark((function e(){var n,c;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=Object(g.readConfObject)(t,"adapter"),e.next=4,B.call(t.trackId,"CoreGetInfo",{adapterConfig:n,signal:a});case 4:c=e.sent,r||v(c),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),r||(console.error(e.t0),q(e.t0));case 11:case"end":return e.stop()}}),e,null,[[0,8]])})))(),function(){e.abort(),r=!0}}),[t,B]);var A=Object(g.readConfObject)(t,"name");"ReferenceSequenceTrack"===Object(g.readConfObject)(t,"type")&&(A="Reference Sequence",y.assemblies.forEach((function(e){e.sequence===t.configuration&&(A="Reference Sequence (".concat(Object(g.readConfObject)(e,"name"),")"))})));var R="string"===typeof h?{header:"<pre>".concat(h.replace(/</g,"&lt;").replace(/>/g,"&gt;"),"</pre>")}:h||{};return s.a.createElement(u.a,{open:!0,onClose:a},s.a.createElement(b.a,null,A,s.a.createElement(f.a,{className:c.closeButton,onClick:function(){return a()}},s.a.createElement(O.a,null))),s.a.createElement(p.a,null,s.a.createElement(C.BaseCard,{title:"Configuration"},s.a.createElement(C.Attributes,{attributes:x,omit:["displays","baseUri","refNames"]})),null!==h?s.a.createElement(C.BaseCard,{title:"File info"},S?s.a.createElement(j.a,{color:"error"},"".concat(S)):h?s.a.createElement(C.Attributes,{attributes:R}):"Loading file data..."):null))}}}]);
//# sourceMappingURL=52.63eb235e.chunk.js.map