<template>
  <div class="container">
    <svg-icon name="login" class="login-icon-bg" />
    <div class="login-box">
      <span class="login-title-main">{{ $t("login.Wallet") }}</span>
      <span class="login-title-hint">{{ $t("login.Support") }}ACC、BTC、ETH、TRX、BS</span>
    </div>


    <div class="operation-body">
      <van-button type="primary" round @click="showBottom = true">{{ $t("login.CreateWallet") }}</van-button>
      <van-button   class="operation-button" type="default" round @click="showBottom = true">{{ $t("login.ImportWallet")}}</van-button>
    </div>

    <div class="bottom-body">
      <van-radio-group v-model="checked"><van-radio name="1" icon-size="16"  style="margin-right: 6px;"  /></van-radio-group>
      
      <span> {{ $t("login.LoginTxt") }} Angel Toke</span>
      <a class="a-link">{{ $t("login.PrivacyPolicy") }}</a>
      <span>和</span>
      <a class="a-link">{{ $t("login.UserAgreement") }}</a>
    </div>
  </div>


  <van-popup
    v-model:show="showBottom"
    round
    position="bottom"
    :style="{ height: '30.4%' }"
  >
    <div class="popup-content">
      <span class="popup-title">{{  $t("login.UserAgreement") }}</span>
      <span  class="popup-txt">{{  $t("login.UserAgreementTxt") }}</span>


      <van-button type="primary" round class="popup-btn" color="#4F4F4F"  @click="evAgree">{{ $t("login.IHaveReadAndAgree") }}</van-button>
      <span class="popup-cancel" @click="showBottom = false">{{ $t("login.Cancel") }}</span>
    </div>
  </van-popup>
</template>
<script setup>


const router = useRouter()
 
const checked = ref('')
const showBottom = ref(false)

const evAgree = ()=>{
  router.push({
    path: '/selectNetwork'
  })
}

</script>

<style scoped lang="less">
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  .login-icon-bg {
    width: 285px;
    height: 305px;
    margin-top: 110px;
  }
  .login-box {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .login-title-main { 
    font-weight: 500;
    font-size: 25px;
    margin: 0 0 9px 0;
  }
  .login-title-hint {
    font-weight: 400;
    font-size: 15px;
    color: @font-color2;
  }

  .operation-body{
    width: 312px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    margin-top: 90px;
    .operation-button{
      margin-top: 23px;
    }
  }
  .bottom-body{
    display: flex;
    align-items: center;
    font-size: 12px;
    margin-top: 30px;
  }
  .a-link{
    margin: 0 5px;
  }

}
.popup-content{
  display: flex;
  flex-direction:column;
  align-items: center;
  height: 100%;
  width: 100%;
  .popup-title{
    font-size: 17px;
    font-weight: 500px;
    margin-top: 32px;
  }
  .popup-txt{
    font-size: 12px;
    margin: 17px 23px 0 23px;
    color: @font-color2;
    letter-spacing: 1px;
  }
  .popup-btn{
    margin-top: 30px;
    width: 312px;
    height: 54px; 
    border-radius: 70px 70px 70px 70px;
    :deep(.van-button__text){
      font-size: 19px;
    }
  }
  .popup-cancel{
    margin-top: 19px;
    font-size: 19px;
    color: @font-color2;
    &:hover {
      cursor: pointer;
      color: @hover-color;
    }
  }
}
</style>
