"use strict";(self.webpackChunk_jbrowse_web=self.webpackChunk_jbrowse_web||[]).push([[7696],{87696:(n,e,o)=>{o.r(e),o.d(e,{default:()=>Z});o(41867);var c=o(47409),s=o(51590),i=o(68367),l=o(77573),t=o(27768),r=o(23801),d=o(35421),a=o(47192),h=o(3762),j=o(43800),u=o(22177),x=o(80838);const C=(0,a.ZL)()((n=>({connectionContainer:{margin:n.spacing(4),width:500}}))),Z=(0,h.observer)((function(n){let{session:e,handleClose:o,breakConnection:a}=n;const{classes:h}=C(),{adminMode:Z,connections:b,sessionConnections:f}=e;return(0,x.jsxs)(d.Dialog,{open:!0,onClose:o,maxWidth:"lg",title:"Delete connections",children:[(0,x.jsxs)(c.Z,{children:[(0,x.jsx)(s.Z,{children:"Click the X icon to delete the connection from your config completely"}),(0,x.jsxs)("div",{className:h.connectionContainer,children:[b.map((n=>{const e=(0,j.readConfObject)(n,"name");return(0,x.jsxs)(s.Z,{children:[Z||null!==f&&void 0!==f&&f.includes(n)?(0,x.jsx)(i.Z,{onClick:()=>a(n,!0),children:(0,x.jsx)(u.Z,{color:"error"})}):(0,x.jsx)(l.Z,{title:"Unable to delete connection in config file as non-admin user",children:(0,x.jsx)(i.Z,{children:(0,x.jsx)(u.Z,{color:"disabled"})})}),e]},"conn-".concat(e))})),b.length?null:(0,x.jsx)(s.Z,{children:"No connections found"})]})]}),(0,x.jsx)(t.Z,{children:(0,x.jsx)(r.Z,{onClick:()=>o(),variant:"contained",color:"primary",children:"Close"})})]})}))}}]);
//# sourceMappingURL=7696.fe5ce84b.chunk.js.map