<script setup lang="ts">
definePageMeta({
  middleware: "auth"
})
const dataStore = useDataStore()
const router = useRouter()

const columns = [
  {
    key:"id",
    label: "Id"
  },
  {
    key:"firstName",
    label: "Vorname:",
  },
  {
    key: "lastName",
    label: "Nachname:"
  },
  {
    key: "username",
    label: "Benutzername"
  },
  {
    key: "role",
    label: "Rolle"
  }
]


</script>

<template>

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

  </UTable>

  <DevOnly>
    {{dataStore.profiles}}
  </DevOnly>
</template>

<style scoped>

</style>