<?php $__env->startSection('workspace'); ?>

    <!-- Breadcrumb -->
    <section class="breadcrumb lg:flex items-start">
        <div>
            <h1>Sub-Dealers</h1>
            <ul>
                <li><a href="#no-link">Pages</a></li>
                <li class="divider la la-arrow-right"></li>
                <li><a href="#no-link">Sub-Dealer</a></li>
                <li class="divider la la-arrow-right"></li>
                <li>List</li>
            </ul>
        </div>

        <div class="flex flex-wrap gap-2 items-center ltr:ml-auto rtl:mr-auto mt-5 lg:mt-0">

            <!-- Search -->
            <form class="flex flex-auto">
                <label class="form-control-addon-within rounded-full">
                    <input class="form-control border-none" placeholder="Search">
                    <button
                        class="text-gray-300 dark:text-gray-700 text-xl leading-none la la-search ltr:mr-4 rtl:ml-4"></button>
                </label>
            </form>

            <div class="flex gap-x-2">

                <!-- Sort By -->
                <div class="dropdown">
                    <button class="btn btn_outlined btn_secondary uppercase" data-toggle="dropdown-menu">
                        Sort By
                        <span class="ltr:ml-3 rtl:mr-3 la la-caret-down text-xl leading-none"></span>
                    </button>
                    <div class="dropdown-menu">
                        <a href="#no-link">Ascending</a>
                        <a href="#no-link">Descending</a>
                    </div>
                </div>

                <?php if(auth()->guard('master-dealer')->check()): ?>
                    <!-- Add New -->
                    <a href="<?php echo e(route('admin.dealers.add-view')); ?>" class="btn btn_primary uppercase">Add New</a>
                <?php endif; ?>

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

    <!-- List -->
    <div class="card p-5">
        <div class="overflow-x-auto">
            <table class="table table-auto table_hoverable w-full">
                <thead>
                <tr>
                    <th class="ltr:text-left rtl:text-right uppercase">Company Name</th>
                    <th class="text-center uppercase">Contact Number</th>
                    <th class="text-center uppercase">State</th>
                    <th class="text-center uppercase">License(Activated/Total)</th>
                    <th class="text-center uppercase">Master Dealer</th>
                    <th class="text-center uppercase">Status</th>
                    <th class="uppercase">Action</th>
                </tr>
                </thead>
                <tbody>
                <?php $__currentLoopData = $dealers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $dealer): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <tr>
                        <td><?php echo e($dealer->company_name); ?></td>
                        
                        <td class="text-center"><?php echo e($dealer->contact_number); ?></td>
                        <td class="text-center"><?php echo e(ucwords($dealer->state)); ?></td>
                        <td class="text-center"><?php echo e($dealer->used_license); ?>/<?php echo e($dealer->total_license); ?></td>
                        <td class="text-center"><?php echo e($dealer->masterDealer->company_name); ?></td>
                        <td class="text-center">
                            <div class="badge badge_outlined badge_secondary uppercase"><?php echo e($dealer->status); ?></div>
                        </td>
                        <td class="ltr:text-right rtl:text-left whitespace-nowrap">
                            <div class="inline-flex ltr:ml-auto rtl:mr-auto">
                                <a href="#no-link" class="btn btn-icon btn_outlined btn_secondary">
                                    <span class="la la-pen-fancy"></span>
                                </a>
                                <a href="#no-link" class="btn btn-icon btn_outlined btn_danger ltr:ml-2 rtl:mr-2">
                                    <span class="la la-trash-alt"></span>
                                </a>
                            </div>
                        </td>
                    </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                </tbody>
            </table>
        </div>
    </div>

    <div class="mt-5">
        <?php echo $__env->make('partials._pagination', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    </div>

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

<?php echo $__env->make('layouts.master', ['title' => 'List - Dealer - Pages'], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/ezyorder/public_html/ezypos.ezyorder.com.my/ezypos-backend/resources/views/pages/admin/sub-dealer/dealer-list.blade.php ENDPATH**/ ?>