import{R as t,bI as s,aT as n,q as r}from"./index-Dz5JRQhj.js";const u=async()=>fetch(`${t}/1.0/cluster/groups?recursion=1`).then(s).then(e=>e.metadata),a=async e=>fetch(`${t}/1.0/cluster/groups/${encodeURIComponent(e)}`).then(s).then(o=>o.metadata),p=async e=>{await fetch(`${t}/1.0/cluster/groups/${encodeURIComponent(e.name)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then(s)},y=async e=>{await fetch(`${t}/1.0/cluster/groups`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then(s)},h=async e=>{await fetch(`${t}/1.0/cluster/groups/${encodeURIComponent(e)}`,{method:"DELETE"}).then(s)},l=()=>n({queryKey:[r.cluster,r.groups],queryFn:u}),d=e=>n({queryKey:[r.cluster,r.groups,e],queryFn:async()=>a(e)});export{p as a,l as b,y as c,h as d,d as u};
