<?= $this->layout('_theme', ['title' => $title, 'subtitle' => 'Gerenciar todos os pacotes']); ?>

<div class="flex flex-wrap gap-5 justify-center">
    <?php if ($packages) : foreach ($packages as $packages) : ?>
            <div class="bg-gray-100 p-2 rounded-lg w-full max-w-xs text-[13px] text-center">
                <p class="bg-neutral-800 text-white p-1 rounded-lg"><?= $packages->title ?></p>
                <div class="actions flex gap-5 justify-center mt-4">
                    <a class="bg-yellow-500 text-neutral-900 p-1 rounded-sm inline-block hover:bg-yellow-300" href="<?= __redirect("administration/to/edit/package/{$packages->id}") ?>" class="button-warning"> Editar </a>
                    <p class="button-danger bg-gray-500 text-white p-1 rounded-sm inline-block cursor-pointer hover:bg-gray-300"> Remover
                        <a class="hidden bg-gray-500 absolute top-0 left-0 text-white p-1 rounded-sm hover:bg-gray-300" href="<?= __redirect("administration/auth/to/remove/packages/{$packages->id}") ?>">Continuar?</a>
                    </p>
                </div>
            </div>
        <?php endforeach;
    else : ?>
        <div class="p-1 bg-yellow-300 text-sm rounded-full text-black text-center w-full">Não há pacotes adicionado no momento</div>
    <?php endif; ?>

</div>