"use strict";(self.webpackChunk_jbrowse_web=self.webpackChunk_jbrowse_web||[]).push([[4599],{84599:(n,e,o)=>{o.r(e),o.d(e,{default:()=>x});o(41867);var c=o(96614),s=o(83171),i=o(51590),t=o(47409),r=o(27768),a=o(23801),l=o(35421),d=o(47192),h=o(3762),b=o(43800),j=o(80838);const f=(0,d.ZL)()((n=>({connectionContainer:{width:500,margin:n.spacing(4)}}))),C=(0,h.observer)((function(n){let{conf:e,session:o,breakConnection:i}=n;const{connectionInstances:t=[]}=o,r=(0,b.readConfObject)(e,"name"),a=(0,b.readConfObject)(e,"assemblyNames"),l=t.find((n=>r===n.name));return(0,j.jsx)(c.Z,{control:(0,j.jsx)(s.Z,{checked:!!l,onChange:()=>{var n;l?i(e):null===(n=o.makeConnection)||void 0===n||n.call(o,e)},color:"primary"}),label:[r,a.length?"(".concat((d=a.join(","),d.length>20?"".concat(d.slice(0,20),"..."):d),")"):""].filter((n=>!!n)).join(" ")},e.connectionId);var d})),u=(0,h.observer)((function(n){let{session:e,breakConnection:o}=n;const{classes:c}=f();return(0,j.jsx)("div",{className:c.connectionContainer,children:e.connections.length?e.connections.map(((n,c)=>(0,j.jsx)("div",{children:(0,j.jsx)(C,{conf:n,session:e,breakConnection:o})},n.name+"_"+c))):(0,j.jsx)(i.Z,{children:"No connections found"})})})),x=(0,h.observer)((function(n){let{session:e,handleClose:o,breakConnection:c}=n;return(0,j.jsxs)(l.Dialog,{open:!0,onClose:o,maxWidth:"lg",title:"Turn on/off connections",children:[(0,j.jsxs)(t.Z,{children:[(0,j.jsx)(i.Z,{children:"Use the checkbox to turn on/off connections"}),(0,j.jsx)(u,{session:e,breakConnection:c})]}),(0,j.jsx)(r.Z,{children:(0,j.jsx)(a.Z,{onClick:()=>o(),variant:"contained",color:"primary",children:"Close"})})]})}))}}]);
//# sourceMappingURL=4599.183fb85b.chunk.js.map