<!-- @format -->

<script setup>
import { useCommonStore } from '@/stores/modules/common'

const commonStore = useCommonStore()

const router = useRouter()

watch(
  () => router.currentRoute.value.path,
  (v) => {
    if (v === '/')
      commonStore.setNavigateBgColor('#0F0820')
    else commonStore.setNavigateBgColor('#FFFFFF')
  },
  {
    immediate: true,
  },
)
</script>

<template>
  <div class="common-layout">
    <el-container class="h-full">
      <!-- <el-header class="pos-relative">
        <AppHeader />
      </el-header> -->
      <el-main id="app-scroller" class="relative">
        <AppHeader />
        <slot />
      </el-main>
      <!-- <el-footer><AppFooter /></el-footer> -->
    </el-container>
  </div>
</template>

<style lang="less">
.common-layout {
  height: 100vh;

  .el-header {
    padding: 20px 0;
    height: unset;
  }
  .el-main {
    padding: 0px;
  }
}
</style>
