<?php

namespace WPSN\Modules\FrontendInspector;

use WPSN\Core\AbstractModule;

defined('ABSPATH') || exit;

/**
 * Frontend SEO Inspector.
 *
 * When an editor/admin views a page on the frontend, provide a small overlay
 * with the computed SEO output and quick edit controls.
 *
 * Design goals:
 * - theme-safe (namespaced CSS, fixed-position overlay)
 * - non-invasive for visitors (only for logged-in users)
 * - no hard dependency on admin-ajax (uses admin-post for saves)
 */
final class FrontendInspectorModule extends AbstractModule
{
    public function id(): string
    {
        return 'frontend_inspector';
    }

    public function name(): string
    {
        return __('Frontend SEO Panel', 'wp-seo-next');
    }

    public function description(): string
    {
        return __('Frontend overlay showing WP SEO Next output and quick edit controls for the current page.', 'wp-seo-next');
    }

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

    public function register(): void
    {
        (new FrontendInspector($this->container))->register();
    }
}
