<?php
namespace App\Controllers;

use App\Core\Auth;
use App\Core\Controller;
use App\Models\Parameter;
use App\Core\Permission;

final class ParameterStudioController extends Controller
{
    public function index(): void
    {
        Auth::requireLogin();
        Permission::requireAny(
            'parametres.poles.manage',
            'parametres.disciplines.manage',
            'parametres.publics.manage'
        );

        $this->view('parameters/studio',[
            'pageTitle'=>'Paramètres Studio',
            'poles'=>Parameter::poles(),
            'disciplines'=>Parameter::disciplines(),
            'publics'=>Parameter::publics(),
        ]);
    }
}
