
// const allTabs = document.getElementById('orders-all-tab');
// const allTabsContent = document.getElementById('orders-all');
// const tabs = document.querySelectorAll('#orders-tab .nav-item');
// const tabsContent = document.querySelectorAll('#orders-tabContent .tab-pane');




//     tabs.forEach((tab) => {

//     tab.addEventListener('shown.bs.tab', function(event){

//         if(event.target.id == 'orders-all-tab') {
//           
//             tabsContent.forEach((tabContent) => {
//                 tabContent.classList.add('active');  
//                 tabContent.classList.add('show');
                
//             
                           
//             });
//            
        
//       });
    
// })
(function() {

    'use strict';
  
    // breakpoint where swiper will be destroyed
    // and switches to a dual-column layout
    const breakpoint = window.matchMedia( '(min-width:992px)' );
  
    // keep track of swiper instances to destroy later
    let mySwiper;
  
    //////////////////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////
  
    const breakpointChecker = function() {
  
      // if larger viewport and multi-row layout needed
      if ( breakpoint.matches === true ) {
  
        // clean up old instances and inline styles when available
        if ( mySwiper !== undefined ) mySwiper.destroy( true, true );
  
        // or/and do nothing
        return;
  
        // else if a small viewport and single column layout needed
        } else if ( breakpoint.matches === false ) {
  
          // fire small viewport version of swiper
          return enableSwiper();
  
        }
  
    };
    
    //////////////////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////
  
    const enableSwiper = function() {
  
      mySwiper = new Swiper ('.slider-cards', {
        slidesPerView: 1,	  
        spaceBetween: 30,
        centeredSlides: true,
        breakpoints: {
            767: {
                slidesPerView: 1,
            }
        },
        keyboardControl: true,
        grabCursor: true,
        navigation: {
            nextEl: ".swiper-button-next",
            prevEl: ".swiper-button-prev",
        },
      });
  
    };
  
    //////////////////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////
  
    // keep an eye on viewport size changes
    breakpoint.addListener(breakpointChecker);
  
    // kickstart
    breakpointChecker();
  
  
  
  })(); /* IIFE end */






    

