
<?php echo $__env->make('layouts.header', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php echo $__env->make('layouts.sidebar', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

<style>
 /* .content
  {
    min-height: 2000px !important;
  }*/
</style>

<style>
.dropdown-menu.dropdown-menu-end {
  position: absolute !important;
}

.dropdown-visible {
  overflow: visible !important;
}

.dropdown-open-full[data-align="left"] {
  left: 0 !important;
  right: auto !important;
}
</style>



<style>
.dataTables_wrapper .table td {
  text-transform: capitalize;
}
</style>

 <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
      <div class="container-full">
        <!-- Main content -->
    <?php echo $__env->yieldContent('content'); ?>
    <?php if(
        !(
            request()->is('active-plans') ||
            request()->is('plan-history') ||
            request()->is('packages') ||
            request()->is('wallet/transactions') ||
            request()->is('cart') ||
            request()->is('cart/count') ||
            request()->is('cart/add/*') ||
            request()->is('cart/update/*') ||
            request()->is('cart/delete/*')
        )
    ): ?>
        <?php echo $__env->make('components.checkBalanceModal', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <?php endif; ?>

</div>
  </div>

   <br>
 <br>
 <br>



<script>
document.addEventListener("DOMContentLoaded", function () {
  const tables = document.querySelectorAll("table");

  tables.forEach(table => {
    const rows = table.querySelectorAll("tbody tr").length;

    if (rows <= 2) {

      let parent = table.closest(".dataTables_scrollBody, .table-responsive, .card-body, .content-wrapper");
      if (parent) parent.classList.add("dropdown-visible");


      const toggles = table.querySelectorAll('[data-bs-toggle="dropdown"]');
      toggles.forEach(toggle => {
        toggle.addEventListener("show.bs.dropdown", function (e) {
          const menu = e.target.nextElementSibling;
          if (!menu) return;


          menu.classList.add("dropdown-open-full");
          menu.dataset.align = "left";


          const btnRect = e.target.getBoundingClientRect();
          const menuRect = menu.getBoundingClientRect();

          const offsetLeft = btnRect.left - (menuRect.left || 0);
          menu.style.left = offsetLeft + "px";
          menu.style.right = "auto";
        });

        toggle.addEventListener("hide.bs.dropdown", function (e) {
          const menu = e.target.nextElementSibling;
          if (menu) {
            menu.style.left = "";
            menu.style.right = "";
          }
        });
      });
    }
  });
});
</script>


  <!-- /.content-wrapper -->
<?php echo $__env->make('layouts.footer', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php echo $__env->make('layouts.push-notification', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

<?php /**PATH /var/www/html/leadmine/leadmine_pro/resources/views/layouts/app.blade.php ENDPATH**/ ?>