<script setup lang="ts">
// import { useTagsViewStore } from '@common/src/store/modules/tagsView'
import { useAppStore } from '../../store/modules/app'
import { Footer } from '../../components/Footer'
import { computed } from 'vue'

const appStore = useAppStore()

const footer = computed(() => appStore.getFooter)

// const tagsViewStore = useTagsViewStore()
//
// const getCaches = computed((): string[] => {
//   return tagsViewStore.getCachedViews
// })
</script>

<template>
  <section
    :class="[
      // ! 修改了全局box-sizing 为border-box
      // 'flex-1 p-[var(--app-content-padding)] w-[calc(100%-var(--app-content-padding)-var(--app-content-padding))] bg-[var(--app-content-bg-color)] dark:bg-[var(--el-bg-color)]'
      'flex-1 p-[var(--app-content-padding)] w-100% h-[calc(100%-var(--top-tool-height)-var(--tags-view-height))] bg-[var(--app-content-bg-color)] dark:bg-[var(--el-bg-color)]'
    ]"
  >
    <router-view>
      <template #default="{ Component, route }">
        <!--        <keep-alive :include="getCaches">-->
        <component :is="Component" :key="route.fullPath" />
        <!--        </keep-alive>-->
      </template>
    </router-view>
  </section>
  <Footer v-if="footer" />
</template>
