<?php

declare(strict_types=1);

namespace App\Filament\Widgets\Workspace;

use Filament\Widgets\Widget;

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

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

    protected string $view = 'filament.widgets.workspace.workspace-recent-operations';

    /**
     * @var array<int, array{
     *     id: int,
     *     title: string,
     *     tenant_label: ?string,
     *     status_label: string,
     *     status_color: string,
     *     outcome_label: string,
     *     outcome_color: string,
     *     lifecycle_label: ?string,
     *     guidance: ?string,
     *     started_at: string,
     *     destination: array<string, mixed>,
     *     url: string
     * }>
     */
    public array $operations = [];

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

    /**
     * @param  array<int, array{
     *     id: int,
     *     title: string,
     *     tenant_label: ?string,
     *     status_label: string,
     *     status_color: string,
     *     outcome_label: string,
     *     outcome_color: string,
     *     lifecycle_label: ?string,
     *     guidance: ?string,
     *     started_at: string,
     *     destination: array<string, mixed>,
     *     url: string
     * }>  $operations
     * @param  array{
     *     title: string,
     *     body: string,
     *     action_label: string,
     *     action_url: string
     * }  $emptyState
     */
    public function mount(array $operations = [], array $emptyState = []): void
    {
        $this->operations = $operations;
        $this->emptyState = $emptyState;
    }
}
