<!--
  Based on: https://github.com/alex-shpak/hugo-book/blob/master/layouts/shortcodes/tabs.html
-->

{{ if .Inner }}{{ end }}
{{ $id := .Get 0 }}
{{ $group := printf "tabs-%s" $id }}

<nav>
  <div class="nav nav-tabs" id="nav-tab" role="tablist">
  {{ range $index, $tab := .Scratch.Get $group -}}
    <button data-toggle-tab="{{ $tab.Slug }}" class="nav-link{{ if not $index }} active{{ end }}" id="{{ printf "%s-%d" $group $index }}-tab" data-bs-toggle="tab" data-bs-target="#{{ printf "%s-%d" $gr