<h1>Upravit událost</h1>

<form method="post" action="">
    <div class="mb-3">
        <label class="form-label">Typ</label>
        <select name="typ" class="form-select" required>
            <option value="trenink" <?= $event['typ'] === 'trenink' ? 'selected' : '' ?>>Trénink</option>
            <option value="zapas" <?= $event['typ'] === 'zapas' ? 'selected' : '' ?>>Zápas</option>
        </select>
    </div>

    <div class="mb-3">
        <label class="form-label">Datum a čas</label>
        <input type="datetime-local" name="datum" class="form-control" required
               value="<?= date('Y-m-d\TH:i', strtotime($event['datum'])) ?>">
    </div>

    <div class="mb-3">
        <label class="form-label">Místo</label>
        <input type="text" name="misto" class="form-control"
               value="<?= htmlspecialchars($event['misto'] ?? '') ?>">
    </div>

    <div class="mb-3">
        <label class="form-label">Popis</label>
        <textarea name="popis" class="form-control" rows="4"><?= htmlspecialchars($event['popis'] ?? '') ?></textarea>
    </div>

    <button title="Uložit" class="btn btn-success"><i class="ti ti-device-floppy fs-4"></i></button>
    <a href="<?= BASE_URL ?>/kalendar/index" class="btn btn-outline-secondary" title="Zpět"><i class="ti ti-arrow-back-up fs-4"></i></a>
</form>
