<?php

namespace App\Livewire\Monitoring;

use App\Models\OperationRun;
use Filament\Forms\Concerns\InteractsWithForms;
use Filament\Forms\Contracts\HasForms;
use Illuminate\Contracts\View\View;
use Livewire\Component;

class OperationsDetail extends Component implements HasForms
{
    use InteractsWithForms;

    public OperationRun $run;

    public function mount(OperationRun $run): void
    {
        // Ensure tenant scope
        abort_unless($run->tenant_id === filament()->getTenant()->id, 403);
        $this->run = $run;
    }

    public function render(): View
    {
        return view('livewire.monitoring.operations-detail');
    }
}
