<?php $__env->startSection('section-title', 'Brand'); ?>
<?php $__env->startSection('page-title', 'Brand List'); ?>

<?php $__env->startSection('action-button'); ?>
    <a href="#" data-toggle="modal" data-target="#addModal" class="btn add_list_btn">
        <i class="mr-2 feather icon-plus"></i>
        Add Brand
    </a>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
    <div class="row">
        <div class="col-lg-12">
            <div class="card m-b-30 card_style">
                <div class="card-body">
                    <div class="table-responsive">
                        <table id="datatable-buttons" class="table table-striped text-center">
                            <thead class="header_bg">
                                <tr>
                                    <th class="header_style_left">#SL</th>
                                    <th>Name</th>
                                    <th class="header_style_right">Actions</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php $__empty_1 = true; $__currentLoopData = $brands; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                    <?php
                                        $count_brand = App\Models\Product::where('brand_id', $data->id)->count();
                                    ?>
                                    <tr>
                                        <td class="table_data_style_left"><?php echo e($loop->index + 1); ?></td>
                                        <td><?php echo e($data->name); ?></td>
                                        <td class="table_data_style_right">
                                            <div class="dropdown">
                                                <button class="btn add_list_btn btn-sm dropdown-toggle" type="button"
                                                    id="dropdownMenuButton" data-toggle="dropdown">
                                                    Action
                                                </button>
                                                <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
                                                    
                                                    
                                                    <?php if(check_permission('brand.update')): ?>
                                                        <a href="#" data-toggle="modal"
                                                            data-target="#editModal-<?php echo e($data->id); ?>"
                                                            class="dropdown-item text-primary">
                                                            <i class="feather icon-edit"></i> Edit
                                                        </a>
                                                    <?php endif; ?>

                                                    
                                                    <?php if(check_permission('brand.destroy')): ?>
                                                        <?php if($count_brand<1): ?>
                                                            <a href="#" data-toggle="modal"
                                                                data-target="#deleteModal-<?php echo e($data->id); ?>"
                                                                class="dropdown-item text-danger">
                                                                <i class="feather icon-trash"></i> Delete
                                                            </a>
                                                        <?php endif; ?>
                                                    <?php endif; ?>
                                                </div>
                                            </div>
                                        </td>
                                    </tr>

                                    
                                    <form action="<?php echo e(route('brand.update', $data->id)); ?>" method="POST">
                                        <?php echo csrf_field(); ?>
                                        <?php echo method_field('PUT'); ?>
                                        <?php if (isset($component)) { $__componentOriginal8c9069a376d468665d9f4eee9640e8b7 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal8c9069a376d468665d9f4eee9640e8b7 = $attributes; } ?>
<?php $component = App\View\Components\EditModal::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('edit-modal'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\EditModal::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['title' => 'Edit Brand','sizeClass' => 'modal-md','id' => ''.e($data->id).'']); ?>
                                            <?php if (isset($component)) { $__componentOriginal786b6632e4e03cdf0a10e8880993f28a = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal786b6632e4e03cdf0a10e8880993f28a = $attributes; } ?>
<?php $component = App\View\Components\Input::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('input'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Input::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['label' => 'Name:','type' => 'text','name' => 'name','placeholder' => 'Enter Name','required' => true,'value' => ''.e($data->name).'']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal786b6632e4e03cdf0a10e8880993f28a)): ?>
<?php $attributes = $__attributesOriginal786b6632e4e03cdf0a10e8880993f28a; ?>
<?php unset($__attributesOriginal786b6632e4e03cdf0a10e8880993f28a); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal786b6632e4e03cdf0a10e8880993f28a)): ?>
<?php $component = $__componentOriginal786b6632e4e03cdf0a10e8880993f28a; ?>
<?php unset($__componentOriginal786b6632e4e03cdf0a10e8880993f28a); ?>
<?php endif; ?>
                                         <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal8c9069a376d468665d9f4eee9640e8b7)): ?>
