<script setup lang="ts">
    import { onMounted } from 'vue';

    onMounted(() => {
        if (window.opener) {
            setTimeout(() => {
                window.opener.postMessage({ type: 'authSuccess' });
                window.close();
            }, 1500);
        }
    });
</script>

<template>
    <q-layout class="bg-secondary">
        <q-page-container>
            <q-page class="column items-center justify-center q-pa-xl">
                <transition appear enter-active-class="animated slow flipInX" leave-active-class="animated flipOutX">
                    <q-card class="col-3 items-center">
                        <q-card-section  class="row justify-center ">
                            <q-icon name="check_circle" color="accent" size="xl" />
                        </q-card-section>
                        <q-separator inset color="accent" />
                        <q-card-section class="row justify-center">
                            <span class="row text-h3">Login Successful!</span>
                        </q-card-section>
                    </q-card>
                </transition>
            </q-page>
        </q-page-container>
    </q-layout>  
</template>