<?php

namespace App\Components\Dsar;

use App\Models\Dsar\Dsar;
use Livewire\Component;

class View extends Component {
    public Dsar $dsar;

    public function mount(): void {
        $this->authorize('dsars.view');
    }

    public function render() {
        $this->dsar->loadMissing(['institution', 'emailSend', 'latestResponse', 'claim.client']);

        return view('components.dsar.view', [
            'institution' => $this->dsar->institution,
            'emailSend'   => $this->dsar->emailSend,
        ]);
    }
}
