<?php

use WoWPress\Frontend\Icon;
use WoWPress\Frontend\ToggleButton;
use WoWPress\Models\Character;
use WoWPress\Models\Raid;



$raid = $GLOBALS['wowpress']['raid'];
set_sidebar_status('top', false);
set_sidebar_status('left', false);
set_sidebar_status('right', false);

get_header();
?>
<div class="top-title flex flex-col lg:flex-row gap-auto" style="margin-top:calc(-1 * var(--wowp-gap))">
    <?php if ($raid->previous) : ?>
        <a href="<?= $raid->previous->link ?>" class="btn btn-outline hidden lg:flex">Vorheriger</a>
    <?php endif; ?>
    <div class="text-3xl font-bold bg-glass shadow p-3 text-center w-full">
        <?= $GLOBALS['wowpress']['page_title'] ?>
    </div>
    <?php if ($raid->next) : ?>
        <a href="<?= $raid->next->link ?>" class="btn btn-outline hidden lg:flex">Nächster</a>
    <?php endif; ?>
</div>
<section id="primary">
    <main id="main">
        <div class="flex flex-col lg:flex-row gap-auto">
            <div class="bg-glass shadow p-auto w-full lg:w-1/5 order-2 lg:order-1">
                <h3 class="text-xl font-bold text-center">Bosse</h3>
                <div class="grid gap-auto">
                    <button class="btn btn-outline btn-alliance">Alle</button>
                    <button class="btn btn-outline btn-priest">Fahrs'tuhl der Raidzerstörer</button>
                    <button class="btn btn-outline btn-priest">Hogger</button>
                    <button class="btn btn-outline btn-priest">Sylvanas linker Zeh</button>
                    <button class="btn btn-outline btn-priest">RC Loot Council (Endboss)</button>

                </div>
            </div>
            <div class="w-full flex flex-col gap-auto order-3 lg:order-2">
                <div class="flex flex-col lg:flex-row gap-auto">
                    <div class="bg-glass shadow p-auto w-full lg:w-1/5">
                        <div class="grid text-center gap-1">
                            <div class="bg-<?= $raid->color ?> text-black text-2xl "><?= format_date($raid->start, "EEEE") ?></div>
                            <div class="border border-<?= $raid->color ?>">
                                <div class="text-3xl p-auto "><?= format_date($raid->start, "dd. MMMM") ?></div>
                            </div>
                            <div class="border border-<?= $raid->color ?> p-2">Start: <?= format_date($raid->start, "HH:mm") ?></div>
                            <div class="border border-<?= $raid->color ?> p-2">Ende: <?= format_date($raid->end, "HH:mm") ?></div>
                            <?php if ($raid->difficulty) : ?>
                                <div class="border border-<?= $raid->color ?> p-2"><?= $raid->difficulty ?></div>
                            <?php endif; ?>
                        </div>
                    </div>
                    <div class="bg-glass shadow p-auto w-full">
                        <h3 class="text-xl font-bold">Informationen:</h3>

                    </div>
                </div>


                <div class="flex flex-col lg:flex-row gap-auto">
                    <div class="w-full grid grid-cols-1 lg:grid-cols-4 gap-auto">
                        <div class="bg-glass shadow p-auto flex flex-col gap-auto">
                            <h3 class="text-xl font-bold text-center">Tank</h3>


                        </div>
                        <div class="bg-glass shadow p-auto flex flex-col gap-auto">
                            <h3 class="text-xl font-bold text-center">Heal</h3>
                            <?= $raid->showSignup(Character::whereName('Pandacetamol')->first()) ?>
                        </div>
                        <div class="bg-glass shadow p-auto flex flex-col gap-auto">
                            <h3 class="text-xl font-bold text-center">Range</h3>
                            <?= $raid->showSignup(Character::whereName('Bleihagel')->first()) ?>



                        </div>
                        <div class="bg-glass shadow p-auto flex flex-col gap-auto">
                            <h3 class="text-xl font-bold text-center">Melee</h3>
                            <?= $raid->showSignup(Character::whereName('Moodyblues')->first()) ?>


                        </div>
                    </div>
                </div>
            </div>
            <div class="flex flex-col gap-auto w-full lg:w-1/5 order-1 lg:order-3">
                <div class="bg-glass shadow p-auto">
                    <div class="flex flex-col gap-auto">
                        <h3 class="text-xl font-bold text-center">Status</h3>
                        <?= $raid->showSignup(Character::first()) ?>
                    </div>
                </div>
            </div>
        </div>
        <div class="w-full order-4 bg-glass shadow p-auto flex flex-col gap-auto">
            <h3 class="text-xl font-bold text-center">Keine Rückmeldung</h3>
            <div class="grid grid-cols-1 lg:grid-cols-12 gap-auto">
                <button class="btn btn-outline btn-evoker">Yorndragon</button>
                <button class="btn btn-outline btn-mage">Aye</button>
                <button class="btn btn-outline btn-warrior">Stormranger</button>
                <button class="btn btn-outline btn-druid">Kaldori</button>
                <button class="btn btn-outline btn-shaman">Nokin</button>

            </div>
        </div>
    </main>
</section>
<?php
get_footer();
