<?php $item = $row ?? null; ?>
<div class="row g-3">
    <div class="col-md-12">
        <label class="form-label"><?= e(trans('submissions')) ?></label>
        <select name="submission_id" class="form-select rounded-3">
            <option value="0">--</option>
            <?php foreach ($submissions as $s): ?>
                <option value="<?= e((string) $s['id']) ?>" <?= ((int) ($item['submission_id'] ?? 0) === (int) $s['id']) ? 'selected' : '' ?>>
                    <?= e((string) ($s['submission_no'] ?? '')) ?> — <?= e((string) ($s['title'] ?? '')) ?>
                </option>
            <?php endforeach; ?>
        </select>
    </div>
    <div class="col-md-6"><label class="form-label"><?= e(trans('title_en')) ?></label><input type="text" name="title_en" class="form-control rounded-3" value="<?= e((string) ($item['title_en'] ?? '')) ?>"></div>
    <div class="col-md-6"><label class="form-label"><?= e(trans('title_ar')) ?></label><input type="text" name="title_ar" class="form-control rounded-3" value="<?= e((string) ($item['title_ar'] ?? '')) ?>"></div>
    <div class="col-md-4"><label class="form-label"><?= e(trans('presenter_name_en')) ?></label><input type="text" name="presenter_name_en" class="form-control rounded-3" value="<?= e((string) ($item['presenter_name_en'] ?? '')) ?>"></div>
    <div class="col-md-4"><label class="form-label"><?= e(trans('presenter_name_ar')) ?></label><input type="text" name="presenter_name_ar" class="form-control rounded-3" value="<?= e((string) ($item['presenter_name_ar'] ?? '')) ?>"></div>
    <div class="col-md-4"><label class="form-label"><?= e(trans('presenter_email')) ?></label><input type="email" name="presenter_email" class="form-control rounded-3" value="<?= e((string) ($item['presenter_email'] ?? '')) ?>"></div>
    <div class="col-md-4"><label class="form-label"><?= e(trans('start_time')) ?></label><input type="time" name="start_time" class="form-control rounded-3" value="<?= e((string) ($item['start_time'] ?? '')) ?>"></div>
    <div class="col-md-4"><label class="form-label"><?= e(trans('end_time')) ?></label><input type="time" name="end_time" class="form-control rounded-3" value="<?= e((string) ($item['end_time'] ?? '')) ?>"></div>
    <div class="col-md-4"><label class="form-label"><?= e(trans('sort_order')) ?></label><input type="number" name="sort_order" class="form-control rounded-3" value="<?= e((string) ($item['sort_order'] ?? 0)) ?>"></div>
    <div class="col-md-12">
        <div class="form-check"><input class="form-check-input" type="checkbox" name="is_active" <?= !isset($item) || !empty($item['is_active']) ? 'checked' : '' ?>><label class="form-check-label"><?= e(trans('is_active')) ?></label></div>
    </div>
    <input type="hidden" name="session_id" value="<?= e((string) $session['id']) ?>">
</div>
