import React from 'react' import { CalendarDays, Route } from 'lucide-react' import { useTranslation } from '../../i18n/TranslationContext' import { NEUTRAL_TINT } from '../shared/DialogShell' interface RoadtripModeSwitchProps { active: boolean onChange: (roadtrip: boolean) => void } /** * Switches the plan view's left rail between the day plan and the road trip reading of * the same trip. Only rendered while the road trip addon is on, so a trip that isn't * driven anywhere never grows a control it has no use for. It opens the rail's tinted * head band, so with the day plan's tools below it the two read as one band. */ export default function RoadtripModeSwitch({ active, onChange }: RoadtripModeSwitchProps): React.ReactElement { const { t } = useTranslation() const options: [boolean, string, typeof Route][] = [ [false, t('roadtrip.mode.days'), CalendarDays], [true, t('roadtrip.mode.roadtrip'), Route], ] return (