<?php

declare(strict_types=1);

namespace App\Application;

use App\Framework\Console\CommandGroup;
use App\Framework\Console\ConsoleColor;
use App\Framework\Console\ConsoleCommand;
use App\Framework\Console\ConsoleInput;
use App\Framework\Console\ConsoleOutputInterface;
use App\Framework\Console\ExitCode;

#[CommandGroup(
    name: 'Workflows',
    description: 'Workflow management commands',
    icon: '🔄',
    priority: 90
)]
final readonly class TestWorkflowCommand
{
    #[ConsoleCommand('workflow:test', 'Test the workflow system')]
    public function testWorkflow(ConsoleInput $input, ConsoleOutputInterface $output): ExitCode
    {
        $output->writeLine('🔄 Workflow System Test', ConsoleColor::BRIGHT_CYAN);
        $output->newLine();

        $output->writeLine('✅ Command Groups System: Working', ConsoleColor::GREEN);
        $output->writeLine('✅ CommandGroup Attribute: Working', ConsoleColor::GREEN);
        $output->writeLine('✅ Command Discovery: Working', ConsoleColor::GREEN);

        $output->newLine();
        $output->writeLine('🎉 Workflow system is functioning correctly!', ConsoleColor::BRIGHT_GREEN);

        return ExitCode::SUCCESS;
    }
}
