<?php
namespace WooNooW\Core;

use WooNooW\Core\Features;
use WooNooW\Admin\Menu;
use WooNooW\Admin\Assets;
use WooNooW\Admin\StandaloneAdmin;
use WooNooW\Compat\HideWooMenus;
use WooNooW\Compat\MenuProvider;
use WooNooW\Compat\AddonRegistry;
use WooNooW\Compat\RouteRegistry;
use WooNooW\Compat\NavigationRegistry;
use WooNooW\Compat\PaymentChannels;
use WooNooW\Compat\SettingsProvider;
use WooNooW\Admin\Rest\MenuController;
use WooNooW\Admin\Rest\SettingsController;
use WooNooW\Api\Routes;
use WooNooW\Core\Mail\MailQueue;
use WooNooW\Core\Mail\WooEmailOverride;
use WooNooW\Core\DataStores\OrderStore;
use WooNooW\Core\MediaUpload;
use WooNooW\Core\Notifications\PushNotificationHandler;
use WooNooW\Core\Notifications\EmailManager;
use WooNooW\Core\ActivityLog\ActivityLogTable;
use WooNooW\Branding;

class Bootstrap {
    public static function init() {
        Features::init();
        HideWooMenus::init();
        Menu::init();
        Assets::init();
        StandaloneAdmin::init();
        Branding::init();
        MediaUpload::init();
        PushNotificationHandler::init();
        EmailManager::instance(); // Initialize custom email system
        
        // Activity Log
        ActivityLogTable::create_table();
        
        // Addon system (order matters: Registry → Routes → Navigation)
        AddonRegistry::init();
        RouteRegistry::init();
        NavigationRegistry::init();
        PaymentChannels::init();
        
        MenuProvider::init();
        MenuController::init();
        SettingsProvider::init();
        Routes::init();
        MailQueue::init();
        WooEmailOverride::init();
        OrderStore::init();
    }
}