<?php $__env->startSection('title', 'Edit Admin User'); ?>
<?php $__env->startSection('page-title', 'Edit Admin User'); ?>

<?php $__env->startSection('content'); ?>
<div class="container-fluid">
  <div class="d-flex flex-column flex-sm-row justify-content-between align-items-start align-items-sm-center mb-4 gap-2">
    <h2 class="fw-bold text-dark mb-0">
      <i class="fas fa-edit text-success me-2"></i>Edit Admin
    </h2>
    <a href="<?php echo e(route('admin.admin-users.index')); ?>" class="btn btn-outline-secondary rounded-pill">
      <i class="fas fa-arrow-left me-2"></i>Back
    </a>
  </div>

  <div class="card border-0 rounded-4 shadow-sm">
    <div class="card-body p-4">
      <form action="<?php echo e(route('admin.admin-users.update', $adminUser)); ?>" method="POST">
        <?php echo csrf_field(); ?> <?php echo method_field('PUT'); ?>

        <div class="mb-3">
          <label class="form-label fw-semibold">Name <span class="text-danger">*</span></label>
          <input type="text" name="name" value="<?php echo e(old('name', $adminUser->name)); ?>" class="form-control rounded-3" required>
        </div>

        <div class="mb-3">
          <label class="form-label fw-semibold">Email <span class="text-danger">*</span></label>
          <input type="email" name="email" value="<?php echo e(old('email', $adminUser->email)); ?>" class="form-control rounded-3" required>
        </div>

        <div class="row g-3">
          <div class="col-md-6">
            <label class="form-label fw-semibold">New Password</label>
            <input type="password" name="password" class="form-control rounded-3">
            <div class="form-text">Leave blank to keep current</div>
          </div>
          <div class="col-md-6">
            <label class="form-label fw-semibold">Confirm Password</label>
            <input type="password" name="password_confirmation" class="form-control rounded-3">
          </div>
        </div>

        <?php if($adminUser->id === auth('admin')->id()): ?>
          <div class="alert alert-info mt-3 mb-0">
            <i class="fas fa-info-circle me-2"></i>You are editing your own account.
          </div>
        <?php endif; ?>

        <div class="d-flex flex-column flex-sm-row justify-content-between gap-2 mt-4">
          <a href="<?php echo e(route('admin.admin-users.index')); ?>" class="btn btn-outline-secondary rounded-pill">Cancel</a>
          <button type="submit" class="btn btn-success rounded-pill px-4">Update Admin</button>
        </div>
      </form>
    </div>
  </div>
</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH E:\xampp2\htdocs\ayz\resources\views/admin/admin-users/edit.blade.php ENDPATH**/ ?>