<?php

declare(strict_types=1);

namespace App\Support\System;

use App\Filament\System\Pages\Ops\Runs;
use App\Filament\System\Pages\Ops\ViewRun;
use App\Models\OperationRun;

final class SystemOperationRunLinks
{
    public static function index(): string
    {
        return Runs::getUrl(panel: 'system');
    }

    public static function view(OperationRun|int $run): string
    {
        $runId = $run instanceof OperationRun ? (int) $run->getKey() : (int) $run;

        return ViewRun::getUrl(['run' => $runId], panel: 'system');
    }
}
