<?php

namespace App\Livewire\ServiceOrders;

use Livewire\Component;
use App\Models\ServiceOrder;

class Invoice extends Component
{
    public ServiceOrder $serviceOrder;

    public function mount(ServiceOrder $serviceOrder)
    {
        $this->serviceOrder = $serviceOrder->load([
            'customer', 
            'vehicle', 
            'assignedTechnician',
            'serviceItems',
            'parts'
        ]);
    }

    public function render()
    {
        return view('livewire.service-orders.invoice');
    }
}
