<template>
  <AdminLayout>
    <Breadcrumb currentPageText="Kullanıcı Detay"/>
    <tabs :tabList="tabList">
      <template #birimlistesi>
        <tab-kullanici-birimleri />
      </template>
      <template #gorevlistesi>
        <tab-kullanici-gorevleri />
      </template>
    </tabs>
  </AdminLayout>
</template>
<script setup lang="ts">
  import { ref } from 'vue'
  import { useRoute } from 'vue-router'
  const route = useRoute()
  import { useGlobalStore } from '@/stores/globalStore'
  const globalStore = useGlobalStore()
  import AdminLayout from '@/layouts/AdminLayout.vue'
  import TabKullaniciGorevleri from '../components/TabKullaniciGorevleri.vue'
  import TabKullaniciBirimleri from '../components/TabKullaniciBirimleri.vue'

  if (globalStore.selUser === 0) globalStore.selUser = Number(route.params.kullaniciId)

  const tabList = ref<Record<string, any>[]>([
    { text: 'Birim Listesi', id: 'birimlistesi' },
    { text: 'Görev Listesi', id: 'gorevlistesi' }
  ])
</script>
