<script setup>
import { NTooltip } from 'naive-ui'
import {computed} from "vue";
const props = defineProps({
    operations: Array,
    patient: Object
})

const emits = defineEmits(['click'])

const firstOperation = computed(() => props.operations[0])
</script>

<template>
    <NTooltip v-if="operations.length" :arrow="false">
        <template #trigger>
            <div class="absolute inset-0 p-2 pt-2.5 cursor-pointer" @click="emits('click', {patient, operations})">
                {{ firstOperation?.code_service }}
            </div>
        </template>
        {{ firstOperation?.name_service }}
    </NTooltip>
</template>

<style scoped>

</style>
