<?php

/*
 * This file is part of the Serenity package.
 *
 * (c) CP Creation <web@cpcreation.fr>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace CpCreation\VitiCore\Bridge\Symfony\Bundle\Controller\Site;

use CpCreation\VitiCore\Contact\Repository\ContactRepository;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;

final class CgvController extends AbstractController
{
    public function __construct(private ContactRepository $contactRepository)
    {
    }

    public function index(): Response
    {
        $contact = $this->contactRepository->findOne();

        return $this->render('cgv.html.twig', [
            'classMenu' => 'black',
            'contact' => $contact,
        ]);
    }
}
