"use strict";(self.webpackChunk_jbrowse_web=self.webpackChunk_jbrowse_web||[]).push([[870],{30870:function(n,e,o){o.r(e),o.d(e,{ellipses:function(){return b}});o(96902);var c=o(80367),r=o(32114),i=o(35388),s=o(52809),t=o(99688),a=o(44536),l=o(17867),u=o(91188),f=o(4782),d=o(99836),h=o(29938);function b(n){return n.length>20?"".concat(n.slice(0,20),"..."):n}var j=(0,u.ZL)()((function(n){return{connectionContainer:{width:500,margin:n.spacing(4)}}})),C=(0,f.observer)((function(n){var e=n.conf,o=n.session,i=n.breakConnection,s=o.connectionInstances,t=void 0===s?[]:s,a=(0,d.readConfObject)(e,"name"),l=(0,d.readConfObject)(e,"assemblyNames"),u=t.find((function(n){return a===n.name}));return(0,h.jsx)(c.Z,{control:(0,h.jsx)(r.Z,{checked:!!u,onChange:function(){var n;u?i(e):null===(n=o.makeConnection)||void 0===n||n.call(o,e)},color:"primary"}),label:[a,l.length?"(".concat(b(l.join(",")),")"):""].filter((function(n){return!!n})).join(" ")},e.connectionId)})),v=(0,f.observer)((function(n){var e=n.session,o=n.breakConnection,c=j().classes;return(0,h.jsx)("div",{className:c.connectionContainer,children:e.connections.length?e.connections.map((function(n,c){return(0,h.jsx)("div",{children:(0,h.jsx)(C,{conf:n,session:e,breakConnection:o})},n.name+"_"+c)})):(0,h.jsx)(i.Z,{children:"No connections found"})})}));e.default=(0,f.observer)((function(n){var e=n.session,o=n.handleClose,c=n.breakConnection;return(0,h.jsxs)(l.Dialog,{open:!0,onClose:o,maxWidth:"lg",title:"Turn on/off connections",children:[(0,h.jsxs)(s.Z,{children:[(0,h.jsx)(i.Z,{children:"Use the checkbox to turn on/off connections"}),(0,h.jsx)(v,{session:e,breakConnection:c})]}),(0,h.jsx)(t.Z,{children:(0,h.jsx)(a.Z,{onClick:function(){return o()},variant:"contained",color:"primary",children:"Close"})})]})}))}}]);
//# sourceMappingURL=870.61e2d5bf.chunk.js.map