<?php $attributes = $__attributesOriginal8c9069a376d468665d9f4eee9640e8b7; ?>
<?php unset($__attributesOriginal8c9069a376d468665d9f4eee9640e8b7); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal8c9069a376d468665d9f4eee9640e8b7)): ?>
<?php $component = $__componentOriginal8c9069a376d468665d9f4eee9640e8b7; ?>
<?php unset($__componentOriginal8c9069a376d468665d9f4eee9640e8b7); ?>
<?php endif; ?>
                                    </form>

                                    
                                    <form action="<?php echo e(route('brand.destroy', $data->id)); ?>" method="POST">
                                        <?php echo csrf_field(); ?>
                                        <?php echo method_field('DELETE'); ?>
                                        <?php if (isset($component)) { $__componentOriginal37b7f052626c638ba0443fdb400d6f57 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal37b7f052626c638ba0443fdb400d6f57 = $attributes; } ?>
<?php $component = App\View\Components\DeleteModal::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('delete-modal'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\DeleteModal::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['title' => 'Brand','id' => ''.e($data->id).'']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal37b7f052626c638ba0443fdb400d6f57)): ?>
<?php $attributes = $__attributesOriginal37b7f052626c638ba0443fdb400d6f57; ?>
<?php unset($__attributesOriginal37b7f052626c638ba0443fdb400d6f57); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal37b7f052626c638ba0443fdb400d6f57)): ?>
<?php $component = $__componentOriginal37b7f052626c638ba0443fdb400d6f57; ?>
<?php unset($__componentOriginal37b7f052626c638ba0443fdb400d6f57); ?>
<?php endif; ?>
                                    </form>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                                    <tr>
                                        <td colspan="100%" class="text-center no_data_style text-danger">No Data Available</td>
                                    </tr>
                                <?php endif; ?>

                            </tbody>
                        </table>
                    </div>
                    <div class="pagination justify-content-center">
                        <?php echo e($brands->links()); ?>

                    </div>
                </div>
            </div>
        </div>
    </div>

    
    <form action="<?php echo e(route('brand.store')); ?>" method="POST">
        <?php echo csrf_field(); ?>
        <?php if (isset($component)) { $__componentOriginalefc5d8f1512157b4f4b5cdc230110e8b = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalefc5d8f1512157b4f4b5cdc230110e8b = $attributes; } ?>
<?php $component = App\View\Components\AddModal::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('add-modal'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\AddModal::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['title' => 'Add Brand','sizeClass' => 'modal-md']); ?>
            <?php if (isset($component)) { $__componentOriginal786b6632e4e03cdf0a10e8880993f28a = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal786b6632e4e03cdf0a10e8880993f28a = $attributes; } ?>
<?php $component = App\View\Components\Input::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('input'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Input::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['label' => 'Brand Name:','type' => 'text','name' => 'name','placeholder' => 'Enter Brand Name','required' => true]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal786b6632e4e03cdf0a10e8880993f28a)): ?>
<?php $attributes = $__attributesOriginal786b6632e4e03cdf0a10e8880993f28a; ?>
<?php unset($__attributesOriginal786b6632e4e03cdf0a10e8880993f28a); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal786b6632e4e03cdf0a10e8880993f28a)): ?>
<?php $component = $__componentOriginal786b6632e4e03cdf0a10e8880993f28a; ?>
<?php unset($__componentOriginal786b6632e4e03cdf0a10e8880993f28a); ?>
<?php endif; ?>
         <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalefc5d8f1512157b4f4b5cdc230110e8b)): ?>
<?php $attributes = $__attributesOriginalefc5d8f1512157b4f4b5cdc230110e8b; ?>
<?php unset($__attributesOriginalefc5d8f1512157b4f4b5cdc230110e8b); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalefc5d8f1512157b4f4b5cdc230110e8b)): ?>
<?php $component = $__componentOriginalefc5d8f1512157b4f4b5cdc230110e8b; ?>
<?php unset($__componentOriginalefc5d8f1512157b4f4b5cdc230110e8b); ?>
<?php endif; ?>
    </form>

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

<?php echo $__env->make('backend.layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH D:\laragon\www\new demo multi-bank\resources\views/backend/pages/brand/index.blade.php ENDPATH**/ ?>