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


  const templateColumns = [
    {
      key: 'fullName',
      label: "Name:",
      sortable: true
    },
    {
      key: "email",
      label: "E-Mail:",
      sortable: true
    }
  ]
  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(`/settings/profiles/create`)"
        >
          + Mitarbeiter
        </UButton>
      </template>
  </UDashboardNavbar>

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

  </UTable>
</template>

<style scoped>

</style>