<?php $__env->startSection('content'); ?>
    <div class="container-fluid">
        <div class="row page-titles">
            <ol class="breadcrumb">
                <li class="breadcrumb-item"><a href="<?php echo e(route('dashboard')); ?>">Dashboard</a></li>
                <li class="breadcrumb-item active"><a href="javascript:void(0)">Categories</a></li>
            </ol>
        </div>
        <?php echo $__env->make('iqec.partials.flash', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
        <div class="card">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h4 class="card-title mb-0">Courseware Categories</h4>
                <a href="<?php echo e(route('courseware-categories.create')); ?>" class="btn btn-primary btn-sm">Add Category</a>
            </div>
            <div class="card-body">
                <div class="table-responsive">
                    <table class="table table-responsive-md">
                        <thead>
                            <tr>
                                <th>Name</th>
                                <th>Status</th>
                                <th>Courseware Partners</th>
                                <th class="text-end">Actions</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php $__empty_1 = true; $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                <tr>
                                    <td><?php echo e($category->name); ?></td>
                                    <td>
                                        <?php if($category->is_active): ?>
                                            <span class="badge badge-success">Active</span>
                                        <?php else: ?>
                                            <span class="badge badge-light">Inactive</span>
                                        <?php endif; ?>
                                    </td>
                                    <td><?php echo e($category->courseware_partners_count); ?></td>
                                    <td class="text-end">
                                        <div class="dropdown ms-auto text-end">
                                            <a href="javascript:void(0);" class="btn-link" data-bs-toggle="dropdown" aria-expanded="false" aria-label="Actions">
                                                <svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg">
                                                    <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
                                                        <rect x="0" y="0" width="24" height="24"></rect>
                                                        <circle fill="currentColor" cx="5" cy="12" r="2"></circle>
                                                        <circle fill="currentColor" cx="12" cy="12" r="2"></circle>
                                                        <circle fill="currentColor" cx="19" cy="12" r="2"></circle>
                                                    </g>
                                                </svg>
                                            </a>
                                            <div class="dropdown-menu dropdown-menu-end">
                                                <a class="dropdown-item" href="<?php echo e(route('courseware-categories.edit', $category)); ?>" onclick="return confirm('Are you sure you want to edit this category?')">Edit</a>
                                                <form action="<?php echo e(route('courseware-categories.destroy', $category)); ?>" method="POST" class="m-0" onsubmit="return confirm('Are you sure you want to delete this category?')">
                                                    <?php echo csrf_field(); ?>
                                                    <?php echo method_field('DELETE'); ?>
                                                    <button type="submit" class="dropdown-item text-danger">Delete</button>
                                                </form>
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                                <tr><td colspan="4">No categories yet.</td></tr>
                            <?php endif; ?>
                        </tbody>
                    </table>
                </div>
                <?php echo e($categories->links()); ?>

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

<?php echo $__env->make('iqec.layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /Users/fasil/Sites/iqec/admin/resources/views/iqec/courseware-categories/index.blade.php ENDPATH**/ ?>