<?php require __DIR__ . '/../layouts/header.php'; $lang=current_lang(); ?>

<div class="d-flex justify-content-between align-items-center flex-wrap gap-2 mb-3">
  <h3 class="mb-0"><i class="fa-solid fa-bolt me-2"></i><?= e($lang==='ar'?'إجراءات سريعة':'Quick Actions') ?></h3>
  <a class="btn btn-outline-secondary btn-rounded" href="<?= e(base_path('admin/dashboard')) ?>"><i class="fa-solid fa-arrow-left me-2"></i><?= e(trans('back')) ?></a>
</div>

<div class="card shadow-sm border-0 mb-3">
  <div class="card-body">
    <form method="post" action="<?= e(base_path('admin/switch-conference')) ?>" class="row g-2 align-items-end">
      <input type="hidden" name="_csrf" value="<?= e(csrf_token()) ?>">
      <input type="hidden" name="back" value="admin/quick-actions">
      <div class="col-md-10">
        <label class="form-label"><?= e($lang==='ar'?'المؤتمر الحالي':'Current Conference') ?></label>
        <select name="conference_id" class="form-select">
          <?php foreach (($conferences ?? []) as $c): ?>
            <option value="<?= e((string)$c['id']) ?>" <?= ((int)$conference_id===(int)$c['id'])?'selected':'' ?>>
              <?= e($lang==='ar' ? (string)($c['title_ar']??'') : (string)($c['title_en']??'')) ?>
            </option>
          <?php endforeach; ?>
        </select>
      </div>
      <div class="col-md-2 d-grid">
        <button class="btn btn-primary btn-rounded"><i class="fa-solid fa-check me-2"></i><?= e($lang==='ar'?'تطبيق':'Apply') ?></button>
      </div>
    </form>
  </div>
</div>

<div class="row g-3">
  <div class="col-lg-6">
    <div class="card shadow-sm border-0 h-100">
      <div class="card-body">
        <div class="fw-bold mb-2"><i class="fa-solid fa-user-check me-2"></i><?= e($lang==='ar'?'توزيع المحكمين':'Assign Reviewers') ?></div>
        <div class="text-muted small mb-3"><?= e($lang==='ar'?'اذهب مباشرة لصفحة التوزيع للمؤتمر الحالي.':'Jump to assignments page for current conference.') ?></div>
        <a class="btn btn-outline-primary btn-rounded" href="<?= e(base_path('admin/review-assignments?conference_id='.(int)$conference_id.'&round_no=1')) ?>">
          <i class="fa-solid fa-arrow-right me-2"></i><?= e($lang==='ar'?'فتح صفحة التوزيع':'Open Assignments') ?>
        </a>
      </div>
    </div>
  </div>

  <div class="col-lg-6">
    <div class="card shadow-sm border-0 h-100">
      <div class="card-body">
        <div class="fw-bold mb-2"><i class="fa-solid fa-gavel me-2"></i><?= e($lang==='ar'?'لوحة القرارات':'Decision Board') ?></div>
        <div class="text-muted small mb-3"><?= e($lang==='ar'?'اذهب للقرارات للمؤتمر الحالي بدون اختيار متكرر.':'Open decision board for current conference.') ?></div>
        <a class="btn btn-outline-dark btn-rounded" href="<?= e(base_path('admin/decision-board?conference_id='.(int)$conference_id.'&round_no=1')) ?>">
          <i class="fa-solid fa-arrow-right me-2"></i><?= e($lang==='ar'?'فتح لوحة القرارات':'Open Decision Board') ?>
        </a>
      </div>
    </div>
  </div>

  <div class="col-12">
    <div class="card shadow-sm border-0">
      <div class="card-body d-flex justify-content-between align-items-center flex-wrap gap-2">
        <div>
          <div class="fw-bold"><i class="fa-solid fa-folder-open me-2"></i><?= e($lang==='ar'?'التقديمات':'Submissions') ?></div>
          <div class="text-muted small"><?= e($lang==='ar'?'عرض التقديمات للمؤتمر الحالي.':'View submissions for current conference.') ?></div>
        </div>
        <a class="btn btn-success btn-rounded" href="<?= e(base_path('admin/submissions?conference_id='.(int)$conference_id)) ?>">
          <i class="fa-solid fa-arrow-right me-2"></i><?= e($lang==='ar'?'فتح التقديمات':'Open Submissions') ?>
        </a>
      </div>
    </div>
  </div>
</div>

<?php require __DIR__ . '/../layouts/footer.php'; ?>
