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

<?php $__env->startPush("js"); ?>

    <script>
        var $card = $("#card-warehouse-management");
        var activeTableId = "table_1";

        // $card.find('.nav a[data-toggle="tab"]').on('shown.bs.tab', function(e){
        //     var $active_tab = $(e.target); // active tab
        //     let tableId = $active_tab.attr("data-table-id");
        //     activeTableId = tableId;
        //   //  let warehouseType = parseInt($active_tab.attr("data-warehouse-type"));
        //     let url = $active_tab.attr("data-url");
        //     refresh_datatable(tableId,url)
        // });

        
        
        
        
        
        
        
        

        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        

        

        
    </script>
<?php $__env->stopPush(); ?>

<?php $__env->startSection('content'); ?>
<div class="card shadow mb-4" id="card-warehouse-management">
        <div class="card-header py-3 d-flex flex-row align-items-center justify-content-between">
            <h6 class="m-0 font-weight-bold text-success"><?php echo e($title); ?></h6>
        </div>
        <ul class="nav nav-tabs" id="tab-stocks-management" role="tablist">
            <?php $__currentLoopData = $menus; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $options): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <li class="nav-item">
                    <a data-toggle="tab" role="tab"
                       class="nav-link <?php echo e(($loop->first) ?"border-left-0 active show":""); ?>"
                       id="<?php echo e($options['id']); ?>"
                       href="#<?php echo e($options['href']); ?>"
                       data-table-id ="<?php echo e($options['content']['table']['id']); ?>"
                       data-warehouse-type ="<?php echo e($options['warehouse-type']); ?>"
                       data-url ="<?php echo e(route("admin.stocks.warehouses.list",['warehouseType' => $options['warehouse-type']])); ?>"
                       aria-controls="<?php echo e($options['id']); ?>"
                       aria-selected="<?php echo e(($loop->first) ?"true":"false"); ?>">
                        <span class="<?php echo e($options['icon']); ?>"></span>
                        <?php echo e(__($options['title'])); ?>

                    </a>
                </li>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </ul>

        <div class="tab-content" id="tab-content-warehouses-management">
            <?php $__currentLoopData = $menus; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $options): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <div role="tabpanel"
                     class="tab-pane fade <?php echo e(($loop->first) ?"active show":""); ?>"
                     id="<?php echo e($options['href']); ?>"
                     aria-labelledby="<?php echo e($options['id']); ?>">
                   <?php  $dataTable = new \App\DataTables\Warehouses\WarehouseDataTable($options['warehouse-type']);?>
                    <?php echo $dataTable->render("backend.stocks.warehouses.tabs.index"); ?>

                </div>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.admin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/lekruu/public_html/resources/views/backend/stocks/warehouses/index1.blade.php ENDPATH**/ ?>