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

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

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