import{u as t,b as o,c as r}from"./vendor-query-B2UbickB.js";import{b as n}from"./index-BZu5zewH.js";function i(){return t({queryKey:["roles"],queryFn:()=>n("/roles")})}function l(){return t({queryKey:["roles","escalation-chains"],queryFn:()=>n("/roles/escalation-chains")})}function c(e){return t({queryKey:["roles",e,"escalation-targets"],queryFn:()=>n(`/roles/${encodeURIComponent(e)}/escalation-targets`),enabled:!!e})}function y(){const e=o();return r({mutationFn:s=>n("/roles/escalation-chains",{method:"POST",body:JSON.stringify(s)}),onSuccess:()=>{e.invalidateQueries({queryKey:["roles"]})}})}function d(){const e=o();return r({mutationFn:s=>n("/roles/escalation-chains",{method:"DELETE",body:JSON.stringify(s)}),onSuccess:()=>{e.invalidateQueries({queryKey:["roles"]})}})}function q(){return t({queryKey:["roles","details"],queryFn:()=>n("/roles/details")})}function m(){const e=o();return r({mutationFn:s=>n("/roles",{method:"POST",body:JSON.stringify({role:s})}),onSuccess:()=>{e.invalidateQueries({queryKey:["roles"]})}})}function f(){const e=o();return r({mutationFn:s=>n(`/roles/${encodeURIComponent(s)}`,{method:"DELETE"}),onSuccess:()=>{e.invalidateQueries({queryKey:["roles"]})}})}export{c as a,m as b,l as c,y as d,d as e,q as f,f as g,i as u};
//# sourceMappingURL=roles-CQsPYJXe.js.map
