import{u as o,c as l,b as a}from"./vendor-query-B2UbickB.js";import{b as n}from"./index-BZu5zewH.js";function s(){return n("/controlplane/apps")}function c(e){return n(`/controlplane/rollcall?app_id=${encodeURIComponent(e)}`)}function i(e){return n("/controlplane/throttle",{method:"POST",body:JSON.stringify(e)})}function p(e){return n("/controlplane/subscribe",{method:"POST",body:JSON.stringify(e)})}function m(e,t,u){let r=`/controlplane/streams?app_id=${encodeURIComponent(e)}&duration=${encodeURIComponent(t)}`;return n(r)}function b(){return o({queryKey:["controlplane","apps"],queryFn:s,staleTime:6e4})}function h(e,t){return o({queryKey:["controlplane","rollcall",e],queryFn:()=>c(e),enabled:!!e,refetchInterval:t})}function S(){const e=a();return l({mutationFn:i,onSuccess:()=>{setTimeout(()=>{e.invalidateQueries({queryKey:["controlplane","rollcall"]})},1500)}})}function d(e,t,u,r){return o({queryKey:["controlplane","streams",e,t,""],queryFn:()=>m(e,t),enabled:!!e,staleTime:15e3,refetchInterval:r})}function q(){return l({mutationFn:p})}export{b as a,q as b,h as c,d,S as u};
//# sourceMappingURL=controlplane-CV-y8cfH.js.map
