getFlightColor(flight.flightNumber)
),
padding: "3px 10px",
borderRadius: "4px",
}}
>
{flight.flightNumber}
flight.status === "delayed"
? "#fef3c7"
: flight.status === "cancelled"
? "#fee2e2"
: "#d1fae5"
),
color: computed(() =>
flight.status === "delayed"
? "#d97706"
: flight.status === "cancelled"
? "#dc2626"
: "#059669"
),
display: computed(() =>
flight.status !== "scheduled" ? "inline" : "none"
),
}}
>
{(flight.status || "scheduled").toUpperCase()}
{flight.confirmationNumber}
{/* Route */}
{flight.departureAirport || "???"}
→
{flight.arrivalAirport || "???"}
flight.departureCity && flight.arrivalCity
? "inline"
: "none"
),
}}
>
({computed(() =>
`${flight.departureCity || ""} to ${
flight.arrivalCity || ""
}`
)})
{/* Date and Time */}
{formatDate(flight.departureDate)}
flight.daysUntilFlight <= 1
? "#fef3c7"
: "#e5e7eb"
),
borderRadius: "4px",
fontSize: "12px",
}}
>
{ifElse(
flight.daysUntilFlight === 0,
"Today",
ifElse(
flight.daysUntilFlight === 1,
"Tomorrow",
`in ${flight.daysUntilFlight} days`,
),
)}
{formatTime(flight.departureTime)}
flight.arrivalTime ? "inline" : "none"
),
}}
>
{" "}
→ {computed(() => formatTime(flight.arrivalTime))}
{/* Details Row */}
(flight.seat ? "inline" : "none"),
),
}}
>
Seat:{" "}
{computed(() => flight.seat || "")}
(flight.gate ? "inline" : "none"),
),
}}
>
Gate:{" "}
{computed(() => flight.gate || "")}
(flight.terminal ? "inline" : "none"),
),
}}
>
Terminal:{" "}
{computed(() => flight.terminal || "")}
))}