<?php
/**
 * @var array|string $message
 * @var string $type
 * @var string $title
 * @var string $page_title
 * @var string $back_url
 * @var string $back_url_name
 */

$this->layout(
    'system::layout/default',
    [
        'title'      => $title,
        'page_title' => $page_title ?? $title,
    ]
);

if (isset($admin)) {
    $this->sectionReplace('sidebar-menu', $this->fetch('admin::sidebar-admin-menu', [$parent_menu ?? 'usr_menu' => [$menu_item ?? '' => true]]));
}
?>
<div class="row">
    <div class="m-sm-auto m-md-auto m-lg-0 col-sm-8 col-md-8 col-lg-7 col-xl-8">
        <?= $this->fetch(
            'system::app/alert',
            [
                'alert_type' => $type,
                'alert'      => $message,
            ]
        ) ?>
        <?php if (! empty($back_url)): ?>
            <a href="<?= $back_url ?>" class="btn btn-primary"><?= $back_url_name ?? d__('system', 'Back') ?></a>
        <?php endif; ?>
    </div>
</div>
