<?php

namespace App\Components\Client;

use App\Models\Client\Client;
use App\Trait\ManagesEvidenceReview;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Livewire\Component;

/**
 * Standalone, full-page evidence review at /clients/{client}/evidence.
 * The review itself (filters, grouping, per-file actions) lives in
 * ManagesEvidenceReview, shared with the embedded client Evidence tab.
 */
class EvidenceWorkbench extends Component
{
    use AuthorizesRequests, ManagesEvidenceReview;

    public Client $client;

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

    public function render()
    {
        return view('components.client.evidence-workbench', $this->evidenceReviewData())
            ->layout('layouts.dashboard');
    }
}
