var k=Object.create;var s=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var P=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty;var A=(e,t)=>{for(var o in t)s(e,o,{get:t[o],enumerable:!0})},p=(e,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of w(t))!y.call(e,r)&&r!==o&&s(e,r,{get:()=>t[r],enumerable:!(i=g(t,r))||i.enumerable});return e};var I=(e,t,o)=>(o=e!=null?k(P(e)):{},p(t||!e||!e.__esModule?s(o,"default",{value:e,enumerable:!0}):o,e)),D=e=>p(s({},"__esModule",{value:!0}),e);var R={};A(R,{ConsumerContext:()=>C,ConsumerContextProvider:()=>B});module.exports=D(R);var n=require("react");var f=I(require("axios"),1);var d=require("react"),S=require("react/jsx-runtime"),V=(0,d.createContext)(void 0),u="production";var m=u==="development"?"https://qa-api-v2.bandit.network/sdk":"https://api-v2.bandit.network/sdk";var x=async e=>{try{return(await f.default.get(`${m}/consumer`,{headers:{"X-API-KEY":e}})).data}catch(t){return{}}};var a=require("react/jsx-runtime"),E=()=>(0,a.jsx)("div",{style:{width:"100%",maxWidth:"1660px",margin:"0 auto",height:"630px",display:"flex",alignItems:"center",justifyContent:"center",background:"transparent"},children:(0,a.jsxs)("svg",{viewBox:"0 0 50 50",width:"50",height:"50",children:[(0,a.jsx)("circle",{cx:"25",cy:"25",r:"20",stroke:"#b1b5c3",strokeWidth:"3",fill:"none"}),(0,a.jsxs)("circle",{cx:"25",cy:"25",r:"10",stroke:"#777e90",strokeWidth:"3",fill:"none",children:[(0,a.jsx)("animate",{attributeName:"r",values:"10;20;10",dur:"1s",repeatCount:"indefinite"}),(0,a.jsx)("animate",{attributeName:"stroke-opacity",values:"1;0;1",dur:"1s",repeatCount:"indefinite"})]})]})}),v=E;var l=require("react/jsx-runtime"),C=(0,n.createContext)(void 0),N={profile:{name:"",email:"",profileImage:""},type:"BASIC",domain:"",externalCurrencyEnabled:!1,config:{launchpadEnabled:!1,allowedChains:[],allowedMarketPlaces:[],links:{support:"",whitelist:"",submit:""},categoryFilterEnabled:!0,typeFilterEnabled:!0,zoraReferralAddress:""}},B=({accessKey:e,children:t})=>{let[o,i]=(0,n.useState)(N),[r,c]=(0,n.useState)(!0),b=(0,n.useCallback)(async()=>{c(!0);let h=await x(e);i(h),c(!1)},[e]);return(0,n.useEffect)(()=>{e&&b()},[e]),r?(0,l.jsx)(v,{}):(0,l.jsx)(C.Provider,{value:{...o,isConsumerLoading:r,accessKey:e},children:t})};0&&(module.exports={ConsumerContext,ConsumerContextProvider});
