<?php
/** @var list<string>|array<int, string>|null $errors */
$errors = is_array($errors ?? null) ? $errors : [];
if ($errors === []) {
    return;
}
?>
<div class="rounded-2xl border border-amber-200 bg-amber-50 p-4 text-sm text-amber-900 shadow-sm" role="alert">
    <p class="font-medium text-amber-950">Perlu perhatian</p>
    <ul class="mt-2 list-inside list-disc space-y-1">
        <?php foreach ($errors as $e) : ?>
            <li><?= esc((string) $e) ?></li>
        <?php endforeach ?>
    </ul>
</div>
