<script setup>
import { useI18n } from 'vue-i18n';
import LeftMenu from 'src/components/LeftMenu.vue';
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';

import { useStateStore } from 'stores/useStateStore';

const { t } = useI18n();
const stateStore = useStateStore();
</script>

<template>
    <template v-if="stateStore.isHeaderMounted()">
        <Teleport to="#searchbar">
            <VnSearchbar
                data-key="EntryList"
                :label="t('Search entries')"
                :info="t('You can search by entry reference')"
            />
        </Teleport>
    </template>
    <QDrawer v-model="stateStore.leftDrawer" show-if-above :width="256">
        <QScrollArea class="fit text-grey-8">
            <LeftMenu />
        </QScrollArea>
    </QDrawer>
    <QPageContainer>
        <RouterView></RouterView>
    </QPageContainer>
</template>

<i18n>
es:
    Search entries: Buscar entradas
    You can search by entry reference: Puedes buscar por referencia de la entrada
</i18n>
