<?php

namespace AtlasAiDev\Awfah\Integrations;

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

if ( ! class_exists( '\WordPress\AI\Abstracts\Abstract_Feature' ) ) {
    return;
}

use WordPress\AI\Abstracts\Abstract_Feature;
use WordPress\AI\Experiments\Experiment_Category;

/**
 * Our summarization experiment as an official AI plugin Feature (AI-10).
 */
class Wpai_Summarization_Feature extends Abstract_Feature {

    public static function get_id(): string {
        return 'awfah-summarization';
    }

    protected function load_metadata(): array {
        return [
            'label'       => 'AtlasAI: ' . __( 'Summarization', 'ai-workflow-automation-ai-agent-hub' ),
            'description' => sprintf(
                /* translators: %s: plugin brand name (do not translate) */
                __( 'AI post summaries by %s — length presets, generation history, and per-request provider choice in the post sidebar.', 'ai-workflow-automation-ai-agent-hub' ),
                'AtlasAI Connector'
            ),
            'category'    => Experiment_Category::EDITOR,
        ];
    }

    public function register(): void {
        Wpai_Bridge::mark_enabled( 'summarization' );
    }
}
