<?php
namespace Components\Data\Mock;

use Components\Data\Contracts\AnalyticsProvider;

class MockAnalyticsProvider implements AnalyticsProvider
{
    public function getDashboardSummary($refresh = false): array
    {
        return [
            'emailsSent' => 4623236,
            'monthsAgo' => 7,
            'beginningIso' => '',
            'bouncedPercent' => 0,
            'bouncedCount' => 0,
            'openedPercent' => 27,
            'openedCount' => 99,
            'clickPercent' => 12,
            'clickCount' => 3,
            'orderPercent' => 7,
            'orderCount' => 1,
            'mobilePercent' => 15,
            'mobileCount' => 5557,
            'revenue' => '1333232,00 EUR',
            'voucherSum' => '12,00 EUR',
            'bot' => '2025-01-20 14:21:19',
            'cache_timestamp_out' => date('Y-m-d G:i:s', time() + 3600)
        ];
    }

    public function getModulePerformanceData(string $modKey = '', int $itemId = 0): array
    {
        return [
            'sent' => 1250,
            'opened' => 450,
            'clicked' => 85,
            'orders' => 12,
            'revenue' => '1250.50',
            'openRate' => 36.0,
            'clickRate' => 6.8,
            'bounceRate' => 1.2,
            'mobileRate' => 45.5,
            'lastSent' => (new \DateTime('-2 days'))->format(\DateTime::ATOM),
        ];
    }

    public function getAudiencePerformanceData(int $audienceId): array
    {
        return [
            'total' => 1234,
        ];
    }
}
