<template>
    <div class="success-prompt-fullscreen">
        <img class="success-prompt-img" src="@/assets/images/vector.png" alt="success" />
        <div class="success-prompt-title">{{ props.title }}</div>
        <div class="success-prompt-desc">{{ props.desc }}</div>
        <div class="fixed-btn">
            <div class="cwg-button">
                <van-button type="primary" block @click="props.btnClick">{{ props.btnTitle }}</van-button>
            </div>
        </div>
    </div>
</template>

<script setup lang="ts">
const props = withDefaults(
    defineProps<{
        title?: string
        btnTitle?: string
        desc?: string
        btnClick?: () => void
    }>(),
    {
        title: 'Retrive Successfully',
        btnTitle: 'Done',
        desc: 'You can now use your new password to make secure transactions.',
        btnClick: () => {},
    },
)
</script>

<style scoped lang="scss">
.success-prompt-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}
.success-prompt-img {
    margin-bottom: 32px;
}
.success-prompt-title {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: #222;
    line-height: 28px;
    margin-bottom: 16px;
}
.success-prompt-desc {
    font-size: 16px;
    color: #666;
    text-align: center;
    max-width: 320px;
    line-height: 24px;
}
</style>
