package com.sistemasolton.itranvias.navigation;

import androidx.compose.animation.AnimatedContentScope;
import androidx.compose.runtime.Composer;
import androidx.compose.runtime.ComposerKt;
import androidx.navigation.NavBackStackEntry;
import androidx.navigation.NavBackStackEntryKt;
import androidx.navigation.NavHostController;
import androidx.navigation.NavOptionsBuilder;
import com.sistemasolton.itranvias.home.presentation.linedetail.LineDetailScreenKt;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function4;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Reflection;

/* JADX INFO: compiled from: NavigationWrapper.kt */
/* JADX INFO: loaded from: classes2.dex */
@Metadata(k = 3, mv = {2, 1, 0}, xi = 48)
final class NavigationWrapperKt$NavigationWrapper$5$1$2 implements Function4<AnimatedContentScope, NavBackStackEntry, Composer, Integer, Unit> {
    final /* synthetic */ NavHostController $mainNavController;

    NavigationWrapperKt$NavigationWrapper$5$1$2(NavHostController navHostController) {
        this.$mainNavController = navHostController;
    }

    @Override // kotlin.jvm.functions.Function4
    public /* bridge */ /* synthetic */ Unit invoke(AnimatedContentScope animatedContentScope, NavBackStackEntry navBackStackEntry, Composer composer, Integer num) {
        invoke(animatedContentScope, navBackStackEntry, composer, num.intValue());
        return Unit.INSTANCE;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final Unit invoke$lambda$1$lambda$0(NavHostController navHostController) {
        navHostController.navigateUp();
        return Unit.INSTANCE;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final Unit invoke$lambda$4$lambda$3(NavHostController navHostController, String stopId) {
        Intrinsics.checkNotNullParameter(stopId, "stopId");
        navHostController.navigate(new StopDetail(stopId), new Function1() { // from class: com.sistemasolton.itranvias.navigation.NavigationWrapperKt$NavigationWrapper$5$1$2$$ExternalSyntheticLambda2
            @Override // kotlin.jvm.functions.Function1
            public final Object invoke(Object obj) {
                return NavigationWrapperKt$NavigationWrapper$5$1$2.invoke$lambda$4$lambda$3$lambda$2((NavOptionsBuilder) obj);
            }
        });
        return Unit.INSTANCE;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final Unit invoke$lambda$4$lambda$3$lambda$2(NavOptionsBuilder navigate) {
        Intrinsics.checkNotNullParameter(navigate, "$this$navigate");
        navigate.setLaunchSingleTop(true);
        return Unit.INSTANCE;
    }

    public final void invoke(AnimatedContentScope composable, NavBackStackEntry navBackStackEntry, Composer composer, int i) {
        Intrinsics.checkNotNullParameter(composable, "$this$composable");
        Intrinsics.checkNotNullParameter(navBackStackEntry, "navBackStackEntry");
        if (ComposerKt.isTraceInProgress()) {
            ComposerKt.traceEventStart(-1197400341, i, -1, "com.sistemasolton.itranvias.navigation.NavigationWrapper.<anonymous>.<anonymous>.<anonymous> (NavigationWrapper.kt:44)");
        }
        String lineId = ((LineDetail) NavBackStackEntryKt.toRoute(navBackStackEntry, Reflection.getOrCreateKotlinClass(LineDetail.class))).getLineId();
        composer.startReplaceGroup(5004770);
        boolean zChangedInstance = composer.changedInstance(this.$mainNavController);
        final NavHostController navHostController = this.$mainNavController;
        Object objRememberedValue = composer.rememberedValue();
        if (zChangedInstance || objRememberedValue == Composer.INSTANCE.getEmpty()) {
            objRememberedValue = new Function0() { // from class: com.sistemasolton.itranvias.navigation.NavigationWrapperKt$NavigationWrapper$5$1$2$$ExternalSyntheticLambda0
                @Override // kotlin.jvm.functions.Function0
                public final Object invoke() {
                    return NavigationWrapperKt$NavigationWrapper$5$1$2.invoke$lambda$1$lambda$0(navHostController);
                }
            };
            composer.updateRememberedValue(objRememberedValue);
        }
        Function0 function0 = (Function0) objRememberedValue;
        composer.endReplaceGroup();
        composer.startReplaceGroup(5004770);
        boolean zChangedInstance2 = composer.changedInstance(this.$mainNavController);
        final NavHostController navHostController2 = this.$mainNavController;
        Object objRememberedValue2 = composer.rememberedValue();
        if (zChangedInstance2 || objRememberedValue2 == Composer.INSTANCE.getEmpty()) {
            objRememberedValue2 = new Function1() { // from class: com.sistemasolton.itranvias.navigation.NavigationWrapperKt$NavigationWrapper$5$1$2$$ExternalSyntheticLambda1
                @Override // kotlin.jvm.functions.Function1
                public final Object invoke(Object obj) {
                    return NavigationWrapperKt$NavigationWrapper$5$1$2.invoke$lambda$4$lambda$3(navHostController2, (String) obj);
                }
            };
            composer.updateRememberedValue(objRememberedValue2);
        }
        composer.endReplaceGroup();
        LineDetailScreenKt.LineDetailScreen(lineId, function0, (Function1) objRememberedValue2, null, composer, 0, 8);
        if (ComposerKt.isTraceInProgress()) {
            ComposerKt.traceEventEnd();
        }
    }
}