<?php

namespace App\View\Components\Menu;

use App\Services\ContractTemplateService;
use Closure;
use Illuminate\Contracts\View\View;
use Illuminate\View\Component;
use function PHPUnit\Framework\returnArgument;

class SidebarContracts extends Component
{
    public $contracts;
    public function __construct(protected ContractTemplateService $contractTemplateService)
    {
        $this->contracts = $this->contractTemplateService->getAll();
    }

    /**
     * Get the view / contents that represent the component.
     */
    public function render(): View|Closure|string
    {
        return view('components.menu.sidebar-contracts');
    }
}
