<!-- 经典布局 -->
<template>
	<el-container class="layout">
		<el-container class="classic-main">
			<Main />
		</el-container>
		<!-- <el-header>
			<div class="header-lf">
				<div @click="goHome" class="logo flx-center">
					<img src="@/assets/images/login/china.png" style="margin: 0 15px" alt="logo" />
					<span>数字化政务监管平台</span>
					<span v-if="moduleTitle" style="margin: 0 20px">|</span>
					<span class="title">{{ moduleTitle }}</span>
				</div>
				<ToolBarLeft />
			</div>
			<ToolBarRight />
		</el-header> -->
		<!-- <el-container class="classic-content">
			<el-aside>
				<div class="menu" :style="{ width: isCollapse ? '65px' : '210px' }">  根据屏幕自动收缩
				<div class="menu">
					<el-scrollbar>
						<el-menu
							:default-active="activeMenu"
							:router="false"
							:collapse="isCollapse"
							:collapse-transition="false"
							:unique-opened="true"
							background-color="#ffffff"
							text-color="#333333"
							style="--el-menu-hover-bg-color: #fff"
						>
							<SubMenu :menuList="menuList" />
						</el-menu>
					</el-scrollbar>
				</div>
			</el-aside>
			<el-container class="classic-main">
				<Main />
			</el-container>
		</el-container> -->
	</el-container>
</template>

<script setup lang="ts" name="layoutClassic">
import { computed } from "vue";
import { useRoute, useRouter } from "vue-router";
import { GlobalStore } from "@/stores";
import { AuthStore } from "@/stores/modules/auth";
import Main from "@/layouts/components/Main/index.vue";
import SubMenu from "@/layouts/components/Menu/SubMenu.vue";
import ToolBarLeft from "@/layouts/components/Header/ToolBarLeft.vue";
import ToolBarRight from "@/layouts/components/Header/ToolBarRight.vue";
import { HOME_URL } from "@/enums/Home";
// import router from "@/routers";

const route = useRoute();
const router = useRouter();
const authStore = AuthStore();
const globalStore = GlobalStore();
const activeMenu = computed(() => (route.meta.activeMenu ? route.meta.activeMenu : route.path));
const menuList = computed(() => authStore.showMenuListGet);
const isCollapse = computed(() => globalStore.themeConfig?.isCollapse);
const moduleTitle = globalStore.moduleName;
// const title = import.meta.env.VITE_GLOB_APP_TITLE;

const goHome = () => {
	router.push(HOME_URL[globalStore.accountType - 1]);
};
</script>

<style scoped lang="scss">
@import "./index.scss";
</style>

<style lang="scss">
.classic {
	.classic-content {
		// margin-top: 10px;
		// padding-top: 10px;
		height: calc(100% - 55px); // 减去头部高度
		.classic-main {
			width: calc(100% - 200px);
			display: flex;
			flex-direction: column;
		}
	}
	.el-menu,
	.el-menu--popup {
		.el-menu-item {
			&.is-active {
				// background: var(--el-color-primary-light-9);
				&::before {
					position: absolute;
					top: 12px;
					bottom: 0;
					right: 0;
					width: 4px;
					height: 38px;
					content: "";
					background: var(--el-color-primary);
				}
				// border-right: 4px solid #008bff;
				&.is:hover {
					background-color: #fff;
				}
			}
		}
	}

	// guide
	#driver-highlighted-element-stage {
		background-color: #606266 !important;
	}
}
</style>
