<?php

namespace WPSN\Modules\ImportExport;

use WPSN\Core\AbstractModule;

defined('ABSPATH') || exit;

/**
 * Stage 9: Import/Export tools (settings + migration from other SEO plugins).
 */
final class ImportExportModule extends AbstractModule
{
    public function id(): string
    {
        return 'import_export';
    }

    public function name(): string
    {
        return __('Import/Export', 'wp-seo-next');
    }

    public function description(): string
    {
        return __('Export/import plugin settings and migrate basic SEO fields from other plugins (Yoast, Rank Math, AIOSEO).', 'wp-seo-next');
    }

    public function defaultEnabled(): bool
    {
        // Lightweight admin-only tooling; enabled by default.
        return true;
    }

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

        $admin = new Admin\ImportExportAdmin($this->container, $this->logger);
        $admin->register();
    }
}
