<?php

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

$auditLog = AuditPageHelper::findOrRedirect(
    AuditAuthorizationPolicy::ABILITY_API_AUDIT_VIEW,
    ApiAuditService::class,
    'audit/api-audit',
    'API audit entry not found',
    'api_audit_not_found',
    'View API audit entry',
    $id ?? null
);
$breadcrumbs = [
    ['label' => t('Home'), 'path' => 'admin'],
    ['label' => t('API audit logs'), 'path' => 'audit/api-audit'],
    ['label' => t('View')],
];
