<?php
declare(strict_types=1);
/** @var array<int, array{label: string, url: string}> $portalVariants */
/** @var string $activeVariant base|alt|strip */
?>
<nav class="variant-nav" aria-label="포털 시안 전환">
  <?php foreach ($portalVariants as $v):
      $key = match ($v['label']) {
          '기본' => 'base',
          '변형' => 'strip',
          default => '',
      };
      $isActive = ($activeVariant ?? '') === $key;
  ?>
  <a href="<?= esc($v['url']) ?>" class="<?= $isActive ? 'on' : '' ?>"><?= esc($v['label']) ?></a>
  <?php endforeach; ?>
</nav>
