<?php $__template->layout('Layout.main'); ?>
<?php $__template->section('title'); ?>التسعير<?php $__template->endSection(); ?>
<?php $__template->section('content'); ?>
<div class="card">
    <div class="table-responsive">
        <table class="data-table">
            <thead>
                <tr><th>الفرع</th><th>المؤهل</th><th>النوع</th><th>السعر</th><th>من</th><th>إلى</th><th>الإجراءات</th></tr>
            </thead>
            <tbody>
                <?php foreach ($configs as $c): ?>
                <tr>
                    <td><?= e($c['branch_name']) ?></td>
                    <td><?= e($c['qualification_name']) ?></td>
                    <td><?= e($c['membership_type']) ?></td>
                    <td style="font-weight:700;direction:ltr;text-align:right;"><?= money($c['price']) ?></td>
                    <td style="font-size:12px;"><?= e($c['effective_from']) ?></td>
                    <td style="font-size:12px;"><?= e($c['effective_to'] ?? '—') ?></td>
                    <td><?php if (can('pricing.edit')): ?><a href="/pricing/<?= (int) $c['id'] ?>/edit" class="btn btn-sm btn-outline">تعديل</a><?php endif; ?></td>
                </tr>
                <?php endforeach; ?>
                <?php if (empty($configs)): ?>
                <tr><td colspan="7" style="text-align:center;padding:40px;color:#6B7280;">لا توجد تسعيرات</td></tr>
                <?php endif; ?>
            </tbody>
        </table>
    </div>
</div>
<?php $__template->endSection(); ?>