<script setup>
  const dataStore = useDataStore()
  const profileStore = useProfileStore()
  const router = useRouter()


  const templateColumns = [
    {
      key: 'employeeNumber',
      label: "MA-Nummer",
    },{
      key: 'fullName',
      label: "Name",
    },{
      key: "email",
      label: "E-Mail",
    }
  ]
  const selectedColumns = ref(templateColumns)
  const columns = computed(() => templateColumns.filter((column) => selectedColumns.value.includes(column)))

</script>

<template>
  <UDashboardNavbar title="Benutzer Einstellungen">
      <template #right>
        <UButton
          @click="router.push(`/profiles/create`)"
        >
          + Mitarbeiter
        </UButton>
      </template>
  </UDashboardNavbar>

  <UTable
    :rows="profileStore.profiles"
    @select="(item) => router.push(`/profiles/show/${item.id}`)"
    :columns="columns"
  >

  </UTable>
</template>

<style scoped>

</style>