"use strict";(self.webpackChunk_jbrowse_web=self.webpackChunk_jbrowse_web||[]).push([[7582],{47582:function(n,e,o){o.r(e);o(30969);var c=o(22714),i=o(83483),s=o(64501),r=o(32343),t=o(93138),l=o(80975),a=o(317),d=o(53033),u=o(28599),h=o(14008),j=o(90550),x=o(9077),f=o(37574),Z=(0,c.Z)((function(n){return{closeButton:{position:"absolute",right:n.spacing(1),top:n.spacing(1),color:n.palette.grey[500]},connectionContainer:{margin:n.spacing(4),width:500}}}));e.default=(0,j.observer)((function(n){var e=n.session,o=n.handleClose,c=n.breakConnection,j=Z(),C=e.adminMode,p=e.connections,b=e.sessionConnections;return(0,f.jsxs)(i.Z,{open:!0,onClose:o,maxWidth:"lg",children:[(0,f.jsxs)(s.Z,{children:["Delete connections",(0,f.jsx)(r.Z,{className:j.closeButton,onClick:function(){return o()},children:(0,f.jsx)(h.Z,{})})]}),(0,f.jsxs)(t.Z,{children:[(0,f.jsx)(l.Z,{children:"Click the X icon to delete the connection from your config completely"}),(0,f.jsxs)("div",{className:j.connectionContainer,children:[p.map((function(n){var e=(0,x.readConfObject)(n,"name");return(0,f.jsx)("div",{children:(0,f.jsxs)(l.Z,{children:[C||null!==b&&void 0!==b&&b.includes(n)?(0,f.jsx)(r.Z,{onClick:function(){return c(n,!0)},children:(0,f.jsx)(h.Z,{color:"error"})}):(0,f.jsx)(a.ZP,{title:"Unable to delete connection in config file as non-admin user",children:(0,f.jsx)(r.Z,{children:(0,f.jsx)(h.Z,{color:"disabled"})})}),e]})},"conn-".concat(e))})),p.length?null:(0,f.jsx)(l.Z,{children:"No connections found"})]})]}),(0,f.jsx)(d.Z,{children:(0,f.jsx)(u.Z,{onClick:function(){return o()},variant:"contained",color:"primary",children:"Close"})})]})}))}}]);
//# sourceMappingURL=7582.7d4e71c9.chunk.js.map