import{createContext as d,useMemo as m}from"react";import{jsx as u}from"react/jsx-runtime";var x=d(void 0),s="production";var n=s==="development"?"https://qa-api-v2.bandit.network/sdk":"https://api-v2.bandit.network/sdk",i=s==="development"?"https://qa-api-v2.bandit.network/sdk":"https://event-api-v2.bandit.network/api";import a from"axios";var g=async(o,t)=>{try{return(await a.get(`${n}/collection/${t}`,{headers:{"X-API-KEY":o}})).data}catch(e){throw new Error(e)}},E=async(o,t)=>{try{return(await a.get(`${n}/collection/roadmap/${t}`,{headers:{"X-API-KEY":o}})).data}catch(e){throw new Error(e)}},C=async o=>{try{return(await a.get(`${n}/collection/featured`,{headers:{"X-API-KEY":o}})).data}catch(t){throw new Error(t)}},K=async(o,t,e,r=!1)=>{try{return(await a.post(`${n}/collection/mint/${o}`,e,{headers:{"X-API-KEY":t}})).data}catch(c){if(console.log(c),r)throw c}},b=async(o,t,e)=>{try{return(await a.post(`${n}/collection/${o}/mints/error`,e,{headers:{"X-API-KEY":t}})).data}catch(r){console.log(r)}},k=async(o,t,e)=>{try{a.post(`${i}`,{address:o,chainId:t,action:"updateMaxSupply"},{headers:{"X-API-KEY":e}})}catch(r){console.log(r)}},Y=async(o,t,e)=>{try{let r=e?e[0]:"";return(await a.get(`${n}/users/${o}/recommended?limit=10&tags=${r}`,{headers:{"X-API-KEY":t}})).data}catch(r){console.log(r)}};export{k as callBeforeMintWebhook,Y as fetchRecommendations,g as getCollectionById,C as getFeaturedCollectionById,E as getRoadmapById,K as updateMint,b as updateMintError};
