<?php

namespace App\View\Components;

use Illuminate\Support\Collection;
use Illuminate\View\Component;

class DocumentTable extends Component
{
    public string $title;

    public Collection $documents;

    /**
     * Create a new component instance.
     */
    public function __construct(string $title, Collection $documents)
    {
        $this->title = $title;
        $this->documents = $documents;
    }

    /**
     * Get the view / contents that represent the component.
     *
     * @return \Illuminate\Contracts\View\View|\Closure|string
     */
    public function render()
    {
        return view('components.document-table');
    }
}
