var p=e=>{throw TypeError(e)};var v=(e,r,s)=>r.has(e)||p("Cannot "+s);var t=(e,r,s)=>(v(e,r,"read from private field"),s?s.call(e):r.get(e)),n=(e,r,s)=>r.has(e)?p("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(e):r.set(e,s);import{s as c,k as $,g as h,d,i as y}from"./DhUiKsxN.js";import{b as l,I as _,a as w}from"./QNXDtpsh.js";import{c as S,a as b}from"./vfPE-AD7.js";import"./1jpszzm8.js";import{l as x,b as I}from"./DUil1G3I.js";var a,i,o;class L{constructor(){n(this,a,c($([])));n(this,i,c(!1));n(this,o,c(null))}get servers(){return h(t(this,a))}set servers(r){d(t(this,a),r,!0)}get loading(){return h(t(this,i))}set loading(r){d(t(this,i),r,!0)}get error(){return h(t(this,o))}set error(r){d(t(this,o),r,!0)}async refresh(){this.loading=!0,this.error=null;try{this.servers=await l.list()}catch(r){this.error=r instanceof Error?r.message:"Failed to fetch servers"}finally{this.loading=!1}}async start(r){await l.start(r),await this.refresh()}async stop(r,s=!1){await l.stop(r,s),await this.refresh()}async restart(r){await l.restart(r),await this.refresh()}isRunning(r){return this.servers.some(s=>s.profile_id===r)}getServer(r){return this.servers.find(s=>s.profile_id===r)}}a=new WeakMap,i=new WeakMap,o=new WeakMap;const R=new L;function j(e,r){const s=x(r,["children","$$slots","$$events","$$legacy"]);/**
 * @license lucide-svelte v0.469.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const g=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]];_(e,I({name:"loader-circle"},()=>s,{get iconNode(){return g},children:(u,N)=>{var f=S(),m=y(f);w(m,r,"default",{}),b(u,f)},$$slots:{default:!0}}))}export{j as L,R as s};
