import{r}from"./request.eff82867.js";const s="/supplier",u=e=>{const t=e==null?void 0:e.data;return t?Array.isArray(t)?{list:t,total:t.length}:{list:Array.isArray(t.list)?t.list:[],total:typeof t.total=="number"?t.total:Array.isArray(t.list)?t.list.length:0}:{list:[],total:0}},o=async({keyword:e,status:t,page:a,pageSize:n})=>{const i={keyword:e||void 0,status:t,page:a,page_size:n},l=await r.get(`${s}/list`,{params:i});return u(l)},p=async e=>{const t=await r.get(`${s}/detail/${e}`);return(t==null?void 0:t.data)||null},y=async e=>r.post(`${s}/create`,e),d=async e=>r.put(`${s}/update`,e),f=async e=>r.post(`${s}/delete`,e);export{p as a,y as c,f as d,o as f,d as u};