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

<?php $__env->startSection('actions'); ?>
<a href="<?php echo e(route('settings.models.create')); ?>" class="btn btn-primary">
    <i class="fas fa-plus-circle"></i> Add New Model
</a>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
<div class="container-fluid">
    <div class="card">
        <div class="card-header">
            <h5 class="mb-0"><i class="fas fa-cube me-2"></i>Model List</h5>
        </div>
        <div class="card-body">
            <table class="table table-hover">
                <thead>
                    <tr>
                        <th>ID</th>
                        <th>Name</th>
                        <th>Code</th>
                        <th>Brand</th>
                        <th>Category</th>
                        <th>Status</th>
                        <th>Actions</th>
                    </tr>
                </thead>
                <tbody>
                    <?php $__empty_1 = true; $__currentLoopData = $models; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $model): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                    <tr>
                        <td><?php echo e($model->id); ?></td>
                        <td><?php echo e($model->name); ?></td>
                        <td><code><?php echo e($model->code); ?></code></td>
                        <td><?php echo e($model->brand->name ?? 'N/A'); ?></td>
                        <td><?php echo e($model->category->name ?? 'N/A'); ?></td>
                        <td><?php echo $model->status_badge; ?></td>
                        <td>
                            <a href="<?php echo e(route('settings.models.edit', $model)); ?>" class="btn btn-sm btn-info">
                                <i class="fas fa-edit"></i>
                            </a>
                            <form action="<?php echo e(route('settings.models.destroy', $model)); ?>" method="POST" class="d-inline">
                                <?php echo csrf_field(); ?>
                                <?php echo method_field('DELETE'); ?>
                                <button type="submit" class="btn btn-sm btn-danger" onclick="return confirm('Are you sure?')">
                                    <i class="fas fa-trash"></i>
                                </button>
                            </form>
                        </td>
                    </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                    <tr>
                        <td colspan="7" class="text-center">No models found.</td>
                    </tr>
                    <?php endif; ?>
                </tbody>
            </table>
            
            <div class="mt-3">
                <?php echo e($models->links()); ?>

            </div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home/naowarin/walton.naowarinternational.my.id/resources/views/settings/models/index.blade.php ENDPATH**/ ?>