<?php

namespace App\Filament\Widgets;

use App\Services\Integrations\IntegrationHealthService;
use Filament\Widgets\Widget;

class IntegrationsHealthWidget extends Widget
{
    protected string $view = 'filament.widgets.integrations-health';

    protected ?string $pollingInterval = '60s';

    protected function getViewData(): array
    {
        $health = app(IntegrationHealthService::class);

        return [
            'providers' => $health->providers(),
        ];
    }
}
