<script setup lang="ts">
    import ProfileEmployee from 'src/modules/profile/pages/employee/profile-employee.vue';
    import { useAuthStore } from 'src/stores/auth-store';
    import { type EmployeeProfile } from 'src/modules/employee-list/types/employee-profile-interface';

    const auth_store = useAuthStore();
    const employee_roles = [ 'SUPERVISOR', 'EMPLOYEE', 'ADMIN', 'HR', 'ACCOUNTING' ];

    const { employeeProfile } = defineProps<{
        employeeProfile?: EmployeeProfile | undefined;
    }>();
</script>

<template>
    <q-page class="bg-secondary column items-center justify-center">        
        <ProfileEmployee 
            v-if="employee_roles.includes( auth_store.user.role.toUpperCase() )"
            class="col-auto"
            :employee-profile="employeeProfile"
        />
    </q-page>
</template>