(function($){
  'use strict';

  /* Table Widget
  ------------------------------------- */
  var widgetSlick = function($scope, $) {

  var txSlick = $scope.find('.tx-slick-carousel-wrapper').eq(0);

    if ( txSlick.length > 0 ) {
    
    var settings = txSlick.data("settings"),
        autoplay = settings["autoplay"],
        autoplaySpeed = settings["autoplaySpeed"],
        centerPadding = settings["centerPadding"],
        pauseOnHover = settings["pauseOnHover"],
        pauseOnFocus = settings["pauseOnFocus"],
        arrows = settings["tx_slick_arrows"],
        dots = settings["dots"],
        centerMode = settings["centerMode"],
        infinite = settings["infinite"],
        variableWidth = settings["variablewidth"],
        vertical = settings["vertical"],
        rtl = settings["rtl"],
        slidesToShow_desktop = settings["slidesToShow_desktop"],
        slidesToShow_tablet = settings["slidesToShow_tablet"],
        slidesToShow_mobile = settings["slidesToShow_mobile"],
        slidesToScroll = settings["slidesToScroll"];

      txSlick.slick({
            dots: dots,
            // arrows: arrows,
            infinite: infinite,
            centerMode: centerMode,
            variableWidth: variableWidth,
            vertical: vertical,
            autoplay: autoplay,
            slidesToShow: slidesToShow_desktop,
            slidesToScroll: slidesToScroll,
            autoplaySpeed: autoplaySpeed,
            centerPadding: centerPadding,
            responsive: [
              {
                breakpoint: 1024,
                settings: {

                  slidesToShow: slidesToShow_tablet
                }
              },
              {
                breakpoint: 480,
                settings: {
                  slidesToShow: slidesToShow_mobile
                }
              }
            ]
            
        });
    }

  };


  $( window ).on( 'elementor/frontend/init', function() {
  elementorFrontend.hooks.addAction( 'frontend/element_ready/avas-slick-carousel.default', widgetSlick ); // Slick Carousel
    
  } );


})( jQuery );


/* ---------------------------------------------------------
   EOF
------------------------------------------------------------ */