<?php $__env->startPush('title', get_phrase('Blog category')); ?>
<?php $__env->startPush('meta'); ?><?php $__env->stopPush(); ?>
<?php $__env->startPush('css'); ?><?php $__env->stopPush(); ?>
<?php $__env->startSection('content'); ?>
    <div class="ol-card radius-8px">
        <div class="ol-card-body my-3 py-12px px-20px">
            <div class="d-flex align-items-center justify-content-between gap-3 flex-wrap flex-md-nowrap">
                <h4 class="title fs-16px">
                    <i class="fi-rr-settings-sliders me-2"></i>
                    <span><?php echo e(get_phrase('Blog Category')); ?></span>
                </h4>
                <a href="javascript:void(0);"
                    class="btn ol-btn-outline-secondary d-flex align-items-center cg-10px"
                    onclick="ajaxModal('<?php echo e(route('modal', ['admin.blog_category.create'])); ?>', '<?php echo e(get_phrase('Add Category')); ?>')">
                    <span class="fi-rr-plus"></span>
                    <span><?php echo e(get_phrase('Add new category')); ?></span>
                </a>
            </div>
        </div>
    </div>


    <?php if($categories->count() > 0): ?>
        <div class="row g-2 g-sm-3 mb-3 row-cols-1 row-colssm-2 row-cols-md-3 row-cols-lg-4">
            <?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <div class="col">
                    <div class="ol-card card-hover">
                        <div class="ol-card-body px-20px py-3 d-flex justify-content-between">
                            <div>
                                <p class="title card-title-hover"><?php echo e($category->title); ?></p>
                                <p class="sub-title text-12px mt-2"><?php echo e(get_phrase('Total number of blog')); ?> <?php echo e(count_blogs_by_category($category->id)); ?></p>
                            </div>

                            <div class="dropdown ol-icon-dropdown">
                                <button class="btn ol-btn-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
                                    <span class="fi-rr-menu-dots-vertical"></span>
                                </button>
                                <ul class="dropdown-menu">
                                    <li><a class="dropdown-item" href="javascript:void(0);" onclick="ajaxModal('<?php echo e(route('modal', ['admin.blog_category.edit', 'id' => $category->id])); ?>', '<?php echo e(get_phrase('Edit Category')); ?>')"><?php echo e(get_phrase('Edit')); ?></a></li>
                                    <li><a class="dropdown-item" href="javascript:void(0);" onclick="confirmModal('<?php echo e(route('admin.blog.category.delete', $category->id)); ?>')"><?php echo e(get_phrase('Delete')); ?></a></li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </div>
    <?php else: ?>
        <div class="ol-card">
            <div class="ol-card-body">
                <?php echo $__env->make('admin.no_data', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
            </div>
        </div>
    <?php endif; ?>
<?php $__env->stopSection(); ?>
<?php $__env->startPush('js'); ?><?php $__env->stopPush(); ?>

<?php echo $__env->make('layouts.admin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/payraty/lms_main/resources/views/admin/blog_category/index.blade.php ENDPATH**/ ?>