<?php

declare(strict_types=1);

namespace Drupal\ffmpeg_media\Cdn;

/**
 * Interface for managing CDN integrations.
 *
 * @internal Runtime service, not part of the supported contrib extension API.
 */
interface CdnManagerInterface {

  /**
   * Checks if CDN integration is enabled.
   *
   * @return bool
   *   TRUE if CDN is enabled and configured.
   */
  #[\NoDiscard]
  public function isEnabled(): bool;

  /**
   * Gets the active CDN integration.
   *
   * @return \Drupal\ffmpeg_media\Cdn\CdnIntegrationInterface|null
   *   Active CDN integration or NULL if disabled.
   */
  #[\NoDiscard]
  public function getActiveIntegration(): ?CdnIntegrationInterface;

  /**
   * Gets all available CDN provider IDs.
   *
   * @return array<string, string>
   *   Map of provider ID to label.
   */
  #[\NoDiscard]
  public function getAvailableProviders(): array;

  /**
   * Gets a specific CDN integration by provider ID.
   *
   * @param string $providerId
   *   Provider ID.
   *
   * @return \Drupal\ffmpeg_media\Cdn\CdnIntegrationInterface|null
   *   CDN integration or NULL if not found.
   */
  #[\NoDiscard]
  public function getIntegration(string $providerId): ?CdnIntegrationInterface;

}
