<?php
declare(strict_types=1);
namespace App\Controllers;
use App\Core\Auth;use App\Core\Controller;use App\Core\Permission;use App\Services\AuditComplianceService;
final class AuditComplianceController extends Controller
{
 public function index():void{Auth::requireLogin();Permission::require('soc.audit.view');$svc=new AuditComplianceService();$this->view('security/audit_compliance',['pageTitle'=>'Audit & Compliance Center','report'=>$svc->dashboard()]);}
 public function run():void{Auth::requireLogin();Permission::require('soc.compliance.manage');(new AuditComplianceService())->runAudit();header('Location: /public/administration/securite/audit');exit;}
 public function exportCsv():void{Auth::requireLogin();Permission::require('soc.audit.export');(new AuditComplianceService())->exportCsv();}
}
