<?php
namespace ZS_SEO\AuditOptimization\Core;

defined( 'ABSPATH' ) || exit;

final class Plugin {

    private static ?Plugin $instance = null;

    public static function get_instance(): Plugin {
        if ( null === self::$instance ) {
            self::$instance = new self();
        }
        return self::$instance;
    }

    private function __construct() {
        $this->load_modules();
    }

    private function load_modules(): void {
        // Admin UI
        new \ZS_SEO\AuditOptimization\Admin\Menu();
        new \ZS_SEO\AuditOptimization\Admin\Assets();
        new \ZS_SEO\AuditOptimization\Admin\ImageFixer();


        // Meta tags on frontend
        new \ZS_SEO\AuditOptimization\Core\MetaTags();

        // Schema / GEO injection
        new \ZS_SEO\AuditOptimization\Core\SchemaManager();

        // Redirect routing
        new \ZS_SEO\AuditOptimization\Core\RedirectRouter();

        // AJAX handlers
        new \ZS_SEO\AuditOptimization\Admin\Ajax();

        
    }
}
