'use strict';

(function () {
    let appRouter;

    function initializeApp() {
        console.log('Initializing org application...');

        appRouter = new Router({
            'home': HomePage,
            'members': MembersPage,
            'missions': MissionsPage
        });

        appRouter.start();
        console.log('Application initialized');
    }

    // Wait for DOM to be ready
    if (document.readyState === 'loading') {
        document.addEventListener('DOMContentLoaded', initializeApp);
    } else {
        initializeApp();
    }
})();
