

<?php $__env->startSection('title', 'Expense Categories'); ?>

<?php $__env->startSection('content'); ?>
    <div class="page-header d-flex justify-content-between align-items-start flex-wrap gap-2">
        <div><h1 class="page-title">Expense Categories</h1></div>
        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('finance.categories.manage')): ?>
            <a href="<?php echo e(route('finance.expense-categories.create')); ?>" class="btn btn-primary btn-sm">Add Category</a>
        <?php endif; ?>
    </div>

    <form method="GET" class="row g-2 mb-3">
        <div class="col-md-4"><input type="text" name="search" value="<?php echo e(request('search')); ?>" class="form-control" placeholder="Search categories"></div>
        <div class="col-md-2"><button class="btn btn-outline-primary">Search</button></div>
    </form>

    <div class="card">
        <div class="table-responsive">
            <table class="table table-hover mb-0">
                <thead class="table-light"><tr><th>Name</th><th>Status</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><strong><?php echo e($category->name); ?></strong><div class="small text-muted"><?php echo e($category->description); ?></div></td>
                            <td><span class="badge bg-<?php echo e($category->is_active ? 'success' : 'secondary'); ?>"><?php echo e($category->is_active ? 'Active' : 'Inactive'); ?></span></td>
                            <td class="text-end">
                                <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('finance.categories.manage')): ?>
                                    <a href="<?php echo e(route('finance.expense-categories.edit', $category)); ?>" class="btn btn-sm btn-outline-primary">Edit</a>
                                <?php endif; ?>
                                <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('finance.categories.manage')): ?>
                                    <form action="<?php echo e(route('finance.expense-categories.destroy', $category)); ?>" method="POST" class="d-inline" onsubmit="return confirm('Delete this category?')">
                                        <?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>
                                        <button class="btn btn-sm btn-outline-danger">Delete</button>
                                    </form>
                                <?php endif; ?>
                            </td>
                        </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                        <tr><td colspan="3" class="text-center text-muted py-4">No categories found</td></tr>
                    <?php endif; ?>
                </tbody>
            </table>
        </div>
        <?php if($categories->hasPages()): ?><div class="card-footer"><?php echo e($categories->links()); ?></div><?php endif; ?>
    </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('eliteadmin::layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH D:\RABI\rabi\module-laravel-platform\apps\admin\modules\Finance/resources/views/categories/expense-index.blade.php ENDPATH**/ ?>