import{a as o}from"/build/_shared/chunk-TZ3O44L6.js";import{e as u}from"/build/_shared/chunk-CFZHMNHJ.js";async function a(n,t){try{let e=`${window.ENV.apiBaseURL}/search/api/v1/products/categories`+u(t);return await o(e,n.request,!0)}catch(r){console.error("Products error: ",r.message);return}}async function d(n,t){try{let r=window.ENV.apiBaseURL;return t?await o(`${r}/product/api/v2/stores/${t}/products/${n}`,void 0,!0):await o(`${r}/product/api/v2/products/${n}`,void 0,!0)}catch(r){console.log("Error: ",r);return}}async function p(n,t){try{let r=u({productIds:n}),e=window.ENV.apiBaseURL;return t?await o(`${e}/product/api/v2/stores/${t}/products${r}`,void 0,!0):await o(`${e}/product/api/v2/products${r}`,void 0,!0)}catch(r){console.log("Error: ",r);return}}async function f(n,t,r){try{let e=window.ENV.apiBaseURL,s="";return r?s=`${e}/product/api/v2/stores/${r}/products/coupon/${t}`:s=`${e}/product/api/v2/products/coupon/${t}`,await o(s,n,!0,void 0,"GET")}catch(e){console.log("Error: ",e);return}}export{a,d as b,p as c,f as d};
