<?php
$toast = App\Core\Session::flash('toast');
$toastPayload = is_string($toast) ? json_decode($toast, true) : $toast;
?>
<div class="toast-stack" data-toast-stack aria-live="polite" aria-atomic="true"></div>
<?php if (is_array($toastPayload)): ?>
<script>window.ZALOROX_TOAST = <?= json_encode($toastPayload, JSON_UNESCAPED_UNICODE | JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT) ?>;</script>
<?php endif; ?>
