{{ if ne .Parent.Name "tabs" }}
  {{- errorf "tab shortcode missing its 'tabs' parent: %s" .Position -}}
{{ end }}

{{ $name := trim (.Get "name") " " }}

{{ if not (.Parent.Store.Get "tabs") }}
  {{ .Parent.Store.Set "tabs" slice }}
{{ end }}
{{ with .Inner }}
  {{ $.Parent.Store.Add "tabs" (dict "name" $name "content" . ) }}
{{ end }}
