<?php require __DIR__ . '/../../layouts/header.php'; $lang=current_lang(); ?>
<div class="container" style="max-width:900px">
  <h4 class="mb-3"><i class="fa-solid fa-plus me-2"></i><?= e($lang==='ar'?'إضافة محرر':'Add Editor') ?></h4>
  <?php if (!empty($err)): ?><div class="alert alert-danger"><?= e((string)$err) ?></div><?php endif; ?>
  <div class="card border-0 shadow-sm"><div class="card-body">
    <form method="post" action="<?= e(base_path('admin/editors/store')) ?>" class="row g-3">
      <input type="hidden" name="_csrf" value="<?= e(csrf_token()) ?>">
      <div class="col-md-6"><label class="form-label">Email</label><input class="form-control" name="email" required></div>
      <div class="col-md-3"><label class="form-label"><?= e($lang==='ar'?'الاسم الأول':'First') ?></label><input class="form-control" name="first_name"></div>
      <div class="col-md-3"><label class="form-label"><?= e($lang==='ar'?'اسم العائلة':'Last') ?></label><input class="form-control" name="last_name"></div>
      <div class="col-12 d-flex gap-2">
        <button class="btn btn-primary btn-rounded"><?= e($lang==='ar'?'حفظ':'Save') ?></button>
        <a class="btn btn-outline-secondary btn-rounded" href="<?= e(base_path('admin/editors')) ?>"><?= e($lang==='ar'?'رجوع':'Back') ?></a>
      </div>
    </form>
  </div></div>
</div>
<?php require __DIR__ . '/../../layouts/footer.php'; ?>
