<script setup>
import {useAuthStore} from "../Stores/auth.js";
import {NSelect} from "naive-ui";
import {computed, ref} from "vue";

const authStore = useAuthStore()

const value = ref(authStore.userDepartment.department_id)

const departments = computed(() => authStore.availableDepartments.map(item => ({
    label: item.name_full,
    value: item.department_id
})))
</script>

<template>
    <NSelect v-model:value="value" :options="departments" class="max-w-[280px]" />
</template>

<style scoped>

</style>
