<script setup lang="ts">
import {Flight} from "@/Types/types";

defineProps<{
    flight: Flight
}>()
import AirlineLogo from "@/Components/FlightsGoneBy/AirlineLogo.vue";
import InlineBadge from "@/Components/FlightsGoneBy/InlineBadge.vue";
import FlightToolTip from "@/Components/FlightsGoneBy/FlightToolTip.vue";
</script>

<template>
    <FlightToolTip
        :flight="flight"
    >
        <InlineBadge class="flight-badge">
            <AirlineLogo hideTooltip :airline="flight.airline" />
            {{ flight.flight_number || `${flight.departure_airport.display_code}-${flight.arrival_airport.display_code}` }}
        </InlineBadge>
    </FlightToolTip>
</template>

<style scoped>
.flight-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    flex-shrink: 0;
}
</style>
