import{m as E,o as g,R as e,b as p,E as C,F as a,c as f,ai as r,ao as s,K as y,a as b,T as D}from"./rpcWorker-CVTx5FIM.js";const h=E()(n=>({connectionContainer:{margin:n.spacing(4),width:500}}));function k(){return e.createElement(D,{title:"Unable to delete connection in config file as non-admin user"},e.createElement(r,null,e.createElement(s,{color:"disabled"})))}const x=g(function({session:n,handleClose:l,breakConnection:m}){const{classes:u}=h(),{adminMode:d,connections:c,sessionConnections:t}=n;return e.createElement(p.Dialog,{open:!0,onClose:l,maxWidth:"lg",title:"Delete connections"},e.createElement(C,null,e.createElement(a,null,"Click the X icon to delete the connection from your config completely"),e.createElement("div",{className:u.connectionContainer},c.map(o=>{const i=f.readConfObject(o,"name");return e.createElement(a,{key:`conn-${i}`},d||t!=null&&t.includes(o)?e.createElement(r,{onClick:()=>{m(o,!0)}},e.createElement(s,{color:"error"})):e.createElement(k,null),i)}),c.length?null:e.createElement(a,null,"No connections found"))),e.createElement(y,null,e.createElement(b,{onClick:()=>{l()},variant:"contained",color:"primary"},"Close")))});export{x as default};
