import{by as o,ab as a,V as t,w as s,i as r,a0 as u,ad as i}from"./index-Dbk1Plmn.js";function c(){return t("/peers")}function y(e){return t(`/peers/${encodeURIComponent(e)}`)}function l(e){return o(`/peers/${encodeURIComponent(e)}`)}function f(e){return a(`/peers/${encodeURIComponent(e)}/sync`,{})}function q(){return s({queryKey:["peers","list"],queryFn:c,enabled:r()})}function p(e){return s({queryKey:["peers","detail",e],queryFn:()=>y(e),enabled:r()&&!!(e!=null&&e.trim())})}function P(){const e=u();return i({mutationFn:n=>l(n),onSuccess:()=>{e.invalidateQueries({queryKey:["peers"]}),e.invalidateQueries({queryKey:["entities"]}),e.invalidateQueries({queryKey:["stats"]})}})}function d(){const e=u();return i({mutationFn:n=>f(n),onSuccess:()=>{e.invalidateQueries({queryKey:["peers"]})}})}export{P as a,p as b,d as c,q as u};
