<script setup>
import Tabs from "primevue/tabs";
import TabList from "primevue/tablist";
import Tab from "primevue/tab";

defineProps({
  modelValue: { type: [String, Number], default: null },
  tabs: {
    type: Array,
    default: () => [],
  },
});

const emit = defineEmits(["update:modelValue"]);
</script>

<template>
  <Tabs
    :value="modelValue"
    v-bind="$attrs"
    @update:value="emit('update:modelValue', $event)"
  >
    <TabList>
      <Tab v-for="item in tabs" :key="item.value" :value="item.value">
        {{ item.label }}
      </Tab>
    </TabList>
  </Tabs>
</template>
