import {useState} from "react" import { Box, Button, Checkbox, Chip, FormControl, FormControlLabel, InputLabel, MenuItem, OutlinedInput, Select } from "@mui/material" import DirectionsBusTwoToneIcon from '@mui/icons-material/DirectionsBusTwoTone' import SubwayTwoToneIcon from '@mui/icons-material/SubwayTwoTone' import TrainTwoToneIcon from '@mui/icons-material/TrainTwoTone' import TramTwoToneIcon from '@mui/icons-material/TramTwoTone' function TripsFilter() { const [transportModeFilter, setTransportModeFilter] = useState( {longDistanceTrain: true, regionalTrain: true, metro: true, tram: true, bus: true}) const transportModeNames = { train: "Trains", longDistanceTrain: "Trains longue distance", regionalTrain: "Trains régionaux", metro: "Métro", tram: "Tram", bus: "Bus", } const trainCheckbox = <> setTransportModeFilter( {...transportModeFilter, longDistanceTrain: event.target.checked, regionalTrain: event.target.checked})} onClick={(event) => event.stopPropagation()} /> const longDistanceTrainCheckbox = <> setTransportModeFilter({...transportModeFilter, longDistanceTrain: event.target.checked})} /> const regionalTrainCheckbox = <> setTransportModeFilter({...transportModeFilter, regionalTrain: event.target.checked})} /> const metroCheckbox = <> setTransportModeFilter({...transportModeFilter, metro: event.target.checked})} /> const tramCheckbox = <> setTransportModeFilter({...transportModeFilter, tram: event.target.checked})} /> const busCheckbox = <> setTransportModeFilter({...transportModeFilter, bus: event.target.checked})} /> // TODO Fetch routes that are accessible from one stop // For now, we have the tram and bus routes accessible in Strasbourg main station const routesList = [ {name: "Tous"}, {name: "A", bgColor: "#E10D19", color: "#FFFFFF"}, {name: "C", bgColor: "#F29400", color: "#FFFFFF"}, {name: "D", bgColor: "#009933", color: "#FFFFFF"}, {name: "G", bgColor: "#F6C900", color: "#000000"}, {name: "H", bgColor: "#A62341", color: "#FFFFFF"}, {name: "2", bgColor: "#FF0000", color: "#FFFFFF"}, {name: "10", bgColor: "#FFAA00", color: "#000000"}, ] const routesDict = {} for (const route of routesList) { routesDict[route.name] = route } const [selectedRoutes, setSelectedRoutes] = useState(["Tous"]) return <>

Filtres

Mode de transport Ligne } export default TripsFilter