<?= $this->layout('_theme', ['title' => $title, 'subtitle' => 'Adicionar nova item']); ?>

<div class="p-4 bg-gray-100 rounded-lg">
    <form action="<?= __redirect('administration/auth/edit/kit/category/all/' . $item->id) ?>">
        <div>
            <p class="px-1 py-3 text-[13px]">Nome do kit<sup>*</sup></p>
            <input class="rounded-sm p-2 my-1 text-xs w-full border border-neutral-400 focus:outline-none focus:bg focus:bg-neutral-100" type="text" name="name" value="<?= $item->name ?>" placeholder="Nome do item" maxlength="80">
        </div>

        <div>
            <p class="px-1 py-3 text-[13px]">Imagem do kit<sup>*</sup></p>
            <input class="rounded-sm p-2 my-1 text-xs w-full border border-neutral-400 focus:outline-none focus:bg focus:bg-neutral-100" type="file" name="image">
        </div>

        <div>
            <p class="px-1 py-3 text-[13px]">Preço do kit<sup>*</sup></p>
            <input class="rounded-sm p-2 my-1 text-xs w-full border border-neutral-400 focus:outline-none focus:bg focus:bg-neutral-100" type="text" name="price" value="<?= $item->price ?>" placeholder="Preço do item">
        </div>

        <div>
            <p class="px-1 py-3 text-[13px]">Classe<sup>*</sup></p>
            <select name="class" class="rounded-sm p-2 my-1 text-xs w-full border border-neutral-400 focus:outline-none focus:bg focus:bg-neutral-100">
                <option value="geral"> - Geral (Todas as classes)</option>
                <?php foreach (characters['classes'] as $class) : ?>
                    <option value="<?= $class['short_name'] ?>" <?= $item->class == $class['short_name'] ? 'selected' : '' ?>> - <?= $class['name'] ?></option>
                <?php endforeach; ?>
            </select>
        </div>

        <button class="rounded-lg py-3 px-6 bg-sky-500 text-white block mt-4 mx-auto text-sm border-2 border-sky-400 hover:bg-sky-700 transition ease-in-out duration-500" type="submit">Adicionar</button>
    </form>
</div>