<?php
$page_title = $page_title ?? '';
$breadcrumbs = $breadcrumbs ?? [];
$page_actions = $page_actions ?? '';
?>
<div class="app-content-header page-shell-header">
  <div class="container-fluid">
    <div class="page-shell">
      <div class="page-shell__main">
        <h1 class="page-shell__title mb-0"><?= e($page_title) ?></h1>
        <?php if (!empty($breadcrumbs)): ?>
          <ol class="breadcrumb page-shell__breadcrumb mb-0">
            <?php foreach ($breadcrumbs as $bc): ?>
              <?php if (!empty($bc['url'])): ?>
                <li class="breadcrumb-item"><a href="<?= e(url($bc['url'])) ?>"><?= e($bc['label'] ?? '') ?></a></li>
              <?php else: ?>
                <li class="breadcrumb-item active" aria-current="page"><?= e($bc['label'] ?? '') ?></li>
              <?php endif; ?>
            <?php endforeach; ?>
          </ol>
        <?php endif; ?>
      </div>
      <?php if (!empty($page_actions)): ?>
        <div class="page-shell__actions">
          <?= $page_actions ?>
        </div>
      <?php endif; ?>
    </div>
  </div>
</div>
