import React from 'react'; import * as LucideIcons from 'lucide-react'; import { Car, Landmark, Search, Sparkles } from 'lucide-react'; import DawarichIcon from '../shared/DawarichIcon'; import TrekMark from '../shared/TrekMark'; /* * The small pictures on the release cards: pieces of TREK itself, drawn at card * size rather than screenshotted, because a screenshot this small is a blur. They * carry no words, only place names and figures that read the same in every * language, so nothing here needs translating. */ function PlacesApiVisual() { return (
Fushimi Inari
Fushimi Inari Taisha Kyoto
); } // The route and its stops, in the planner's own route blue and marker style. const ROUTE = 'M26 84 C 58 82, 60 44, 96 46 S 136 74, 160 52 S 176 30, 182 28'; function RoadtripVisual() { return (
1 2 3 386 km
); } // A recorded day, with the two places the traveller stayed. const TRAIL = '84,94 96,88 106,80 118,76 130,74 142,66 152,58 162,62 172,66 180,56 186,46'; const STAYS: Array<[number, number]> = [[130, 74], [186, 46]]; function DawarichVisual() { return (
); } const VISUALS: Record React.ReactElement> = { 'places-api': PlacesApiVisual, roadtrip: RoadtripVisual, dawarich: DawarichVisual, }; /** The card's picture, or its icon when the release names no drawing this client knows. */ export function ReleaseFeatureVisual({ visual, iconName }: { visual?: string; iconName: string }) { const Drawing = visual ? VISUALS[visual] : undefined; if (Drawing) return ; const Icon: React.ElementType = ((LucideIcons as Record)[iconName] as React.ElementType) ?? Sparkles; return (
); }