<script setup>
import { computed } from 'vue';
import { useI18n } from 'vue-i18n';

const { t } = useI18n();

const props = defineProps({
    item: {
        type: Object,
        required: true,
    },
});

const item = computed(() => props.item);
</script>
<template>
    <q-item active-class="text-primary" :to="{ name: item.name }" clickable v-ripple>
        <q-item-section avatar v-if="item.icon">
            <q-icon :name="item.icon" />
        </q-item-section>
        <q-item-section avatar v-if="!item.icon">
            <q-icon name="disabled_by_default" />
        </q-item-section>
        <q-item-section>{{ t(item.title) }}</q-item-section>
    </q-item>
</template>
