<?php

declare(strict_types=1);

namespace App\Filament\Widgets\Workspace;

use Filament\Widgets\Widget;

class WorkspaceNeedsAttention extends Widget
{
    protected static bool $isLazy = false;

    protected int|string|array $columnSpan = 'full';

    protected string $view = 'filament.widgets.workspace.workspace-needs-attention';

    /**
     * @var array<int, array{
     *     key: string,
     *     managed_environment_id: int,
     *     tenant_label: string,
     *     tenant_route_key: string,
     *     family: string,
     *     urgency: string,
     *     title: string,
     *     body: string,
     *     supporting_message: ?string,
     *     badge: string,
     *     badge_color: string,
     *     reason_context: ?array<string, mixed>,
     *     destination: array<string, mixed>,
     *     action_disabled: bool,
     *     helper_text: ?string,
     *     url: ?string
     * }>
     */
    public array $items = [];

    /**
     * @var array{
     *     title: string,
     *     body: string,
     *     action_label: string,
     *     action_url: string
     * }
     */
    public array $emptyState = [];

    /**
     * @var array<int, array<string, mixed>>
     */
    public array $triageReviewProgress = [];

    /**
     * @param  array<int, array{
     *     key: string,
     *     managed_environment_id: int,
     *     tenant_label: string,
     *     tenant_route_key: string,
     *     family: string,
     *     urgency: string,
     *     title: string,
     *     body: string,
     *     supporting_message: ?string,
     *     badge: string,
     *     badge_color: string,
     *     reason_context: ?array<string, mixed>,
     *     destination: array<string, mixed>,
     *     action_disabled: bool,
     *     helper_text: ?string,
     *     url: ?string
     * }>  $items
     * @param  array{
     *     title: string,
     *     body: string,
     *     action_label: string,
     *     action_url: string
     * }  $emptyState
     * @param  array<int, array<string, mixed>>  $triageReviewProgress
     */
    public function mount(array $items = [], array $emptyState = [], array $triageReviewProgress = []): void
    {
        $this->items = $items;
        $this->emptyState = $emptyState;
        $this->triageReviewProgress = $triageReviewProgress;
    }
}
