<template>
  <div class="retrieve-success">
    <div class="retrieve-success-content">
      <div class="retrieve-success-content__icon">
        <div class="icon-circle">
          <img src="/register/success.png" />
        </div>
      </div>
      <div class="retrieve-success-content__tip">
        <div class="tip-title">{{ L["register"]["重置成功"] }}</div>
        <div class="tip-content">
          {{ L["register"]["密码重置成功, 5s内跳转至登录页"] }}
        </div>
        <div class="line"></div>
        <div class="login-button">
          <el-button size="large" @click="goLogin">{{
            L["register"]["立即登录"]
          }}</el-button>
        </div>
      </div>
    </div>
  </div>
</template>


<script setup>
import { getCurLanguage } from "@/composables/common.js";
import { useRouter } from "vue-router";

const L = getCurLanguage();
const router = useRouter();

const goLogin = () => {
  router.replace({
    path: "/login",
  });
};

setTimeout(() => {
  goLogin()
}, 5000)
</script>


<style lang="scss" scoped>
.retrieve-success {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 386px;
  padding: 0 20px;

  &-content {
    width: 240px;
    height: 150px;
    display: flex;

    &__icon {
      margin-right: 15px;
      .icon-circle {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 40px;
        height: 40px;
        border-radius: 100%;
        background-color: $colorMain;

        img {
          width: 20px;
        }
      }
    }

    &__tip {
      display: flex;
      flex-direction: column;

      .tip-title {
        font-size: 25px;
      }

      .tip-content {
        font-size: 12px;
        color: #85899e;
        margin-top: 10px;
      }

      .line {
        width: 200px;
        height: 0px;
        border: 0.5px solid #dcdfe6;
        margin: 30px 0;
      }

      .login-button {
        // margin-top: 10px;

        .el-button {
          background-color: $colorMain;
          color: #fff;
        }
      }
    }
  }
}
</style>