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:[`employers`],list:e=>[`employers`,`list`,e],detail:e=>[`employers`,e]};function o(n){return e({queryKey:a.list(n),queryFn:async()=>{let e=await r.get(`/employers`,{params:n});return{employers:e.data.data,meta:e.data.meta}},placeholderData:t})}function s(t){return e({queryKey:a.detail(t??``),queryFn:async()=>(await r.get(`/employers/${t}`)).data.data,enabled:!!t})}function c(e){let t=n();return i({mutationFn:async t=>(e?await r.patch(`/employers/${e}`,t):await r.post(`/employers`,t)).data.data,onSuccess:e=>{t.invalidateQueries({queryKey:a.all}),t.setQueryData(a.detail(e.id),e)}})}function l(e){let t=n();return i({mutationFn:async({status:t,reason:n})=>(await r.post(`/employers/${e}/status`,{status:t,reason:n})).data.data,onSuccess:e=>{t.invalidateQueries({queryKey:a.all}),t.setQueryData(a.detail(e.id),e)}})}export{c as i,s as n,o as r,l as t};