2023-11-29 15:52:41 +00:00
|
|
|
<script lang="ts" setup>
|
|
|
|
import { computed } from 'vue';
|
2023-03-03 15:54:28 +00:00
|
|
|
// import { usePage } from '@inertiajs/vue3'
|
|
|
|
// import { usePage } from '@inertiajs/inertia-vue3';
|
2023-03-17 15:13:37 +00:00
|
|
|
import { LayoutService } from '@/Stores/layout';
|
2023-11-29 15:52:41 +00:00
|
|
|
import { MainService } from '@/Stores/main';
|
|
|
|
// import menu from '@/menu';
|
2023-03-03 15:54:28 +00:00
|
|
|
import AsideMenuLayer from '@/Components/AsideMenuLayer.vue';
|
2023-11-29 15:52:41 +00:00
|
|
|
// import OverlayLayer from '@/Components/OverlayLayer.vue';
|
2023-03-03 15:54:28 +00:00
|
|
|
|
|
|
|
// let menu = reactive({});
|
|
|
|
// menu = computed(() => usePage().props.navigation?.menu);
|
|
|
|
|
2023-11-27 16:17:22 +00:00
|
|
|
|
2023-03-03 15:54:28 +00:00
|
|
|
const layoutService = LayoutService();
|
2023-11-29 15:52:41 +00:00
|
|
|
const mainService =MainService();
|
|
|
|
// let menu = reactive({});
|
|
|
|
let menu = computed(() => mainService.menu);
|
|
|
|
|
2023-03-03 15:54:28 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2023-10-31 14:38:43 +00:00
|
|
|
<AsideMenuLayer
|
|
|
|
v-if="menu && Object.keys(menu).length"
|
|
|
|
:menu="menu"
|
|
|
|
:class="[
|
|
|
|
layoutService.isAsideMobileExpanded ? 'left-0' : '-left-60 lg:left-0',
|
|
|
|
{ 'lg:hidden xl:flex': !layoutService.isAsideLgActive },
|
|
|
|
]"
|
|
|
|
/>
|
|
|
|
<!-- <OverlayLayer
|
2023-03-03 15:54:28 +00:00
|
|
|
v-show="layoutService.isAsideLgActive"
|
|
|
|
z-index="z-30"
|
|
|
|
@overlay-click="layoutService.isAsideLgActive = false"
|
|
|
|
/> -->
|
|
|
|
</template>
|