import{Dt as e,Vt as t,Wt as n,vn as r,zt as i}from"./forms-CL2ODv4X.js";import{n as a}from"./useHasPermission-CRA8mdHC.js";function o(t){return n([`/api/v1/vendors`,t.id],()=>i(`GET`,e(`/api/v1/vendors/:id`,{id:t.id})).then(e=>e.data.data),{enabled:t.enabled??!0,staleTime:1/0})}function s(){return n([`/api/v1/vendors`,`create`],()=>i(`GET`,e(`/api/v1/vendors/create`)).then(e=>e.data.data),{staleTime:1/0,enabled:a()(`create_vendor`)})}function c(t){return n([`/api/v1/vendors`,t],()=>i(`GET`,e(`/api/v1/vendors?filter=:filter&per_page=:per_page&status=:status&page=:page`,{per_page:t.perPage??`100`,page:t.currentPage??`1`,status:t.status??`active`,filter:t.filter??``})).then(e=>e.data.data),{enabled:t.enabled??!0,staleTime:1/0})}function l(){return(n,a)=>{r.processing(),i(`POST`,e(`/api/v1/vendors/bulk`),{action:a,ids:[n]}).then(()=>{r.success(`${a}d_vendor`),t([`vendors`])})}}export{c as i,l as n,o as r,s as t};