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