<?php
$alertType = ["info" => "primary", "warning" => "warning", "error" => "danger", "success" => "info"];
?>

<div class="tempMessage px-0 alert alert-<?= $alertType[$_view["type"]]; ?> alert-dismissible">
    <div class="container py-0 pe-5">
    <?php if ($_view["link"]) { ?>
        <a href="<?= $_view["link"]; ?>"><?= $_view["message"]; ?></a>
    <?php } else { ?>
        <?= $_view["message"]; ?>
    <?php } ?>
    <button type="button" id="tempMessage-close" class="btn-close"></button>
    </div>
</div>