<template>
  <component :is="game.currentScene.type.playerView" :controller="game.currentScene.controller" :definition="game.currentScene.definition"/>
  <div class="flex flex-col justify-center items-center text-lg inset-0 absolute bg-dark-900 transition" :class="game.isConnected && 'opacity-0 pointer-events-none'">
    <span class="text-center">Verbindung wird hergestellt…</span>
  </div>
</template>

<style module lang="scss">

</style>

<script setup lang="ts">
  import { useGame } from "../game"

  const game = useGame()
</script>