<?php

use MintyPHP\Module\Audit\AuditAuthorizationPolicy;
use MintyPHP\Module\Audit\Service\SystemAuditService;
use MintyPHP\Module\Audit\Support\AuditPageHelper;

$auditLog = AuditPageHelper::findOrRedirect(
    AuditAuthorizationPolicy::ABILITY_SYSTEM_AUDIT_VIEW,
    SystemAuditService::class,
    'audit/system-audit',
    'System audit entry not found',
    'system_audit_not_found',
    'View system audit entry',
    $id ?? null
);
$breadcrumbs = [
    ['label' => t('Home'), 'path' => 'admin'],
    ['label' => t('System audit logs'), 'path' => 'audit/system-audit'],
    ['label' => t('View')],
];
