import{u as n}from"./useQuery-CEwGD94N.js";import{a as i,b as u,o as t}from"./index-DXI13nSQ.js";const r={all:["heartbeat"],list:["heartbeat","list"]};function c(e){return`${e.platform}:${e.channelId}:${e.threadId}`}function d(){return n({queryKey:r.list,queryFn:()=>t.get("/api/heartbeat/bindings"),refetchInterval:1e4,refetchIntervalInBackground:!1})}function g(){const e=i();return u({mutationFn:({row:s,op:a})=>t.post(`/api/heartbeat/bindings/${encodeURIComponent(c(s))}/${a}`),onSuccess:()=>e.invalidateQueries({queryKey:r.all})})}const o={all:["goals"],list:["goals","list"]};function f(){return n({queryKey:o.list,queryFn:()=>t.get("/api/goals"),refetchInterval:3e4})}function b(){const e=i();return u({mutationFn:({id:s,status:a})=>t.put(`/api/goals/${s}/status`,{body:{status:a}}),onSuccess:()=>e.invalidateQueries({queryKey:o.all})})}const l={all:["asks"],list:["asks","list"]};function q(){return n({queryKey:l.list,queryFn:()=>t.get("/api/asks/pending"),refetchInterval:5e3})}function h(){const e=i();return u({mutationFn:s=>t.post(`/api/asks/pending/${encodeURIComponent(s)}/cancel`),onSuccess:()=>e.invalidateQueries({queryKey:l.all})})}export{g as a,f as b,b as c,q as d,h as e,d as u};
//# sourceMappingURL=use-background-tasks-BkUIDOxX.js.map
