<script setup lang="ts">
import { ref } from 'vue'

import { getAuthClient } from '@/api/auth_client'
import HeaderMenu from '@/components/HeaderMenu.vue'
import { useAuthStore } from '@/stores/auth'

const authStore = useAuthStore()
const client = getAuthClient()

const permissions = ref<string[]>([])

async function getPermissions() {
  permissions.value = []
  const res = await client.GetPermissions({})
  permissions.value = res.permissions!
}

getPermissions()
</script>

<template>
  <div class="center-block-custom">
    <div class="width700">
      <p>Доброго времени суток, {{ authStore.username }}.</p>
    </div>
  </div>

  <HeaderMenu active="office" />
</template>

<style scoped></style>
