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