import"react";import{Box as R,Text as A,useToast as F}from"@chakra-ui/react";import{isAddress as _}from"@ethersproject/address";import B from"@emotion/styled";import h from"react";import{createMultiStyleConfigHelpers as x,defineStyle as y,FormControl as S,Input as C,InputGroup as I,Text as i}from"@chakra-ui/react";import{inputAnatomy as v}from"@chakra-ui/anatomy";import{jsx as n,jsxs as l}from"react/jsx-runtime";var p=h.forwardRef(({label:t,error:e,placeholder:d,helperText:s,isInvalid:o,as:r=C,InputLeftAddon:m,InputRightAddon:f,...a},g)=>{let{disabled:b}=a;return l(S,{isInvalid:o,opacity:b?.4:1,children:[t&&n(i,{color:o?"destructive":"foreground",fontWeight:"medium",fontSize:"sm",lineHeight:1,children:t}),l(I,{mt:"2",children:[m,n(r,{variant:"",placeholder:d,...a,ref:g}),f]}),s&&n(i,{fontSize:"xs",mt:2,color:"mutedForeground",children:s}),o&&e&&n(i,{fontSize:"xs",mt:2,color:"destructive",children:e})]})}),{definePartsStyle:u,defineMultiStyleConfig:T}=x(v.keys),k=u({field:{color:"foreground",background:"background",boxShadow:"base",borderWidth:"1px",borderStyle:"solid",borderColor:"input",borderRadius:"lg",_focusVisible:{borderColor:"ring"},_hover:{},_disabled:{opacity:1},_placeholder:{color:"mutedForeground"}}}),z=y({borderRadius:"md"}),w={sm:u({field:z})},V=T({baseStyle:k,sizes:w});import{jsx as c,jsxs as G}from"react/jsx-runtime";var W=B(R)`
  position: relative;
  &:after {
    content: '';
    position: absolute;
    top: -30px;
    width: 100%;
    height: 32px;
    background: rgb(255, 255, 255);
    background: linear-gradient(0deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: 1;
  }
`,E=({address:t,setAddress:e})=>{let d=F();return G(W,{paddingY:4,children:[c(p,{placeholder:"Enter ethereum wallet address",value:t,onChange:o=>{let r=o.target.value;_(r)?e(r):(d({title:"Invalid ethereum address",description:"Please enter valid address",status:"error"}),e(""))}}),c(A,{fontSize:14,mt:2,children:"Note: Enter correct wallet address for domain mapping. We are not liable for any discrepancies caused by an incorrect address"})]})},U=E;export{U as default};
