import{K as d}from"./Index-CsHtvMhJ.js";import{u as p}from"./index-DVdSf46I.js";function i(){const{user:s}=p(),t=(s==null?void 0:s.seller_id)||(s==null?void 0:s.id),e=d("suppliers",{autoFetch:!!t,filters:t?{seller_id:t}:{},orderBy:"supplier_name",orderDir:"ASC"}),r=d("purchase_orders",{autoFetch:!!t,filters:t?{seller_id:t}:{},orderBy:"order_date",orderDir:"DESC"});return{suppliers:e.data,purchaseOrders:r.data,isLoading:e.isLoading||r.isLoading,error:e.error||r.error,createSupplier:e.create,updateSupplier:e.update,deleteSupplier:e.remove,createPurchaseOrder:r.create,updatePurchaseOrder:r.update,deletePurchaseOrder:r.remove,refetchSuppliers:e.refetch,refetchPurchaseOrders:r.refetch}}export{i as u};
