<!--
  MenuList — canonical bridge for the TVU menu-item pattern.

  CODE-FIRST (owner approved 2026-07-02, divergence `logo-menulist-usermenu-code-first-2026-07-02`):
  Figma has NO standalone `MenuList` component-set — the pattern exists only as
  internal layers of the `Top bar` component (`Menu List` / `Menu`). This canonical
  extracts that pattern into a reusable dual-framework component so every menu group
  (topbar nav / dropdown / popup / context menu) shares one spec (CLAUDE_DESIGN_RULES §3).

  `orientation="horizontal"` = topbar nav (active item → brand-color underline).
  `orientation="vertical"` (default) = dropdown / panel body (active → brand color +
  trailing `action/selected` checkmark). Emits `select(value, item)`.
-->
<script setup lang="ts">
import BaseMenuList, { type MenuListItem } from '../components/MenuList/MenuList.vue'

export type { MenuListItem }

withDefaults(defineProps<{
  items?: MenuListItem[]
  orientation?: 'horizontal' | 'vertical'
}>(), {
  items: () => [],
  orientation: 'vertical',
})

const emit = defineEmits<{
  (e: 'select', value: string | number, item: MenuListItem): void
}>()
</script>

<template>
  <BaseMenuList
    :items="items"
    :orientation="orientation"
    data-figma-component="MenuList"
    @select="(value, item) => emit('select', value, item)"
  />
</template>
