<script lang="ts">
    import Front from "./pages/Front.svelte";
    import Game from "./pages/Game.svelte";
    import Player from "./pages/Player.svelte";
    import { RouterView } from "@dvcol/svelte-simple-router/components";
    import type {
        Route,
        RouterOptions,
    } from "@dvcol/svelte-simple-router/models";

    const routes: Readonly<Route[]> = [
        {
            name: "front",
            path: "/",
            component: Front,
        },
        {
            name: "game",
            path: "/game/:{string}:id",
            component: Game,
        },
        {
            name: "player",
            path: "/player/:{string}:id",
            component: Player,
        },
    ];

    const options: RouterOptions = {
        routes,
    };
</script>

<main>
    <RouterView {options} />
</main>

<style>
</style>
