<script setup>
import LeftMenu from 'components/LeftMenu.vue';
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
import { useStateStore } from 'stores/useStateStore';
import { useI18n } from 'vue-i18n';
import ClaimDescriptor from './ClaimDescriptor.vue';
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
import useCardSize from 'src/composables/useCardSize';

const stateStore = useStateStore();
const { t } = useI18n();
</script>
<template>
    <Teleport to="#searchbar" v-if="stateStore.isHeaderMounted()">
        <VnSearchbar
            data-key="ClaimList"
            url="Claims/filter"
            :label="t('Search claim')"
            :info="t('You can search by claim id or customer name')"
        />
    </Teleport>
    <QDrawer v-model="stateStore.leftDrawer" show-if-above :width="256">
        <QScrollArea class="fit">
            <ClaimDescriptor />
            <QSeparator />
            <LeftMenu source="card" />
        </QScrollArea>
    </QDrawer>
    <QPageContainer>
        <QPage>
            <VnSubToolbar />
            <div :class="useCardSize()">
                <RouterView></RouterView>
            </div>
        </QPage>
    </QPageContainer>
</template>

<i18n>
es:
    Search claim: Buscar reclamación
    You can search by claim id or customer name: Puedes buscar por id de la reclamación o nombre del cliente
    Details: Detalles
    Notes: Notas
    Action: Acción
</i18n>
