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

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

        for (const node of document.querySelectorAll('[data-toubiz-brochure-checkbox]')) {
            new ToubizBrochure(node);
        }
    }
});
