<template>
	<a-layout>
		<a-layout-header :class="style['layout-header']">
			<!-- <basic-header /> -->
		</a-layout-header>
		<a-layout>
			<a-layout-sider :width="0" :class="style['layout-sider']">
				<!-- <basic-sider-menu :menus="menus" /> -->
			</a-layout-sider>
			<a-layout-content
				:class="style['layout-content']"
				class="view-layout-content"
			>
				<base-breadcrumb-view />
				<router-view />
				<a-back-top>
					<div :class="style['back-top']"></div>
				</a-back-top>
			</a-layout-content>
		</a-layout>
	</a-layout>
</template>
<script lang="ts">
import { defineComponent, computed } from 'vue'
import BaseBreadcrumbView from './BaseBreadcrumbView.vue'
// import BasicSiderMenuView from './BasicSiderMenuView.vue'
// import BasicHeader from './BasicHeader.vue'
import style from './basic-layout.module.less'
import { permissionStore } from '@/store/modules/permission'
import { AppRouteRecordRaw } from '@/router/model'
export default defineComponent({
	components: {
		// BasicSiderMenuView,
		// BasicHeader,
		BaseBreadcrumbView,
	},
	setup() {
		const usePermissionStore = permissionStore()
		const menus = computed(() => {
			if (usePermissionStore.authoritiesRoutes.length > 0) {
				return usePermissionStore.authoritiesRoutes.find(
					f => f.path === '/'
				)?.children
			}
			return []
		})

		return {
			style,
			menus: menus as unknown as AppRouteRecordRaw[],
		}
	},
})
</script>
