<?php

declare(strict_types=1);

/*
 * This file is part of the Ferienpass package.
 *
 * (c) Richard Henkenjohann <richard@ferienpass.online>
 *
 * For more information visit the project website <https://ferienpass.online>
 * or the documentation under <https://docs.ferienpass.online>.
 */

namespace Ferienpass\AdminBundle\Components\Account;

use Ferienpass\AdminBundle\Menu\ActionsBuilder;
use Ferienpass\CoreBundle\Entity\User;
use Knp\Menu\ItemInterface;
use Symfony\UX\TwigComponent\Attribute\AsTwigComponent;

#[AsTwigComponent('Admin:Account:Header')]
class Header
{
    public User $user;

    public function __construct(private readonly ActionsBuilder $actionsBuilder)
    {
    }

    public function getMenu(): ItemInterface
    {
        return $this->actionsBuilder->accountTertiary($this->user);
    }
}
