/**
 * @license
 * SPDX-License-Identifier: Apache-2.0
*/

declare global {
  interface Window {
    Botpoison?: new (options: { publicKey: string }) => {
      challenge: () => Promise<{ solution: string }>;
    };
  }
}

document.addEventListener('DOMContentLoaded', () => {
    // Fade-in animation on scroll
    const faders = document.querySelectorAll('.fade-in');
    const appearOptions: IntersectionObserverInit = {
    threshold: 0.2,
    rootMargin: "0px 0px -50px 0px"
    };
    const appearOnScroll = new IntersectionObserver(function(entries, observer) {
    entries.forEach(entry => {
        if (!entry.isIntersecting) {
        return;
        } else {
        entry.target.classList.add('visible');
        observer.unobserve(entry.target);
        }
    });
    }, appearOptions);

    faders.forEach(fader => {
    appearOnScroll.observe(fader);
    });

    // Form and modal logic is now handled by petite-vue in index.html
});


export {};