var I=Object.create;var a=Object.defineProperty;var B=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var F=Object.getPrototypeOf,O=Object.prototype.hasOwnProperty;var k=(e,t)=>{for(var i in t)a(e,i,{get:t[i],enumerable:!0})},f=(e,t,i,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of A(t))!O.call(e,l)&&l!==i&&a(e,l,{get:()=>t[l],enumerable:!(c=B(t,l))||c.enumerable});return e};var E=(e,t,i)=>(i=e!=null?I(F(e)):{},f(t||!e||!e.__esModule?a(i,"default",{value:e,enumerable:!0}):i,e)),N=e=>f(a({},"__esModule",{value:!0}),e);var j={};k(j,{default:()=>_});module.exports=N(j);var h=require("react"),o=require("@chakra-ui/react"),n=require("@chakra-ui/layout");var d=(e,t)=>e?e.length>t?e.substr(0,t-1)+"..."+e.substr(e.length-(t-1),e.length-1):e:"";var b=require("react-icons/fa"),y=E(require("@emotion/styled"),1),x=require("react-icons/ai"),w=require("react-redux");var p=require("@reduxjs/toolkit"),P={selectedCollectionId:null,showMint:!1,collectionViewOpen:!1,selectedSpaceId:!1},u=(0,p.createSlice)({name:"collection",initialState:P,reducers:{updateSelectedCollectionId(e,{payload:{id:t}}){e.selectedCollectionId=t},updateShowMint(e,{payload:{showMint:t}}){e.showMint=t},updateCollectionViewOpen(e,{payload:{collectionViewOpen:t}}){e.collectionViewOpen=t},updateSelectedSpaceId(e,{payload:{id:t}}){e.selectedSpaceId=t}}}),{updateSelectedCollectionId:g,updateShowMint:K,updateCollectionViewOpen:G,updateSelectedSpaceId:J}=u.actions,Q=u.reducer;var r=require("react/jsx-runtime"),$="https://imagedelivery.net/6iczWBYEbx_1dYNU7ek_bA/3761cd57-827a-4a05-f82f-ca8c1abc7300/quality=80,height=100",W="https://imagedelivery.net/6iczWBYEbx_1dYNU7ek_bA/2db84388-37eb-4c01-32cc-67b0e1741e00/height=100,quality=80",M="https://imagedelivery.net/6iczWBYEbx_1dYNU7ek_bA/62a5ffd5-6a84-4b3c-7812-f55cf4c7d300/height=100,quality=80",R=(0,y.default)(o.Box)`
  //margin-left: 30px;
  //margin-right: 30px;
  z-index: 99;
  border: 1px solid #cccc;
  border-radius: 14px;
  padding: 10px 20px;
  height: 76px;
  overflow: hidden;
  ${({offersOpen:e})=>e&&`
    position: absolute;
    top : 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: unset;
  `};
`,s=({imageSrc:e,title:t,onClick:i})=>(0,r.jsxs)(n.Flex,{align:"center",justify:"space-between",borderWidth:"1.5px",borderColor:"gray.400",borderRadius:"lg",p:1,mb:2,children:[(0,r.jsxs)(n.Flex,{align:"center",children:[(0,r.jsx)(o.Image,{src:e,w:8,h:8,borderRadius:"50%"}),(0,r.jsx)(o.Text,{fontSize:"12px",fontWeight:600,mb:1,ml:3,children:t})]}),i&&(0,r.jsx)(o.Button,{size:"xs",bg:"gray.800",color:"white",_hover:{bg:"gray.800"},onClick:i,fontSize:"10",children:"Claim here"})]}),D=({transaction:e,postTransaction:t})=>(0,r.jsx)(n.Flex,{direction:"column",align:"center",children:(e==null?void 0:e.completed)==="pending"?(0,r.jsx)(m,{}):(e==null?void 0:e.completed)==="error"?(0,r.jsx)(T,{}):(e==null?void 0:e.completed)==="completed"?(0,r.jsx)(U,{showOffers:t==null?void 0:t.showOffers,celebrate:t==null?void 0:t.celebrate,website:t==null?void 0:t.website,address:t==null?void 0:t.address}):(0,r.jsx)(m,{})}),m=()=>(0,r.jsxs)(n.Flex,{flexDirection:"column",align:"center",children:[(0,r.jsx)(n.Flex,{justify:"center",align:"center",bg:"muted",w:10,h:10,borderRadius:"50%",children:(0,r.jsx)(o.Spinner,{size:"md"})}),(0,r.jsx)(o.Text,{fontSize:"lg",fontWeight:"bold",mt:"2",children:"Transaction Pending"})]}),U=({showOffers:e,celebrate:t,website:i,address:c})=>{let[l,S]=(0,h.useState)(!1),C=(0,w.useDispatch)(),v=z=>{C(g({id:z}))};return(0,r.jsxs)(n.Flex,{flexDirection:"column",align:"center",children:[(0,r.jsx)(n.Flex,{justify:"center",align:"center",bg:"muted",w:10,h:10,borderRadius:"50%",children:"\u{1F389}"}),(0,r.jsx)(o.Text,{fontSize:"lg",fontWeight:"bold",mt:"2",children:"Domain Purchase Successful"}),(0,r.jsxs)(o.Text,{textAlign:"center",marginY:"4",fontSize:14,children:["Note: Login to"," ",(0,r.jsx)(o.Link,{href:i,target:"_blank",textDecoration:"underline",fontWeight:"semibold",children:i})," ","using ",(0,r.jsx)("b",{children:d(c,6)})," address to view your domain. It might take upto 10 minutes to register your domain."]}),(0,r.jsx)(o.Button,{mb:5,border:"1.5px solid",w:"fit-content",borderColor:"input",size:"sm",fontWeight:500,rightIcon:(0,r.jsx)(b.FaTwitter,{width:20,height:20,color:"#1DA1F2"}),onClick:t,children:"Celebrate"}),e&&(0,r.jsxs)(R,{bg:"gray.200",offersOpen:l,children:[(0,r.jsxs)(n.Flex,{justify:"space-between",align:"center",children:[(0,r.jsx)(o.Text,{fontSize:"sm",fontWeight:600,mb:1,children:"Exclusive rewards for purchasing UD"}),(0,r.jsx)(x.AiOutlineFullscreen,{cursor:"pointer",onClick:()=>S(!l)})]}),(0,r.jsx)(o.Text,{fontSize:"xs",fontWeight:500,mb:3,children:"As a thank you, we're offering exclusive rewards to the first 2500 users by our partner platforms"}),(0,r.jsx)(s,{imageSrc:M,onClick:()=>v("64072"),title:"Claim 100 $BAD token wrapped Bandit NFTs by Bandit"}),(0,r.jsx)(s,{imageSrc:$,title:"Eligible to receive 400K $BONK coins after the offer period by BONK"}),(0,r.jsx)(s,{imageSrc:W,title:"Get 15% discount on all services by NFT Evening"}),(0,r.jsx)(o.Text,{fontSize:"2xs",children:"These rewards are only available to the first 2500 users from our partner platforms, so don't miss out! Start exploring the exciting world of web3 domains and NFTs with these amazing offers."})]})]})},T=()=>(0,r.jsxs)(n.Flex,{flexDirection:"column",align:"center",children:[(0,r.jsx)(n.Flex,{justify:"center",align:"center",bg:"muted",w:10,h:10,borderRadius:"50%",children:"\u274C"}),(0,r.jsx)(o.Text,{fontSize:"lg",fontWeight:"bold",mt:"2",children:"Domain Purchase Failed"})]}),_=D;
