2023-03-03 15:54:28 +00:00
|
|
|
<script lang="ts" setup>
|
2023-03-17 15:13:37 +00:00
|
|
|
import { LayoutService } from '@/Stores/layout';
|
2024-04-23 17:36:45 +00:00
|
|
|
import { StyleService } from '@/Stores/style.service';
|
2023-03-17 15:13:37 +00:00
|
|
|
import NavBar from '@/Components/NavBar.vue';
|
|
|
|
import AsideMenu from '@/Components/AsideMenu.vue';
|
|
|
|
import FooterBar from '@/Components/FooterBar.vue';
|
2023-03-24 10:41:52 +00:00
|
|
|
import NotificationToast from '@/Components/NotificationToast.vue';
|
2023-03-03 15:54:28 +00:00
|
|
|
|
2023-03-17 15:13:37 +00:00
|
|
|
const styleService = StyleService();
|
2023-03-03 15:54:28 +00:00
|
|
|
|
2023-03-17 15:13:37 +00:00
|
|
|
const layoutService = LayoutService();
|
2023-03-03 15:54:28 +00:00
|
|
|
|
2023-12-15 16:17:33 +00:00
|
|
|
const props = defineProps({
|
|
|
|
showAsideMenu: {
|
|
|
|
type: Boolean,
|
|
|
|
default: true // Set default value to true
|
|
|
|
}
|
|
|
|
// user: {
|
|
|
|
// type: Object,
|
|
|
|
// default: () => ({}),
|
|
|
|
// }
|
|
|
|
});
|
2023-03-03 15:54:28 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2023-12-15 16:17:33 +00:00
|
|
|
<div :class="{
|
|
|
|
'dark': styleService.darkMode,
|
|
|
|
'overflow-hidden lg:overflow-visible': layoutService.isAsideMobileExpanded,
|
|
|
|
}">
|
|
|
|
<div :class="{
|
|
|
|
'ml-60 lg:ml-0': layoutService.isAsideMobileExpanded,
|
|
|
|
'xl:pl-60': props.showAsideMenu==true }"
|
|
|
|
class="pt-14 min-h-screen w-screen transition-position lg:w-auto bg-gray-50 dark:bg-slate-800 dark:text-slate-100">
|
|
|
|
<NavBar :class="{ 'ml-60 lg:ml-0': layoutService.isAsideMobileExpanded }" :showBurger="props.showAsideMenu" />
|
|
|
|
<!-- Conditionally render AsideMenu based on showAsideMenu prop -->
|
|
|
|
<template v-if="showAsideMenu">
|
|
|
|
<AsideMenu />
|
|
|
|
</template>
|
|
|
|
<!-- slot for main content -->
|
2023-03-17 15:13:37 +00:00
|
|
|
<slot></slot>
|
|
|
|
<FooterBar />
|
|
|
|
</div>
|
2023-03-03 15:54:28 +00:00
|
|
|
</div>
|
2023-03-24 10:41:52 +00:00
|
|
|
<NotificationToast></NotificationToast>
|
2024-04-23 17:36:45 +00:00
|
|
|
</template>
|