<?php require __DIR__ . '/../../layouts/header.php'; $lang=current_lang(); ?>
<?php $t=fn($ar,$en)=>($lang==='ar'?$ar:$en); $row=$row??null; ?>

<div class="container py-3">
  <h4 class="mb-3"><i class="fa-solid fa-pen"></i> <?= e($t('بيانات المؤتمر','Conference')) ?></h4>

  <div class="card border-0 shadow-sm">
    <div class="card-body">
      <form method="post" action="<?= e(base_path('admin/conferences/save')) ?>" class="row g-2">
        <input type="hidden" name="id" value="<?= e((string)($row['id']??0)) ?>">
        <div class="col-md-6">
          <label class="form-label"><?= e($t('العنوان إنجليزي','Title (EN)')) ?></label>
          <input class="form-control" name="title_en" value="<?= e((string)($row['title_en']??'')) ?>">
        </div>
        <div class="col-md-6">
          <label class="form-label"><?= e($t('العنوان عربي','Title (AR)')) ?></label>
          <input class="form-control" name="title_ar" value="<?= e((string)($row['title_ar']??'')) ?>">
        </div>
        <div class="col-md-4">
          <label class="form-label"><?= e($t('الحالة','Status')) ?></label>
          <select class="form-select" name="is_active">
            <option value="1" <?= ((int)($row['is_active']??1)===1?'selected':'') ?>>ON</option>
            <option value="0" <?= ((int)($row['is_active']??1)===0?'selected':'') ?>>OFF</option>
          </select>
        </div>
        <div class="col-12 d-grid mt-2">
          <button class="btn btn-success"><i class="fa-solid fa-floppy-disk"></i> <?= e($t('حفظ','Save')) ?></button>
        </div>
      </form>
    </div>
  </div>
</div>

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