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

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

        for (const node of document.querySelectorAll('[data-toubiz-range-slider]')) {
            new ToubizRangeSlider(node);
        }
    }
});
