<template>
  <Login v-if="screen === 'login'" />
<!--  <Register v-if="screen === 'register'" />-->
  <Game v-if="screen === 'game'" />
</template>

<script setup lang="ts">
import Game from '@/components/Game.vue'
import Login from '@/components/screens/Login.vue'
import { onMounted, onUnmounted, type Ref, ref } from 'vue'
import SocketioService from '@/services/socketio.service';

const screen:Ref<string> = ref('login');

onMounted(() => {
  SocketioService.setupSocketConnection();
});

onUnmounted(() => {
  SocketioService.disconnect();
});
</script>