<template>
    <div class="common-layout min-w-[1200px]" >
        <el-container class="w-100 h-screen">
            <layout-aside></layout-aside>

            <el-container>
                <el-header>
                    <layout-header></layout-header>
                </el-header>

                <el-main :class="['main-wrap h-full p-0',{'bg-page': dark}]">
                    <el-scrollbar>
                        <div>
                            <router-view v-slot="{ Component, route }" v-if="appStore.routeRefreshTag">
                                <component :is="Component" :key="route.fullPath" />
                            </router-view>
                        </div>
                    </el-scrollbar>
                </el-main>

            </el-container>
        </el-container>
    </div>
</template>

<script lang="ts" setup>
import { computed } from 'vue'
import layoutHeader from './components/header/index.vue'
import layoutAside from './components/aside/index.vue'
import useAppStore from '@/stores/modules/app'
import useSystemStore from '@/stores/modules/system'

const appStore = useAppStore()
const systemStore = useSystemStore()
const dark = computed(()=>{
    return systemStore.dark
})
</script>

<style lang="scss" scoped></style>
