import{Box as k,Text as u}from"@chakra-ui/react";import"react";import{Box as A,Button as D,Text as E}from"@chakra-ui/react";import{jsx as p,jsxs as v}from"react/jsx-runtime";var W=({validators:e,fullWidth:n=!1,...i})=>{let l=e.find(d=>!d.should),a={...i,...l?.fallbackProps},{children:o,onClick:r,disabled:s,helperText:t,isLoading:c=!1}=a;return v(A,{style:{textAlign:"center"},children:[p(D,{w:n?"full":"",variant:"primary",onClick:r,isDisabled:s,isLoading:c,loadingText:o,children:o}),t&&p(E,{color:"foreground",fontSize:"12px",textAlign:"center",mb:"10px",lineHeight:1,mt:2,children:t})]})},h=W;var b=e=>e?e?.chains?.includes("SOL"):!1;import{jsx as f,jsxs as m}from"react/jsx-runtime";var L=({primaryAddress:e,isUnstoppableDomain:n,isEnsDomain:i,isBnsDomain:l,isSolanaDomain:a,setFilterChains:o,setShowWallets:r,selectedWallet:s,checkNetwork:t,requestNetworkSwitch:c,selectedDomain:d,address:x,isEnoughBalance:S,isFetchingLatestPrice:g,payableAmount:C,payUsing:y,mintDomain:B,collectionChainId:w})=>{let P=()=>n?["EVM","SOL"]:i||l?["EVM"]:["SOL"];return f(k,{mt:"4",children:m(h,{validators:[{should:!!e,fallbackProps:{onClick:()=>{let T=P();o(T),r(!0)},children:"Connect Wallet"}},{should:b(s)?!0:t(),fallbackProps:{onClick:c,children:"Switch Network"}},{should:!!d,fallbackProps:{onClick:()=>{},children:"Select Domain",disabled:!0}},{should:a||!!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:[m(k,{mr:"20px",children:[m(u,{color:"background",fontSize:12,children:[C," ",y.ticker]}),f(u,{color:"background",textAlign:"left",fontSize:"8px",mt:"2px",children:"Total amount"})]}),f(u,{color:"background",children:"Mint"})]})})},q=L;export{q as default};
