"use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[4599],{84599:(e,n,o)=>{o.r(n),o.d(n,{default:()=>d});var t=o(66204),c=o(39780),a=o(70539),r=o(80013),s=o(29520),i=o(62301),l=o(7146),m=o(35421),b=o(38684),u=o(80846),C=o(43800);const f=(0,b.ZL)()((e=>({connectionContainer:{width:500,margin:e.spacing(4)}}))),h=(0,u.observer)((function({conf:e,session:n,breakConnection:o}){const{connectionInstances:r=[]}=n,s=(0,C.readConfObject)(e,"name"),i=(0,C.readConfObject)(e,"assemblyNames"),l=r.find((e=>s===e.name));return t.createElement(c.Z,{key:e.connectionId,control:t.createElement(a.Z,{checked:!!l,onChange:()=>{l?o(e):n.makeConnection?.(e)},color:"primary"}),label:[s,i.length?`(${m=i.join(","),m.length>20?`${m.slice(0,20)}...`:m})`:""].filter((e=>!!e)).join(" ")});var m})),k=(0,u.observer)((function({session:e,breakConnection:n}){const{classes:o}=f();return t.createElement("div",{className:o.connectionContainer},e.connections.length?e.connections.map(((o,c)=>t.createElement("div",{key:o.name+"_"+c},t.createElement(h,{conf:o,session:e,breakConnection:n})))):t.createElement(r.Z,null,"No connections found"))})),d=(0,u.observer)((function({session:e,handleClose:n,breakConnection:o}){return t.createElement(m.Dialog,{open:!0,onClose:n,maxWidth:"lg",title:"Turn on/off connections"},t.createElement(s.Z,null,t.createElement(r.Z,null,"Use the checkbox to turn on/off connections"),t.createElement(k,{session:e,breakConnection:o})),t.createElement(i.Z,null,t.createElement(l.Z,{onClick:()=>n(),variant:"contained",color:"primary"},"Close")))}))}}]);
//# sourceMappingURL=4599.50d76e48.chunk.js.map