<template>
  This is a <strong>TEMPLATE</strong>
  <Suspense>
    <template #default>
      <div>
        <AppIcon v-for="app in apps" :key="app.packageName" :packageName="app.packageName" :label="app.label" />
      </div>
    </template>
  </Suspense>
</template>

<script setup>
import { ref } from 'vue'
import AppIcon from './components/AppIcon.vue'

const apps = ref([])

async function loadApps() {
  const resp = await fetch(Bridge.getAppsURL())
  const data = await resp.json()
  apps.value = data.apps
}

loadApps()
</script>

<style>

</style>
