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