<template>
  <view class="app">
    <tab-bar v-if="showTabBar" />
    <slot />
  </view>
</template>

<script setup lang="ts">
import { computed } from 'vue'
import { onPageScroll, onReachBottom } from '@dcloudio/uni-app'

const tabBarPages = ['pages/index/index', 'pages/courses/index', 'pages/community/index', 'pages/sandbox/index', 'pages/profile/index']

const pages = getCurrentPages()
const showTabBar = computed(() => {
  return pages.length > 0 && tabBarPages.includes(pages[pages.length - 1]?.route || '')
})
</script>

<style>
@import './styles/variables.css';

page {
  background-color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--foreground);
  font-size: 28rpx;
}
</style>
