/home/brandsfa/www/storage/framework/views/e56eccdf4b7261c2cf331c4000505a23.php
<?php $__env->startSection('title', translate('brand_List')); ?>

<?php $__env->startSection('content'); ?>
    <div class="content container-fluid">
        <div class="mb-3">
            <h2 class="h1 mb-0 d-flex gap-2">
                <img width="20" src="<?php echo e(dynamicAsset(path: 'public/assets/back-end/img/brand.png')); ?>" alt="">
                <?php echo e(translate('brand_List')); ?>

                <span class="badge badge-soft-dark radius-50 fz-14"><?php echo e($brands->total()); ?></span>
            </h2>
        </div>
        <div class="row mt-20">
            <div class="col-md-12">
                <div class="card">
                    <div class="px-3 py-4">
                        <div class="row g-2 flex-grow-1">
                            <div class="col-sm-8 col-md-6 col-lg-4">
                                <form action="<?php echo e(url()->current()); ?>" method="GET">
                                    <div class="input-group input-group-custom input-group-merge">
                                        <div class="input-group-prepend">
                                            <div class="input-group-text">
                                                <i class="tio-search"></i>
                                            </div>
                                        </div>
                                        <input id="datatableSearch_" type="search" name="searchValue" class="form-control"
                                            placeholder="<?php echo e(translate('search_by_name')); ?>" aria-label="<?php echo e(translate('search_by_name')); ?>" value="<?php echo e(request('searchValue')); ?>" required>
                                        <button type="submit" class="btn btn--primary input-group-text"><?php echo e(translate('search')); ?></button>
                                    </div>
                                </form>
                            </div>
                            <div class="col-sm-4 col-md-6 col-lg-8 d-flex justify-content-end">
                                <button type="button" class="btn btn-outline--primary" data-toggle="dropdown">
                                    <i class="tio-download-to"></i>
                                    <?php echo e(translate('export')); ?>

                                    <i class="tio-chevron-down"></i>
                                </button>
                                <ul class="dropdown-menu">
                                    <li>
                                        <a class="dropdown-item" href="<?php echo e(route('admin.brand.export', ['searchValue'=>request('searchValue')])); ?>">
                                            <img width="14" src="<?php echo e(dynamicAsset(path: 'public/assets/back-end/img/excel.png')); ?>" alt="">
                                            <?php echo e(translate('excel')); ?>

                                        </a>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <div class="card-body p-0">
                        <div class="table-responsive">
                            <table class="table table-hover table-borderless table-thead-bordered table-nowrap table-align-middle card-table w-100 text-start">
                                <thead class="thead-light thead-50 text-capitalize">
                                <tr>
                                    <th><?php echo e(translate('SL')); ?></th>
                                    <th><?php echo e(translate('brand_Logo')); ?></th>
                                    <th class="max-width-100px"><?php echo e(translate('name')); ?></th>
                                    <th class="text-center"><?php echo e(translate('total_Product')); ?></th>
                                    <th class="text-center"><?php echo e(translate('total_Order')); ?></th>
                                    <th class="text-center"><?php echo e(translate('status')); ?></th>
                                    <th class="text-center"> <?php echo e(translate('action')); ?></th>
                                </tr>
                                </thead>
                                <tbody>
                                <?php $__currentLoopData = $brands; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $brand): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <tr>
                                        <td><?php echo e($brands->firstItem()+$key); ?></td>
                                        <td>
                                            <div class="avatar-60 d-flex align-items-center rounded">
                                                <img class="img-fluid" alt=""
                                                     src="<?php echo e(getValidImage(path: 'storage/app/public/brand/'.$brand['image'], type: 'backend-brand')); ?>">
                                            </div>
                                        </td>
                                        <td class="overflow-hidden max-width-100px">
                                            <span data-toggle="tooltip" data-placement="right" title="<?php echo e($brand['defaultname']); ?>">
                                                 <?php echo e(Str::limit($brand['defaultname'],20)); ?>

                                            </span>
                                        </td>
                                        <td class="text-center"><?php echo e($brand['brand_all_products_count']); ?></td>
                                        <td class="text-center"><?php echo e($brand['brandAllProducts']->sum('order_details_count')); ?></td>
                                        <td>
                                            <form action="<?php echo e(route('admin.brand.status-update')); ?>" method="post" id="brand-status<?php echo e($brand['id']); ?>-form">
                                                <?php echo csrf_field(); ?>
                                                <input type="hidden" name="id" value="<?php echo e($brand['id']); ?>">
                                                <label class="switcher mx-auto">
                                                    <input type="checkbox" class="switcher_input toggle-switch-message" name="status"
                                                           id="brand-status<?php echo e($brand['id']); ?>" value="1" <?php echo e($brand['status'] == 1 ? 'checked' : ''); ?>

                                                           data-modal-id = "toggle-status-modal"
                                                           data-toggle-id = "brand-status<?php echo e($brand['id']); ?>"
                                                           data-on-image = "brand-status-on.png"
                                                           data-off-image = "brand-status-off.png"
                                                           data-on-title = "<?php echo e(translate('Want_to_Turn_ON').' '.$brand['defaultname'].' '. translate('status')); ?>"
                                                           data-off-title = "<?php echo e(translate('Want_to_Turn_OFF').' '.$brand['defaultname'].' '.translate('status')); ?>"
                                                           data-on-message = "<p><?php echo e(translate('if_enabled_this_brand_will_be_available_on_the_website_and_customer_app')); ?></p>"
                                                           data-off-message = "<p><?php echo e(translate('if_disabled_this_brand_will_be_hidden_from_the_website_and_customer_app')); ?></p>">
                                                    <span class="switcher_control"></span>
                                                </label>
                                            </form>
                                        </td>
                                        <td>
                                            <div class="d-flex justify-content-center gap-2">
                                                <a class="btn btn-outline-info btn-sm square-btn" title="<?php echo e(translate('edit')); ?>"
                                                    href="<?php echo e(route('admin.brand.update', [$brand['id']])); ?>">
                                                    <i class="tio-edit"></i>
                                                </a>
                                                <a class="btn btn-outline-danger btn-sm delete-brand square-btn " title="<?php echo e(translate('delete')); ?>"
                                                   data-product-count = "<?php echo e(count($brand?->brandAllProducts)); ?>"
                                                   data-text="<?php echo e(translate('there_were_').count($brand?->brandAllProducts).translate('_products_under_this_brand').'.'.translate('please_update_their_brand_from_the_below_list_before_deleting_this_one').'.'); ?>"
                                                   id="<?php echo e($brand['id']); ?>">
                                                    <i class="tio-delete"></i>
                                                </a>
                                            </div>
                                        </td>
                                    </tr>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </tbody>
                            </table>
                        </div>
                    </div>
                    <div class="table-responsive mt-4">
                        <div class="d-flex justify-content-lg-end">
                            <?php echo e($brands->links()); ?>

                        </div>
                    </div>
                    <?php if(count($brands)==0): ?>
                        <div class="text-center p-4">
                            <img class="mb-3 w-160" src="<?php echo e(dynamicAsset(path: 'public/assets/back-end/svg/illustrations/sorry.svg')); ?>" alt="">
                            <p class="mb-0"><?php echo e(translate('no_data_to_show')); ?></p>
                        </div>
                    <?php endif; ?>
                </div>
            </div>
        </div>
    </div>
    <span id="route-admin-brand-delete" data-url="<?php echo e(route('admin.brand.delete')); ?>"></span>
    <span id="route-admin-brand-status-update" data-url="<?php echo e(route('admin.brand.status-update')); ?>"></span>
    <span id="get-brands" data-brands="<?php echo e(json_encode($brands)); ?>"></span>
    <div class="modal fade" id="select-brand-modal" tabindex="-1" aria-labelledby="toggle-modal" aria-hidden="true">
        <div class="modal-dialog modal-dialog-centered">
            <div class="modal-content shadow-lg">
                <div class="modal-header border-0 pb-0 d-flex justify-content-end">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><i
                            class="tio-clear"></i></button>
                </div>
                <div class="modal-body px-4 px-sm-5 pt-0 pb-sm-5">
                    <div class="d-flex flex-column align-items-center text-center gap-2 mb-2">
                        <div
                            class="toggle-modal-img-box d-flex flex-column justify-content-center align-items-center mb-3 position-relative">
                            <img src="<?php echo e(dynamicAsset('public/assets/back-end/img/icons/info.svg')); ?>" alt="" width="90"/>
                        </div>
                        <h5 class="modal-title mb-2 brand-title-message"></h5>
                    </div>
                    <form action="<?php echo e(route('admin.brand.delete')); ?>" method="post" class="product-brand-update-form-submit">
                        <?php echo csrf_field(); ?>
                        <input name="id" hidden="">
                        <div class="gap-2 mb-3">
                            <label class="title-color"
                                   for="exampleFormControlSelect1"><?php echo e(translate('select_Category')); ?>

                                <span class="text-danger">*</span>
                            </label>
                            <select name="brand_id" class="form-control js-select2-custom brand-option" required>

                            </select>
                        </div>
                        <div class="d-flex justify-content-center gap-3">
                            <button type="submit" class="btn btn--primary min-w-120"><?php echo e(translate('update')); ?></button>
                            <button type="button" class="btn btn-danger-light min-w-120"
                                    data-dismiss="modal"><?php echo e(translate('cancel')); ?></button>
                        </div>
                    </form>
                </div>

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

<?php $__env->startPush('script'); ?>
    <script src="<?php echo e(dynamicAsset(path: 'public/assets/back-end/js/products-management.js')); ?>"></script>
<?php $__env->stopPush(); ?>

<?php echo $__env->make('layouts.back-end.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/amkworld/public_html/resources/views/admin-views/brand/list.blade.php ENDPATH**/ ?>