<?php

namespace App\Filament\Pages;

use App\Filament\Resources\RevenueResource\Widgets\RevenueWidget;
use App\Filament\Widgets\CalendarWidget;
use Closure;
use Filament\Facades\Filament;
use Filament\Pages\Page;
use Filament\Widgets\AccountWidget;
use Filament\Widgets\FilamentInfoWidget;
use Illuminate\Support\Facades\Route;

class Dashboard extends Page
{
    protected static ?string $navigationIcon = 'heroicon-o-home';

    protected static ?int $navigationSort = -2;

    protected static string $view = 'filament.pages.dashboard';

    protected static function getNavigationLabel(): string
    {
        return static::$navigationLabel ?? static::$title ?? __('filament::pages/dashboard.title');
    }

    public static function getRoutes(): Closure
    {
        return function () {
            Route::get('/', static::class)->name(static::getSlug());
        };
    }

    protected function getWidgets(): array
    {
        return [
            AccountWidget::class,
            CalendarWidget::class,
            // RevenueWidget::class,
        ];
    }

    protected function getColumns(): int | string | array
    {
        return 1;
    }

    protected function getTitle(): string
    {
        return static::$title ?? __('filament::pages/dashboard.title');
    }
}
