RouteEditorComposable

fun RouteEditorComposable(viewModel: RouteEditorViewModel, modifier: Modifier = Modifier, colors: RouteEditorComposableColors = RouteEditorComposableColors.colors(), textStyles: RouteEditorTextStyles = RouteEditorTextStyles.default, routeCard: @Composable (routeUiInfo: RouteUiInfo, isExpanded: Boolean, onCardClick: () -> Unit, onActionButtonClick: () -> Unit) -> Unit = { routeUiInfo, isExpanded, onCardClick, onActionButtonClick -> RouteCard( routeUiInfo = routeUiInfo, modifier = Modifier, isExpanded = isExpanded, onCardClick = onCardClick, colors = colors.routeCardColors, textStyles = textStyles, onActionButtonClick = onActionButtonClick, ) }, routePointsDisplay: @Composable (startPointTitle: String, destinationPointTitle: String, intermediatePoints: List<UiIntermediateRoutePoint>, onSwapDestinationsClick: () -> Unit, onCloseButtonClick: () -> Unit, onIntermediatePointsChanged: (List<UiIntermediateRoutePoint>) -> Unit) -> Unit = { startPointTitle, destinationPointTitle, intermediatePoints, onSwapDestinationsClick, onCloseButtonClick, onIntermediatePointsChanged, -> RoutePointsDisplay( startPointTitle = startPointTitle, destinationPointTitle = destinationPointTitle, intermediatePoints = intermediatePoints, onSwapDestinationsClick = onSwapDestinationsClick, onCloseClick = onCloseButtonClick, onIntermediatePointsChanged = onIntermediatePointsChanged, colors = colors.routePointsDisplayColors, textStyles = textStyles, ) }, transportationModesRow: @Composable (modifier: Modifier, selectedMode: TransportMode, onModeSelected: (TransportMode) -> Unit, durations: Map<TransportMode, Duration?>, allowedTransportTypes: EnumSet<TransportMode>) -> Unit = { localModifier, selectedMode, onModeSelected, durations, allowedTransportTypes -> TransportationModesRow( modifier = localModifier, selectedMode = selectedMode, onModeSelected = onModeSelected, durations = durations, allowedTransportTypes = allowedTransportTypes, colors = colors.transportationModesColors, textStyles = textStyles, ) }, onCloseClick: () -> Unit = {})

Navigation bottom sheet content that matches the Figma design This is the content that goes inside the ThreeStateBottomSheet

Parameters

viewModel

The route editor view model

modifier

Modifier for the composable

colors

Color scheme for the route editor components

textStyles

Text styles for the route editor components

routeCard

Custom route card composable. If not provided, the default RouteCard will be used. The lambda receives all parameters that RouteCard accepts.

routePointsDisplay

Custom route points display composable. If not provided, the default RoutePointsDisplay will be used. The lambda receives route point data and callbacks for interaction.

transportationModesRow

Custom transportation modes row composable. If not provided, the default TransportationModesRow will be used. The lambda receives transport mode data, selection callback, and a modifier for positioning.

onCloseClick

Callback invoked when the close button is clicked. Works with the default route points display.