<?php

/*
 * This file is part of the VITICORE2 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\VitiTheme\Twig\Components\Site;

use CpCreation\VitiCore\Contact\Model\Contact;
use CpCreation\VitiCore\Contact\Repository\ContactRepository;
use Symfony\UX\TwigComponent\Attribute\AsTwigComponent;

#[AsTwigComponent('site:ContactActions', template: 'components/site/ContactActions.html.twig')]
final class ContactActions
{
    public function __construct(private readonly ContactRepository $contactRepository)
    {
    }

    public function getContact(): ?Contact
    {
        return $this->contactRepository->findOne();
    }
}
