{"version":3,"file":"ClassicTabs-Bcine4_p.mjs","names":[],"sources":["../src/components/misc/ClassicTabs.vue","../src/components/misc/ClassicTabs.vue"],"sourcesContent":["<!--\n    Replacement component for ClassicNav\n    It is easier to use, and rely on user-defined ids to identify the slots,\n    instead of indices.\n-->\n<template>\n    <ClassicNav\n        v-model:active-tab=\"activeTab\"\n        :tab-number=\"tabs.length\"\n        :flex-column=\"flexColumn\"\n    >\n        <template v-for=\"(tab, index) in tabs\" #[index]>\n            {{ tab.label }}\n        </template>\n\n        <template v-for=\"(tab, index) in tabs\" #[tabSlotName(index)]>\n            <slot :name=\"'tab-' + tab.id\" />\n        </template>\n    </ClassicNav>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport ClassicNav from './ClassicNav.vue';\n\n/** Type for the ID of tabs */\ntype TabId = string|number;\n\nexport interface Tab {\n    /** ID of the tab, used for slots */\n    id: TabId;\n    /** Label displayed for the tab */\n    label: string;\n};\n\nconst props = defineProps<{\n    /** Tabs definition */\n    tabs: Array<Tab>;\n    /** Currently active tab */\n    activeTab: TabId;\n    /** Apply flex-column to content */\n    flexColumn?: boolean;\n}>();\n\nconst emit = defineEmits<{\n    /** Emitted when the tab changes */\n    (e: 'update:active-tab', tab: string|number): void;\n}>();\n\n/** Currently active tab, just a proxy */\nconst activeTab = computed({\n    get: () => props.tabs.findIndex(t => t.id === props.activeTab),\n    set: (index: number) => emit('update:active-tab', props.tabs[index].id)\n});\n\n/** Get the tab content slot name */\nfunction tabSlotName(index: number): string {\n    return 'tab' + index;\n}\n</script>\n","<!--\n    Replacement component for ClassicNav\n    It is easier to use, and rely on user-defined ids to identify the slots,\n    instead of indices.\n-->\n<template>\n    <ClassicNav\n        v-model:active-tab=\"activeTab\"\n        :tab-number=\"tabs.length\"\n        :flex-column=\"flexColumn\"\n    >\n        <template v-for=\"(tab, index) in tabs\" #[index]>\n            {{ tab.label }}\n        </template>\n\n        <template v-for=\"(tab, index) in tabs\" #[tabSlotName(index)]>\n            <slot :name=\"'tab-' + tab.id\" />\n        </template>\n    </ClassicNav>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport ClassicNav from './ClassicNav.vue';\n\n/** Type for the ID of tabs */\ntype TabId = string|number;\n\nexport interface Tab {\n    /** ID of the tab, used for slots */\n    id: TabId;\n    /** Label displayed for the tab */\n    label: string;\n};\n\nconst props = defineProps<{\n    /** Tabs definition */\n    tabs: Array<Tab>;\n    /** Currently active tab */\n    activeTab: TabId;\n    /** Apply flex-column to content */\n    flexColumn?: boolean;\n}>();\n\nconst emit = defineEmits<{\n    /** Emitted when the tab changes */\n    (e: 'update:active-tab', tab: string|number): void;\n}>();\n\n/** Currently active tab, just a proxy */\nconst activeTab = computed({\n    get: () => props.tabs.findIndex(t => t.id === props.activeTab),\n    set: (index: number) => emit('update:active-tab', props.tabs[index].id)\n});\n\n/** Get the tab content slot name */\nfunction tabSlotName(index: number): string {\n    return 'tab' + index;\n}\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;EAmCA,MAAM,QAAQ;EASd,MAAM,OAAO;;EAMb,MAAM,YAAY,SAAS;GACvB,WAAW,MAAM,KAAK,WAAU,MAAK,EAAE,OAAO,MAAM,SAAS;GAC7D,MAAM,UAAkB,KAAK,qBAAqB,MAAM,KAAK,OAAO,EAAE;EAC1E,CAAC;;EAGD,SAAS,YAAY,OAAuB;GACxC,OAAO,QAAQ;EACnB;;;;;;;;;;;;;;;;;;qBCpDI,YAYa,OAAA,eAAA;EAXD,cAAY,OAAA;8DAAA,OAAA,YAAS;EAC5B,cAAY,OAAA,KAAK;EACjB,eAAa,OAAA;sCAEmB,OAAA,OAAf,KAAK,UAAK;;SAAY;qBACrB,CAAA,gBAAA,gBAAZ,IAAI,KAAK,GAAA,CAAA,CAAA,CAAA;;gBAGiB,OAAA,OAAf,KAAK,UAAK;;SAAY,OAAA,YAAY,KAAK;qBACrB,CAAhC,WAAgC,KAAA,QAAA,SAAV,IAAI,EAAE,CAAA,CAAA"}