<?php

namespace App\Filament\Resources\ClientInputResource\Widgets;

use App\Models\Client;
use App\Models\ClientInput;
use Filament\Widgets\StatsOverviewWidget as BaseWidget;
use Filament\Widgets\StatsOverviewWidget\Card;

class StatsOverview extends BaseWidget
{
    protected static ?string $pollingInterval = '10s';

    protected function getCards(): array
    {
        return [
            Card::make('Nb Demandes des clients', ClientInput::count()),
            Card::make('Nb des clients', Client::count()),
            Card::make('Nb des visits des pages', \App\Models\Visit::sum('visits_count')),
        ];
    }
}
