<?php $__env->startSection('title', 'إعدادات الدفع'); ?>
<?php $__env->startSection('heading', 'إعدادات الدفع'); ?>
<?php $__env->startSection('subheading', 'فعّل وسائل الدفع وأدخل بيانات التحويل — زين كاش، ماستر، Google Pay، Apple Pay، بطاقة مدار'); ?>

<?php $__env->startSection('content'); ?>
    <div class="mb-6 flex flex-wrap items-center gap-3">
        <a href="<?php echo e(route('admin.payments.reviews')); ?>"
           class="inline-flex items-center gap-2 rounded-xl bg-amber-600 px-4 py-2.5 text-sm font-bold text-white hover:bg-amber-700">
            مراجعة المدفوعات
        </a>
    </div>

    <form method="post" action="<?php echo e(route('admin.payments.settings.update')); ?>" class="space-y-6">
        <?php echo csrf_field(); ?>
        <?php echo method_field('PUT'); ?>

        <?php $__currentLoopData = $methods; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $method): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <div class="rounded-2xl border border-zinc-200 bg-white p-6 shadow-sm">
                <div class="flex flex-wrap items-start justify-between gap-4 border-b border-zinc-100 pb-4">
                    <div>
                        <h3 class="text-lg font-bold text-zinc-900"><?php echo e($method->name_ar); ?></h3>
                        <p class="mt-1 font-mono text-xs text-zinc-500"><?php echo e($method->slug); ?></p>
                    </div>
                    <label class="flex cursor-pointer items-center gap-3 rounded-xl border border-zinc-200 bg-zinc-50 px-4 py-2.5">
                        <input type="checkbox" name="enabled[]" value="<?php echo e($method->id); ?>" class="size-4 rounded border-zinc-300 text-teal-600"
                               <?php if($method->is_enabled): echo 'checked'; endif; ?>>
                        <span class="text-sm font-semibold text-zinc-800">مفعّل للمستخدمين</span>
                    </label>
                </div>

                <input type="hidden" name="methods[<?php echo e($loop->index); ?>][id]" value="<?php echo e($method->id); ?>">

                <div class="mt-4 grid gap-4 sm:grid-cols-2">
                    <div>
                        <label class="mb-1 block text-sm font-medium text-zinc-700">تسمية الحساب (مثال: رقم زين كاش)</label>
                        <input type="text" name="methods[<?php echo e($loop->index); ?>][account_label]" maxlength="120"
                               value="<?php echo e(old('methods.'.$loop->index.'.account_label', $method->account_label)); ?>"
                               class="w-full rounded-xl border border-zinc-300 px-4 py-2.5 text-sm">
                    </div>
                    <div>
                        <label class="mb-1 block text-sm font-medium text-zinc-700">قيمة الحساب / الرقم</label>
                        <input type="text" name="methods[<?php echo e($loop->index); ?>][account_value]" maxlength="255"
                               value="<?php echo e(old('methods.'.$loop->index.'.account_value', $method->account_value)); ?>"
                               class="w-full rounded-xl border border-zinc-300 px-4 py-2.5 font-mono text-sm" dir="ltr">
                    </div>
                </div>

                <div class="mt-4">
                    <label class="mb-1 block text-sm font-medium text-zinc-700">تعليمات للمستخدم</label>
                    <textarea name="methods[<?php echo e($loop->index); ?>][instructions]" rows="3" maxlength="5000"
                              class="w-full rounded-xl border border-zinc-300 px-4 py-2.5 text-sm"><?php echo e(old('methods.'.$loop->index.'.instructions', $method->instructions)); ?></textarea>
                </div>
            </div>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

        <div class="flex justify-end">
            <button type="submit" class="rounded-xl bg-madar-950 px-8 py-3 text-sm font-bold text-white hover:bg-madar-900">
                حفظ إعدادات الدفع
            </button>
        </div>
    </form>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.admin', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\wamp64\www\madar-backend\resources\views\admin\payments\settings.blade.php ENDPATH**/ ?>