<script>
    import { generateWorld } from "../../../Game/Game";
    import { UIGlobalPipe } from "../../GlobalNamespace/GlobalNamespace";
    import Hud from "../HUD/HUD.svelte";
    import NotImplementedYet from "../NotImplementedYet/NotImplementedYet.svelte";
</script>

<div id="state-main-menu" class="w-full h-full flex justify-center items-center bg-slate-950 pointer-events-auto">
    <div class="flex flex-col p-2 gap-2">
        <button on:click={()=>{
            UIGlobalPipe.update((s)=>{
                s.currentStateComponent = Hud;
            });
            generateWorld();
        }} class="min-w-[20vw] bg-slate-800 hover:bg-slate-800 p-4 text-2xl border-2 border-slate-700 hover:border-amber-600">New game</button>
        <button on:click={()=>{
            UIGlobalPipe.update((s)=>{
                s.currentStateComponent = NotImplementedYet;
            })
        }} class="min-w-[20vw] bg-slate-800 hover:bg-slate-800 p-4 text-2xl border-2 border-slate-700 hover:border-amber-600">Join game</button>
        <button on:click={()=>{
            UIGlobalPipe.update((s)=>{
                s.currentStateComponent = NotImplementedYet;
            })
        }} class="min-w-[20vw] bg-slate-800 hover:bg-slate-800 p-4 text-2xl border-2 border-slate-700 hover:border-amber-600">Options</button>
    </div>
</div>
