<?php

namespace UltraguardPro\modules\ip_intelligence\pages;

if ( ! defined( 'ABSPATH' ) ) { exit; }

use UltraguardPro\Plugin;
use UltraguardPro\modules\core\BasePage;

class IpIntelligencePage extends BasePage {

    public function __construct( Plugin $plugin ) {
        parent::__construct( $plugin );
    }

    public function get_scheme( $context ): array {
        // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only admin view routing.
        $view = sanitize_key( wp_unslash( $_GET['view'] ?? 'dashboard'  ) );
        if ( 'settings' === $view ) {
            return ( new IpIntelligenceSettings( $this->plugin ) )->get_scheme( $context );
        }
        return ( new IpIntelligenceDashboard( $this->plugin ) )->get_scheme( $context );
    }
}
