<?php

declare(strict_types=1);

namespace App\Application\LiveComponents\Services;

use App\Application\LiveComponents\ValueObjects\MetricValue;
use App\Application\LiveComponents\ValueObjects\TimeRange;

/**
 * MetricsDataProvider - Interface for loading metrics data
 *
 * Allows for multiple implementations:
 * - DemoMetricsDataProvider: Demo data for development
 * - DatabaseMetricsDataProvider: Real data from database
 * - ApiMetricsDataProvider: Data from external API
 * - CachedMetricsDataProvider: Cached data with fallback
 */
interface MetricsDataProvider
{
    /**
     * Get metrics for a specific time range
     *
     * @param TimeRange $timeRange
     * @return array<MetricValue>
     */
    public function getMetricsForTimeRange(TimeRange $timeRange): array;

    /**
     * Refresh metrics (force reload without cache)
     *
     * @param TimeRange $timeRange
     * @return array<MetricValue>
     */
    public function refreshMetrics(TimeRange $timeRange): array;
}
