<?php

namespace App\Filament\SuperAdmin\Pages;

use App\Filament\Clusters\DailyOps\DailyOpsCluster;
use App\Filament\Widgets\QueueHealthWidget;
use App\Filament\Widgets\StorageCapacityWidget;
use App\Filament\Widgets\UploadPipelineHealthWidget;
use BackedEnum;
use Filament\Pages\Page;
use UnitEnum;

class OpsHealthDashboard extends Page
{
    protected string $view = 'filament.super-admin.pages.ops-health-dashboard';

    protected static ?string $cluster = DailyOpsCluster::class;

    protected static null|string|BackedEnum $navigationIcon = 'heroicon-o-signal';

    protected static null|string|UnitEnum $navigationGroup = null;

    protected static ?int $navigationSort = 5;

    public static function getNavigationGroup(): UnitEnum|string|null
    {
        return __('admin.nav.infrastructure');
    }

    public static function getNavigationLabel(): string
    {
        return __('admin.ops_health.navigation.label');
    }

    public function getHeading(): string
    {
        return __('admin.ops_health.heading');
    }

    public function getSubheading(): ?string
    {
        return __('admin.ops_health.subheading');
    }

    protected function getHeaderWidgets(): array
    {
        return [
            StorageCapacityWidget::class,
            UploadPipelineHealthWidget::class,
        ];
    }

    protected function getFooterWidgets(): array
    {
        return [
            QueueHealthWidget::class,
        ];
    }

    public function getHeaderWidgetsColumns(): int|array
    {
        return [
            'md' => 2,
            'xl' => 2,
        ];
    }
}
