<?php $__env->startSection('title', 'Edit Wilayah'); ?>
<?php $__env->startSection('topbar_title', 'Kelola Wilayah'); ?>

<?php $__env->startSection('content'); ?>

<div class="page-header">
    <div class="page-header-left">
        <h1>Edit Wilayah</h1>
    </div>
    <a href="<?php echo e(url('/admin/wilayah')); ?>" class="btn-outline">
        <i class="bi bi-arrow-left"></i> Kembali
    </a>
</div>

<div class="card" style="padding: 28px; max-width: 560px;">
    <?php if($errors->any()): ?>
        <div style="background:#fee2e2; border:1px solid #fca5a5; border-radius:8px; padding:12px 16px; margin-bottom:20px; font-size:13.5px; color:#dc2626;">
            <ul style="margin:0; padding-left:16px;">
                <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><li><?php echo e($error); ?></li><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </ul>
        </div>
    <?php endif; ?>

    <form action="<?php echo e(url('/admin/wilayah/update/' . $wilayah->id_wilayah)); ?>" method="POST">
        <?php echo csrf_field(); ?>
        <div style="display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-bottom:16px;">
            <div>
                <label class="form-label-styled">Nomor RT <span style="color:#ef4444;">*</span></label>
                <input type="text" name="rt" class="form-ctrl" value="<?php echo e(old('rt', $wilayah->rt)); ?>" required>
            </div>
            <div>
                <label class="form-label-styled">Nomor RW <span style="color:#ef4444;">*</span></label>
                <input type="text" name="rw" class="form-ctrl" value="<?php echo e(old('rw', $wilayah->rw)); ?>" required>
            </div>
        </div>
        <div style="margin-bottom:24px;">
            <label class="form-label-styled">Nama Wilayah / Alamat <span style="color:#ef4444;">*</span></label>
            <input type="text" name="nama_wilayah" class="form-ctrl"
                value="<?php echo e(old('nama_wilayah', $wilayah->nama_wilayah)); ?>" required>
        </div>
        <button type="submit" class="btn-primary-green" style="width:100%; justify-content:center; padding:11px;">
            <i class="bi bi-save2-fill"></i> Simpan Perubahan
        </button>
    </form>
</div>

<?php $__env->stopSection(); ?>

<?php echo $__env->make(Auth::user()->int_role == 'superadmin' ? 'layouts.superadmin' : 'layouts.admin', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH D:\Skripsi\zakat-masjid\resources\views/admin/wilayah/edit.blade.php ENDPATH**/ ?>