<script setup lang="ts">
import { onMounted, onUnmounted } from 'vue'
import { useModelsStore } from '@/stores/models'
import AppLayout from '@/components/layout/AppLayout.vue'

const modelsStore = useModelsStore()

onMounted(async () => {
  await modelsStore.fetchModels()
  modelsStore.startPolling(5000)
})

onUnmounted(() => {
  modelsStore.stopPolling()
})
</script>

<template>
  <AppLayout />
</template>
