var h=Object.create;var s=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var y=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty;var w=(t,e)=>{for(var o in e)s(t,o,{get:e[o],enumerable:!0})},p=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of x(e))!u.call(t,n)&&n!==o&&s(t,n,{get:()=>e[n],enumerable:!(r=m(e,n))||r.enumerable});return t};var P=(t,e,o)=>(o=t!=null?h(y(t)):{},p(e||!t||!t.__esModule?s(o,"default",{value:t,enumerable:!0}):o,t)),I=t=>p(s({},"__esModule",{value:!0}),t);var b={};w(b,{callBeforeMintWebhook:()=>C,fetchRecommendations:()=>K,getCollectionById:()=>A,getFeaturedCollectionById:()=>f,getRoadmapById:()=>$,updateMint:()=>g,updateMintError:()=>E});module.exports=I(b);var i=require("react"),v=require("react/jsx-runtime"),B=(0,i.createContext)(void 0),d="production";var c=d==="development"?"https://qa-api-v2.bandit.network/sdk":"https://api-v2.bandit.network/sdk",l=d==="development"?"https://qa-api-v2.bandit.network/sdk":"https://event-api-v2.bandit.network/api";var a=P(require("axios"),1),A=async(t,e)=>{try{return(await a.default.get(`${c}/collection/${e}`,{headers:{"X-API-KEY":t}})).data}catch(o){throw new Error(o)}},$=async(t,e)=>{try{return(await a.default.get(`${c}/collection/roadmap/${e}`,{headers:{"X-API-KEY":t}})).data}catch(o){throw new Error(o)}},f=async t=>{try{return(await a.default.get(`${c}/collection/featured`,{headers:{"X-API-KEY":t}})).data}catch(e){throw new Error(e)}},g=async(t,e,o,r=!1)=>{try{return(await a.default.post(`${c}/collection/mint/${t}`,o,{headers:{"X-API-KEY":e}})).data}catch(n){if(console.log(n),r)throw n}},E=async(t,e,o)=>{try{return(await a.default.post(`${c}/collection/${t}/mints/error`,o,{headers:{"X-API-KEY":e}})).data}catch(r){console.log(r)}},C=async(t,e,o)=>{try{a.default.post(`${l}`,{address:t,chainId:e,action:"updateMaxSupply"},{headers:{"X-API-KEY":o}})}catch(r){console.log(r)}},K=async(t,e,o)=>{try{let r=o?o[0]:"";return(await a.default.get(`${c}/users/${t}/recommended?limit=10&tags=${r}`,{headers:{"X-API-KEY":e}})).data}catch(r){console.log(r)}};0&&(module.exports={callBeforeMintWebhook,fetchRecommendations,getCollectionById,getFeaturedCollectionById,getRoadmapById,updateMint,updateMintError});
