<?php

namespace App\Controller\Admin;


use App\Entity\CollectifData;
use App\Entity\Common\TaxRate;
use App\Entity\Configuration;
use App\Entity\IndividualData;
use App\Entity\Site\Page;
use App\Entity\Territory;
use App\Entity\Thematic;
use App\Entity\User\GroupUser;
use App\Entity\User\User;
use EasyCorp\Bundle\EasyAdminBundle\Config\Assets;
use EasyCorp\Bundle\EasyAdminBundle\Config\Crud;
use EasyCorp\Bundle\EasyAdminBundle\Config\MenuItem;
use EasyCorp\Bundle\EasyAdminBundle\Router\AdminUrlGenerator;
use Lc\SovBundle\Controller\Dashboard\DashboardController as SovDashboardController;
use Symfony\Component\HttpFoundation\Response;

class DashboardAnimatorController extends SovDashboardController
{
    private $adminUrlGenerator;

    public function __construct(AdminUrlGenerator $adminUrlGenerator)
    {
        $this->adminUrlGenerator = $adminUrlGenerator;
    }

    public function configureMenuItems(): iterable
    {
        $urlCreate = $this->adminUrlGenerator
            ->setController(CollectifDataCrudController::class)
            ->setAction('new')
            ->generateUrl();

        yield MenuItem::linkToDashboard('dashboard', 'circle');
        yield MenuItem::linkToUrl('data_collectif_create', '', $urlCreate);
        yield MenuItem::subMenu('account', 'user')
            ->setSubItems(
                [
                    MenuItem::linkToRoute('account_profile', '', 'sov_admin_account_profile'),
                    MenuItem::linkToRoute('account_password', '', 'sov_admin_account_password'),
                ]
            );

    }
}
