import{a as e,g as t,s as n,t as r}from"./api-Duu96wkE.js";import{G as i}from"./index-DyQEyT-0.js";var a={all:[`users`],list:e=>[`users`,`list`,e]};function o(n){return e({queryKey:a.list(n),queryFn:async()=>{let e=await r.get(`/users`,{params:n});return{users:e.data.data,meta:e.data.meta}},placeholderData:t})}function s(){let e=n();return i({mutationFn:async e=>(await r.post(`/users`,e)).data.data,onSuccess:()=>e.invalidateQueries({queryKey:a.all})})}function c(){let e=n();return i({mutationFn:async({id:e,status:t,reason:n})=>r.post(`/users/${e}/status`,{status:t,reason:n}),onSuccess:()=>e.invalidateQueries({queryKey:a.all})})}function l(){return i({mutationFn:async e=>(await r.post(`/users/${e}/reset-password`)).data.data})}function u(){let e=n();return i({mutationFn:async({id:e,roles:t})=>r.post(`/users/${e}/roles`,{roles:t}),onSuccess:()=>e.invalidateQueries({queryKey:a.all})})}export{o as a,u as i,l as n,c as r,s as t};