import { InobyModule } from "@lib/inoby-module";
import KeenSliderHelper from "@lib/keen-slider-helper";
import * as $ from "jquery";
class TestimonialsComponent extends InobyModule {
  private $usedCalendar: JQuery<HTMLElement>;

  run() {
    const $sliderContainers = $(".testimonials-slider");
    $(".component-testimonials .testimonials-slider").addClass("keen-slider");
    KeenSliderHelper.registerSlider($sliderContainers, {
      selector: ".testimonial-box",
    });
    $(document).on("click", ".testimonial-box .show-more", function () {
      $(this).parent().parent().next().addClass("active");
      $("body").addClass("testimonial-popup-opened");
    });
    $(document).on("click", ".testimonial-popup .popup-content .close-btn", function () {
      $(".testimonial-popup").removeClass("active");
      $("body").removeClass("testimonial-popup-opened");
    });
  }
}

new TestimonialsComponent().runOnReady();
