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

import { useSummaryDialog } from 'src/composables/useSummaryDialog';
import TicketSummary from 'src/pages/Ticket/Card/TicketSummary.vue';

const { t } = useI18n();

defineProps({
    id: {
        type: Number,
        required: true,
    },
});

const { viewSummary } = useSummaryDialog();
</script>

<template>
    <div>
        <QIcon color="primary" name="vn:lines" size="sm">
            <QTooltip>
                {{ t('Go to lines') }}
            </QTooltip>
        </QIcon>
        <QIcon
            @click.stop="viewSummary(id, TicketSummary)"
            class="q-ml-md"
            color="primary"
            name="preview"
            size="sm"
        >
            <QTooltip>
                {{ t('Preview') }}
            </QTooltip>
        </QIcon>
    </div>
</template>

<i18n>
es:
    Go to lines: Ir a lineas
    Preview: Vista previa
</i18n>
