import{u as o,b as u,c as a}from"./vendor-query-B2UbickB.js";import{b as t}from"./index-BZu5zewH.js";function g(e={}){const n=new URLSearchParams;e.status&&n.set("status",e.status),e.knowledge_domain&&n.set("knowledge_domain",e.knowledge_domain),e.limit!=null&&n.set("limit",String(e.limit)),e.offset!=null&&n.set("offset",String(e.offset));const s=n.toString();return o({queryKey:["agents",e],queryFn:()=>t(`/agents${s?`?${s}`:""}`)})}function y(e){return o({queryKey:["agents",e],queryFn:()=>t(`/agents/${e}`),enabled:!!e})}function c(){const e=u();return a({mutationFn:n=>t("/agents",{method:"POST",body:JSON.stringify(n)}),onSuccess:()=>{e.invalidateQueries({queryKey:["agents"]})}})}function m(){const e=u();return a({mutationFn:({id:n,...s})=>t(`/agents/${n}`,{method:"PUT",body:JSON.stringify(s)}),onSuccess:()=>{e.invalidateQueries({queryKey:["agents"]})}})}function d(){const e=u();return a({mutationFn:n=>t(`/agents/${n}`,{method:"DELETE"}),onSuccess:()=>{e.invalidateQueries({queryKey:["agents"]})}})}export{y as a,m as b,d as c,c as d,g as u};
//# sourceMappingURL=agents-CQsJU21y.js.map
