var a=(o,e,t)=>new Promise((r,n)=>{var m=c=>{try{i(t.next(c))}catch(p){n(p)}},x=c=>{try{i(t.throw(c))}catch(p){n(p)}},i=c=>c.done?r(c.value):Promise.resolve(c.value).then(m,x);i((t=t.apply(o,e)).next())});import{createContext as y,useMemo as I}from"react";import{jsx as f}from"react/jsx-runtime";var A=y(void 0),l="production";var s=l==="development"?"https://qa-api-v2.bandit.network/sdk":"https://api-v2.bandit.network/sdk",h=l==="development"?"https://qa-api-v2.bandit.network/sdk":"https://event-api-v2.bandit.network/api";import d from"axios";var _=(o,e)=>a(void 0,null,function*(){try{return(yield d.get(`${s}/collection/${e}`,{headers:{"X-API-KEY":o}})).data}catch(t){throw new Error(t)}}),B=(o,e)=>a(void 0,null,function*(){try{return(yield d.get(`${s}/collection/roadmap/${e}`,{headers:{"X-API-KEY":o}})).data}catch(t){throw new Error(t)}}),X=o=>a(void 0,null,function*(){try{return(yield d.get(`${s}/collection/featured`,{headers:{"X-API-KEY":o}})).data}catch(e){throw new Error(e)}}),S=(o,e,t,r=!1)=>a(void 0,null,function*(){try{return(yield d.post(`${s}/collection/mint/${o}`,t,{headers:{"X-API-KEY":e}})).data}catch(n){if(console.log(n),r)throw n}}),M=(o,e,t)=>a(void 0,null,function*(){try{return(yield d.post(`${s}/collection/${o}/mints/error`,t,{headers:{"X-API-KEY":e}})).data}catch(r){console.log(r)}}),N=(o,e,t)=>a(void 0,null,function*(){try{d.post(`${h}`,{address:o,chainId:e,action:"updateMaxSupply"},{headers:{"X-API-KEY":t}})}catch(r){console.log(r)}}),R=(o,e,t)=>a(void 0,null,function*(){try{let r=t?t[0]:"";return(yield d.get(`${s}/users/${o}/recommended?limit=10&tags=${r}`,{headers:{"X-API-KEY":e}})).data}catch(r){console.log(r)}});export{N as callBeforeMintWebhook,R as fetchRecommendations,_ as getCollectionById,X as getFeaturedCollectionById,B as getRoadmapById,S as updateMint,M as updateMintError};
