var p=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var M=Object.getOwnPropertyNames,m=Object.getOwnPropertySymbols;var S=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable;var C=(e,o,n)=>o in e?p(e,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[o]=n,g=(e,o)=>{for(var n in o||(o={}))S.call(o,n)&&C(e,n,o[n]);if(m)for(var n of m(o))y.call(o,n)&&C(e,n,o[n]);return e};var B=(e,o)=>{var n={};for(var t in e)S.call(e,t)&&o.indexOf(t)<0&&(n[t]=e[t]);if(e!=null&&m)for(var t of m(e))o.indexOf(t)<0&&y.call(e,t)&&(n[t]=e[t]);return n};var R=(e,o)=>{for(var n in o)p(e,n,{get:o[n],enumerable:!0})},z=(e,o,n,t)=>{if(o&&typeof o=="object"||typeof o=="function")for(let i of M(o))!S.call(e,i)&&i!==n&&p(e,i,{get:()=>o[i],enumerable:!(t=F(o,i))||t.enumerable});return e};var I=e=>z(p({},"__esModule",{value:!0}),e);var V={};R(V,{default:()=>U});module.exports=I(V);var s=require("@chakra-ui/react");var K=require("react"),a=require("@chakra-ui/react");var l=require("react/jsx-runtime"),N=t=>{var i=t,{validators:e,fullWidth:o=!1}=i,n=B(i,["validators","fullWidth"]);let c=e.find(x=>!x.should),f=g(g({},n),c==null?void 0:c.fallbackProps),{children:d,onClick:h,disabled:b,helperText:u,isLoading:k=!1}=f;return(0,l.jsxs)(a.Box,{style:{textAlign:"center"},children:[(0,l.jsx)(a.Button,{w:o?"full":"",variant:"primary",onClick:h,isDisabled:b,isLoading:k,loadingText:d,children:d}),u&&(0,l.jsx)(a.Text,{color:"foreground",fontSize:"12px",textAlign:"center",mb:"10px",lineHeight:1,mt:2,children:u})]})},P=N;var T=e=>{var o;return e?(o=e==null?void 0:e.chains)==null?void 0:o.includes("SOL"):!1};var r=require("react/jsx-runtime"),O=({primaryAddress:e,isUnstoppableDomain:o,isEnsDomain:n,isBnsDomain:t,isSolanaDomain:i,setFilterChains:c,setShowWallets:f,selectedWallet:d,checkNetwork:h,requestNetworkSwitch:b,selectedDomain:u,address:k,isEnoughBalance:x,isFetchingLatestPrice:A,payableAmount:D,payUsing:E,mintDomain:W,collectionChainId:q})=>{let v=()=>o?["EVM","SOL"]:n||t?["EVM"]:["SOL"];return(0,r.jsx)(s.Box,{mt:"4",children:(0,r.jsxs)(P,{validators:[{should:!!e,fallbackProps:{onClick:()=>{let L=v();c(L),f(!0)},children:"Connect Wallet"}},{should:T(d)?!0:h(),fallbackProps:{onClick:b,children:"Switch Network"}},{should:!!u,fallbackProps:{onClick:()=>{},children:"Select Domain",disabled:!0}},{should:i||!!k,fallbackProps:{onClick:()=>{},children:"Enter Ethereum address..",disabled:!0}},{should:x,fallbackProps:{onClick:()=>{},children:"Insufficient balance",disabled:!0}},{should:!A,fallbackProps:{onClick:()=>{},children:"Fetching best price..",disabled:!0}}],onClick:W,children:[(0,r.jsxs)(s.Box,{mr:"20px",children:[(0,r.jsxs)(s.Text,{color:"background",fontSize:12,children:[D," ",E.ticker]}),(0,r.jsx)(s.Text,{color:"background",textAlign:"left",fontSize:"8px",mt:"2px",children:"Total amount"})]}),(0,r.jsx)(s.Text,{color:"background",children:"Mint"})]})})},U=O;
