<template>
<el-dialog v-model="dialogVisible" width="637" class="dialog-box"
    align-center
    destroy-on-close
    :close-on-click-modal="false"
    :close-on-press-escape="false"
    :show-close="false">
    <template #header="{ close, titleId, titleClass }">
        <div class="msg-header" >
            <svg-icon icon-class="auth" class="header-icon" />
            <div class="header-title">{{ t('form.personalData.kyc.step') }}</div>
            <div class="header-close" >
            <el-icon color="rgba(196, 196, 196, 1)" @click="close" ><Close /></el-icon>
            </div>
        </div>
    </template>
    <div class="msg-body" >
        <div style="margin-top: 16px;margin-bottom: 45px;font-size: 20px;font-weight: 400;">{{ t('form.personalData.kyc.step0') }}</div>
        <el-steps direction="vertical" :space="90">
            <el-step>
                <template #title>
                    <div>{{ t('form.personalData.kyc.step1') }}</div>
                </template>
                <template #description>
                    <div>{{ t('form.personalData.kyc.step1_1') }}</div>
                </template>
                <template #icon>
                    <svg-icon icon-class="step1" style="width: 36px;height: 36px;" />
                </template>
            </el-step>
            <el-step>
                <template #title>
                    <div>{{ t('form.personalData.kyc.step2') }}</div>
                </template>
                <template #description>
                    <div>{{ t('form.personalData.kyc.step2_1') }}</div>
                </template>
                <template #icon>
                    <svg-icon icon-class="step2" style="width: 36px;height: 36px;" />
                </template>
            </el-step>
            <el-step>
                <template #title>
                    <div>{{ t('form.personalData.kyc.step3') }}</div>
                </template>
                <template #description>
                    <div>{{ t('form.personalData.kyc.step3_1') }}</div>
                </template>
                <template #icon>
                    <svg-icon icon-class="step3" style="width: 36px;height: 36px;" />
                </template>
            </el-step>
            <el-step>
                <template #title>
                    <div>{{ t('form.personalData.kyc.step4') }}</div>
                </template>
                <template #description>
                    <div>{{ t('form.personalData.kyc.step4_1') }}</div>
                </template>
                <template #icon>
                    <svg-icon icon-class="step4" style="width: 36px;height: 36px;" />
                </template>
            </el-step>
        </el-steps>
        <router-link to="/profile" v-slot="{ navigate }" >
            <el-button @click="navigate" style="width: 100%;height: 50px;font-size: 18px;" type="primary">{{ t('form.personalData.kyc.start') }}</el-button>
        </router-link>
    </div>
</el-dialog>

</template>

<script setup>
import { useLocale } from 'element-plus'
import { ref, defineModel, watch } from 'vue';

const { proxy } = getCurrentInstance();
const { t } = useLocale()
const dialogVisible = defineModel("show")

</script>

<style lang="scss" scoped>
:deep(.el-step.is-vertical .el-step__main) {
    padding-left: 26px;
}

:deep(.el-step__title) {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: rgba(51, 51, 51, 1) !important;
    margin-bottom: 10px;
}

:deep(.el-step__description) {
    font-size: 16px;
    font-weight: 400;
    color: rgba(119, 119, 119, 1);
}

.msg-body {
    padding: 0 50px 20px;
}
</style>

<style lang="scss">
.dialog-box {
    border-radius: 16px;
    padding: 0;

    .el-dialog__header {
        margin-right: 0;
        padding: 0;
        overflow: hidden;
    }

    .el-dialog__body {
        box-sizing: border-box;
        padding: 16px 22px;
        min-height: 250px;
    }

    .msg-header {
        border-radius: 16px 16px 0 0;
        width: 100%;
        height: 50px;
        position: relative;
        overflow: hidden;
        background-color: #0F3675;
        display: flex;
        align-items: center;
        color: #fff;

        .header-icon {
            width: 25px;
            height: 28px;
            margin-left: 22px;
            margin-right: 14px;
        }

        .header-title {
            font-size: 26px;
            font-weight: 700;
        }

        .header-close {
            cursor: pointer;
            position: absolute;
            bottom: 0;
            right: 20px;
            font-size: 32px;
        }
    }

    .msg-body {
        background-color: #ffffff;
    }
}
</style>