<script setup>
import { useStateStore } from 'stores/useStateStore';
import LeftMenu from 'components/LeftMenu.vue';
import { onMounted } from 'vue';
import { useQuasar } from 'quasar';

const stateStore = useStateStore();
const $props = defineProps({
    leftDrawer: {
        type: Boolean,
        default: true,
    },
});
onMounted(
    () => (stateStore.leftDrawer = useQuasar().screen.gt.xs ? $props.leftDrawer : false)
);
</script>

<template>
    <QDrawer v-model="stateStore.leftDrawer" show-if-above :width="256">
        <QScrollArea class="fit text-grey-8">
            <LeftMenu />
        </QScrollArea>
    </QDrawer>
    <QPageContainer>
        <QPage>
            <RouterView />
        </QPage>
    </QPageContainer>
</template>
