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

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

        for (const node of document.querySelectorAll('[data-toubiz-social-grid]')) {
            new ToubizSocialGrid(node);
        }
    }
});
