<?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 alt-text generation experiment as an official AI plugin Feature (AI-10).
 */
class Wpai_Alt_Text_Feature extends Abstract_Feature {

    public static function get_id(): string {
        return 'awfah-alt-text-generation';
    }

    protected function load_metadata(): array {
        return [
            'label'       => 'AtlasAI: ' . __( 'Alt Text Generation', 'ai-workflow-automation-ai-agent-hub' ),
            'description' => sprintf(
                /* translators: %s: plugin brand name (do not translate) */
                __( 'AI image alt text by %s — true vision analysis of the selected image with article context, in the image block panel.', 'ai-workflow-automation-ai-agent-hub' ),
                'AtlasAI Connector'
            ),
            'category'    => Experiment_Category::EDITOR,
        ];
    }

    public function register(): void {
        Wpai_Bridge::mark_enabled( 'alt-text-generation' );
    }
}
