<script setup lang="ts">
defineProps<{
  items: Array<{ label: string; to?: string }>
}>()
</script>

<template>
  <div class="container">
    <div class="row">
      <div class="col col-xs-12">
        <nav aria-label="面包屑" class="page-path">
          <template v-for="(item, index) in items" :key="`${item.label}-${item.to || 'static'}`">
            <NuxtLink v-if="item.to" :to="item.to">{{ item.label }}</NuxtLink>
            <span v-else>{{ item.label }}</span>
            <span v-if="index < items.length - 1"> &gt; </span>
          </template>
        </nav>
      </div>
    </div>
  </div>
</template>
