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