<script setup lang="ts">
import { computed } from 'vue'
import { kbxPermissionCatalog } from '@kbx/contracts'
import KbxAppFrame from './shell/KbxAppFrame.vue'

const demoMode = import.meta.env.VITE_KBX_DEMO_MODE === 'true'
const permissions = computed(() => demoMode ? kbxPermissionCatalog.map(permission => permission.id) : [])
</script>

<template>
  <KbxAppFrame
    product-name="KBX"
    :granted-permissions="permissions"
    :preference-scope="demoMode ? 'demo-tenant:qa-user' : 'anonymous:secure-default'"
    app-version="v60-fe-status-canonical-contract-hardening"
    :user-role="demoMode ? 'QA' : 'anonymous'"
  />
</template>
