export default class LazyLoadManager {
    constructor(itemsSelector) {
        this.items = document.querySelectorAll(itemsSelector);
        this.observeItems();
    }
    observeItems() {
        const observer = new IntersectionObserver((entries) => {
            entries.forEach((entry) => {
                if (entry.isIntersecting) {
                    const item = entry.target;
                    item.src = item.dataset.src;
                    observer.unobserve(item);
                }
            });
        });
        this.items.forEach((item) => observer.observe(item));
    }
}
//# sourceMappingURL=LazyLoadManager.js.map