<?php

namespace App\Controller\Admin;


use App\Entity\Site\Page;
use App\Entity\User\User;
use EasyCorp\Bundle\EasyAdminBundle\Config\MenuItem;
use Lc\SovBundle\Controller\Dashboard\DashboardAdminController as SovDashboardController;

class DashboardController extends SovDashboardController
{
    public function configureMenuItems(): iterable
    {
        $menuItems = [
            MenuItem::linkToDashboard('dashboard', 'far fa-circle'),

            MenuItem::linkToCrud('page', 'far fa-copy', Page::class),

            MenuItem::subMenu('account', 'fas fa-user')
                ->setSubItems(
                    [
                        MenuItem::linkToRoute('account_profile', 'fas fa-user-cog', 'sov_admin_account_profile'),
                        MenuItem::linkToRoute('account_password', 'fas fa-key', 'sov_admin_account_password'),
                    ]
                ),

            MenuItem::linkToCrud('user', 'fas fa-users', User::class),
        ];

        return $menuItems;
    }
}
