<script setup lang="ts">
import { CrewType } from "@/Types/types";
import GlassTooltip from "@/Components/FlightsGoneBy/GlassTooltip.vue";

defineProps<{
    crewType: CrewType
}>()
</script>

<template>
    <GlassTooltip>
        <template #activator="{ props: tooltipProps }">
            <span v-bind="tooltipProps" style="cursor:pointer; display:inline-flex">
                <slot />
            </span>
        </template>

        <div class="tooltip-rows">
            <div class="tooltip-row">
                <span class="tooltip-label">Position</span>
                <span class="tooltip-value">{{ crewType.name }}</span>
            </div>
        </div>
    </GlassTooltip>
</template>

<style scoped>
.tooltip-rows {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.tooltip-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.tooltip-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    color: var(--muted, #445566);
    flex-shrink: 0;
}

.tooltip-value {
    font-size: 0.78rem;
    color: var(--text, #c8cdd8);
    text-align: right;
}
</style>
