<script setup lang="ts">
definePageMeta({
    title: 'S\'inscrire',
    auth: {
        unauthenticatedOnly: true,
        navigateAuthenticatedTo: '/user/profile'
    }
});

const username = ref<string>(), email = ref<string>(), password = ref<string>();

const { status, signUp } = useAuth();

function connect() {
    signUp({ username, password, email }, { redirect: true, callbackUrl: '/' });

    console.log(status.value);
}
</script>

<template>
    <!--<div class="site-body-center-column">
        <div class="render-container">
            <div v-if="status === 'unauthenticated'" class="not-found-container">
                <form @submit.prevent="connect" class="column gapy-1">
                    <input type="text" :value="username" placeholder="Entrez un nom d'utiliateur">
                    <input type="text" :value="email" placeholder="Entrez une addresse mail">
                    <input type="password" :value="password" placeholder="Entrez un mot de passe">
                    <button>Valider</button>
                </form>
            </div>
            <div v-else-if="status === 'loading'"></div>
            <div v-else class="not-found-container">
                <div class="not-found-title">👀 Vous n'avez rien à faire ici. 👀</div>
            </div>
        </div>
    </div>-->
</template>