import initAccordion from "./components/accordion.js";
import { Case } from "./components/case.js";

import { lightboxVideo } from "./components/g-lightbox/popup-video.js";
import { HeaderMenu } from "./components/HeaderMenu.js";
import initAwardsToggle from "./handlers/initAwardsToggle.js";
import scrollHeader from "./handlers/scrollHeader.js";
import { initMask } from "./components/imask.js";
// import { waitForYandexApi } from "./components/map.js";
// import { handleClickPartnersButton } from "./components/partners-button.js";
// import { Popover } from "./components/popover.js";
import initLogos from "./components/clients.js";
import { lazyLoadMap } from "./components/map.js";
import { initSliders } from "./components/sliders.js";
import { Tabs } from "./components/tabs.js";

import { VideoSquare } from "./components/video-square.js";
import { Form } from "./components/form.js";

function app() {
   new HeaderMenu();
   scrollHeader();

   new Case();

   // new Accordion();
   // new Popover();

   initSliders();
   initLogos();
   initAwardsToggle();
   initAccordion();

   lightboxVideo();
   // handleClickPartnersButton();

   // waitForYandexApi();
   initMask();
   const tabs = document.querySelectorAll(".zr-tabs");
   tabs.forEach((tab) => new Tabs(tab));

   lazyLoadMap(".js-map");

   const videos = document.querySelectorAll(".case-gallery");
   videos.forEach((v) => new VideoSquare(v));

   const lightbox = GLightbox();

   Form.initForms();
}

export { app };
