<?php

declare(strict_types=1);

namespace Drupal\ffmpeg_media\Attribute;

use Drupal\Component\Plugin\Attribute\Plugin;
use Drupal\Core\StringTranslation\TranslatableMarkup;

/**
 * Attribute for FFmpeg processor plugins.
 */
#[\Attribute(\Attribute::TARGET_CLASS)]
final class FFmpegProcessor extends Plugin {

  /**
   * Constructs an FFmpegProcessor attribute.
   *
   * @param string $id
   *   The plugin ID.
   * @param \Drupal\Core\StringTranslation\TranslatableMarkup $label
   *   The human-readable name of the processor.
   * @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $description
   *   Optional description of the processor.
   * @param string $outputType
   *   Type of output produced (e.g., 'image', 'text', 'video').
   * @param string $outputExtension
   *   Default output file extension.
   * @param array<int, string> $requiredFilters
   *   FFmpeg filters required by this processor.
   * @param int $weight
   *   Plugin weight for ordering.
   * @param class-string|null $deriver
   *   Optional deriver class.
   */
  public function __construct(
    public readonly string $id,
    public readonly TranslatableMarkup $label,
    public readonly ?TranslatableMarkup $description = NULL,
    public readonly string $outputType = 'video',
    public readonly string $outputExtension = '',
    public readonly array $requiredFilters = [],
    public readonly int $weight = 0,
    public readonly ?string $deriver = NULL,
  ) {}

}
