<?php

declare(strict_types=1);

namespace App\Framework\Console;

use Attribute;

/**
 * Attribute for detailed parameter documentation
 */
#[Attribute(Attribute::TARGET_PARAMETER)]
final readonly class Parameter
{
    public function __construct(
        public string $description = '',
        public ?string $shortName = null,
        public ?string $example = null,
        public bool $hidden = false
    ) {
    }

    /**
     * Create a parameter with description
     */
    public static function desc(string $description): self
    {
        return new self($description);
    }

    /**
     * Create a parameter with description and short name
     */
    public static function short(string $description, string $shortName): self
    {
        return new self($description, $shortName);
    }

    /**
     * Create a hidden parameter (for internal use)
     */
    public static function hidden(string $description = ''): self
    {
        return new self($description, hidden: true);
    }

    /**
     * Create parameter with example value
     */
    public static function example(string $description, string $example): self
    {
        return new self($description, example: $example);
    }
}
