import type { WinterActivity } from '@trek/shared'; import { Footprints, Snowflake, type LucideIcon } from 'lucide-react'; import { useTranslation } from '../../../i18n'; import { fs } from '../../shared/DialogShell'; import { Tooltip } from '../../shared/Tooltip'; /** HIK-01: the icon each winter label goes by, a snowflake for winter hiking and footprints in the snow for snowshoes. */ export const WINTER_ACTIVITY_ICON: Record = { winter_hike: Snowflake, snowshoe: Footprints, }; /** * HIK-01: a hike's winter label on its round tile, a frosted snowflake badge * at the tile's top corner, the way the tile carries where a tour came from at * its foot. Its tooltip names the label; nothing is drawn for a hike without one. */ export function WinterCornerMark({ activity, size = 15, }: { activity: WinterActivity | null | undefined; /** The badge's diameter in pixels, about half the tile's. */ size?: number; }) { const { t } = useTranslation(); if (!activity) return null; const label = t(`tours.winter.activity.${activity}`); return ( ); } /** * HIK-01: the winter label as a pill of a tour's head, its icon in the info * tone. The tooltip says it is the travellers' label only, never a check of * the way in winter. */ export function WinterActivityPill({ activity, className }: { activity: WinterActivity; className: string }) { const { t } = useTranslation(); const Icon = WINTER_ACTIVITY_ICON[activity]; return ( ); }