<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace App\Controller\Admin;

use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Serializer\SerializerInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\JsonResponse;

/**
 * @Route("/statistique")
 * @IsGranted("ROLE_USER")
 *
 */
class StatistiqueController extends ParentAdminController
{
    /**
     * @Route("/interventions",  methods="GET", name="stats_interventions")
     */
    public function interventions(Request $request, SerializerInterface $serializer): Response
    {
        $actions = [
            ['name' => 'Enregistrer', 'icon' => 'fa-save', 'id' => 'openpopup', 'class' => 'btn-save', 'href' => ''],
        ];

        return $this->render('statistique/interventions.html.twig', ['actions' => $actions, 'page' => 'stats_interventions']);
    }
}
