<?php

namespace WPSN\Modules\SiteKit;

use WPSN\Core\AbstractModule;
use WPSN\Modules\SiteKit\Admin\SiteKitAdmin;

defined('ABSPATH') || exit;

/**
 * Search Insights integration (uses Google Site Kit under the hood).
 *
 * Goal: Help admins install/activate Site Kit and surface a small
 * set of high-level metrics inside WP SEO Next.
 */
final class SiteKitModule extends AbstractModule
{
    public function id(): string
    {
        return 'site_kit';
    }

    public function name(): string
    {
        return __('Search Insights', 'wp-seo-next');
    }

    public function description(): string
    {
        return __('Search Console & Analytics insights (via your Google connection).', 'wp-seo-next');
    }

    public function defaultEnabled(): bool
    {
        return true;
    }

    public function register(): void
    {
        if (!is_admin()) {
            return;
        }

        (new SiteKitAdmin($this->container))->register();
    }
}
