"use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[4138],{44138:(n,e,o)=>{o.r(e),o.d(e,{default:()=>x});var s=o(68584),c=o(67112),i=o(7946),r=o(22762),t=o(61282),a=o(76218),l=o(30698),h=o(69092),d=o(68446),b=o(75785),j=o(69500);const C=(0,b.n9)()(n=>({connectionContainer:{width:500,margin:n.spacing(4)}})),f=(0,d.observer)(function({conf:n,session:e,breakConnection:o}){const{connectionInstances:c=[]}=e,t=(0,s.readConfObject)(n,"name"),a=(0,s.readConfObject)(n,"assemblyNames"),l=c.find(n=>t===n.name);return(0,j.jsx)(i.A,{control:(0,j.jsx)(r.A,{checked:!!l,onChange:()=>{l?o(n):e.makeConnection?.(n)},color:"primary"}),label:[t,a.length?`(${h=a.join(","),h.length>20?`${h.slice(0,20)}...`:h})`:""].filter(n=>!!n).join(" ")},n.connectionId);var h}),u=(0,d.observer)(function({session:n,breakConnection:e}){const{classes:o}=C();return(0,j.jsx)("div",{className:o.connectionContainer,children:n.connections.length?n.connections.map((o,s)=>(0,j.jsx)("div",{children:(0,j.jsx)(f,{conf:o,session:n,breakConnection:e})},`${o.name}_${s}`)):(0,j.jsx)(t.A,{children:"No connections found"})})}),x=(0,d.observer)(function({session:n,handleClose:e,breakConnection:o}){return(0,j.jsxs)(c.Dialog,{open:!0,onClose:e,maxWidth:"lg",title:"Turn on/off connections",children:[(0,j.jsxs)(a.A,{children:[(0,j.jsx)(t.A,{children:"Use the checkbox to turn on/off connections"}),(0,j.jsx)(u,{session:n,breakConnection:o})]}),(0,j.jsx)(l.A,{children:(0,j.jsx)(h.A,{onClick:()=>{e()},variant:"contained",color:"primary",children:"Close"})})]})})}}]);
//# sourceMappingURL=4138.44f9ea81.chunk.js.map