import{K as o,aL as d,cx as N}from"../index.Crez7j-Y.bundle.js";const R={ALL:["CANCEL_PROCESSING","CANCEL_DONE","RETURN_PROCESSING","RETURN_DONE","EXCHANGE_PROCESSING","EXCHANGE_DONE"],CANCEL:["CANCEL_PROCESSING","CANCEL_DONE"],RETURN:["RETURN_PROCESSING","RETURN_DONE"],EXCHANGE:["EXCHANGE_PROCESSING","EXCHANGE_DONE"]};function i(){const a=o("shopByAPI"),E="profile";return{getOrderListAPI:(r,s)=>{const t=new URLSearchParams(r);if(!t.has("endYmd")){const e=d().format("YYYY-MM-DD");t.set("endYmd",e)}if(t.has("claimType")){const e=t.get("claimType"),n=R[e];t.delete("claimType"),t.set("orderRequestTypes",n.join(","))}if(s&&!t.has("orderRequestTypes")){const e=N.enum,n=[e.DEPOSIT_WAIT,e.PAY_DONE,e.PRODUCT_PREPARE,e.DELIVERY_PREPARE,e.DELIVERY_ING,e.DELIVERY_DONE,e.BUY_CONFIRM];t.set("orderRequestTypes",n.join(","))}return t.set("hasTotalCount","true"),a.get("".concat(E,"/orders?").concat(t.toString())).then(e=>e.data)},getOrderStatusCountAPI:(r,s)=>{const t=new URLSearchParams;return t.set("startYmd",r),t.set("endYmd",s),a.get("".concat(E,"/orders/summary/status?").concat(t.toString())).then(e=>e.data)},confirmMemberOrderAPI:r=>a.put("".concat(E,"/order-options/").concat(r,"/confirm")).then(s=>s.data),getMemberOrderDetailAPI:r=>a.get("".concat(E,"/orders/").concat(r)).then(s=>s.data)}}export{i as M};