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

<?php $__env->startSection('actions'); ?>
<a href="<?php echo e(route('settings.brands.create')); ?>" class="btn btn-primary">
    <i class="fas fa-plus-circle"></i> Add New Brand
</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-trademark me-2"></i>Brand List</h5>
        </div>
        <div class="card-body">
            <table class="table table-hover">
                <thead>
                    <tr>
                        <th>ID</th>
                        <th>Logo</th>
                        <th>Name</th>
                        <th>Website</th>
                        <th>Models</th> <!-- Products count সরিয়ে দিলাম -->
                        <th>Status</th>
                        <th>Actions</th>
                    </tr>
                </thead>
                <tbody>
                    <?php $__empty_1 = true; $__currentLoopData = $brands; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $brand): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                    <tr>
                        <td><?php echo e($brand->id); ?></td>
                        <td>
                            <?php if($brand->logo): ?>
                                <img src="<?php echo e(asset('storage/brands/'.$brand->logo)); ?>" alt="<?php echo e($brand->name); ?>" style="max-height: 40px;">
                            <?php else: ?>
                                <span class="text-muted">No logo</span>
                            <?php endif; ?>
                        </td>
                        <td><?php echo e($brand->name); ?></td>
                        <td>
                            <?php if($brand->website): ?>
                                <a href="<?php echo e($brand->website); ?>" target="_blank"><?php echo e($brand->website); ?></a>
                            <?php else: ?>
                                <span class="text-muted">-</span>
                            <?php endif; ?>
                        </td>
                        <td>
                            <span class="badge bg-info"><?php echo e($brand->models_count ?? 0); ?></span>
                        </td>
                        <td><?php echo $brand->status_badge; ?></td>
                        <td>
                            <a href="<?php echo e(route('settings.brands.edit', $brand)); ?>" class="btn btn-sm btn-info">
                                <i class="fas fa-edit"></i>
                            </a>
                            <form action="<?php echo e(route('settings.brands.destroy', $brand)); ?>" 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 brands found.</td>
                    </tr>
                    <?php endif; ?>
                </tbody>
            </table>
            
            <div class="mt-3">
                <?php echo e($brands->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/brands/index.blade.php ENDPATH**/ ?>