import { onPageLoadComplete } from '@nimius/event-utility';

onPageLoadComplete(async () => {
    if (document.querySelector('[data-toubiz-swiper]')) {
        // eslint-disable-next-line max-len
        const { default: ToubizSwiper } = await import(/* webpackChunkName: "toubiz-swiper" */ '../../Scripts/toubiz-swiper');

        for (const node of document.querySelectorAll('[data-toubiz-swiper]')) {
            new ToubizSwiper(node);
        }
    }
});
