package com.sistemasolton.itranvias.home.presentation.freetransfer;

import androidx.compose.foundation.BackgroundKt;
import androidx.compose.foundation.BorderKt;
import androidx.compose.foundation.ClickableKt;
import androidx.compose.foundation.layout.Arrangement;
import androidx.compose.foundation.layout.BoxKt;
import androidx.compose.foundation.layout.BoxScopeInstance;
import androidx.compose.foundation.layout.ColumnKt;
import androidx.compose.foundation.layout.ColumnScopeInstance;
import androidx.compose.foundation.layout.PaddingKt;
import androidx.compose.foundation.layout.PaddingValues;
import androidx.compose.foundation.layout.SizeKt;
import androidx.compose.foundation.layout.SpacerKt;
import androidx.compose.foundation.lazy.LazyDslKt;
import androidx.compose.foundation.lazy.LazyItemScope;
import androidx.compose.foundation.lazy.LazyListScope;
import androidx.compose.foundation.shape.RoundedCornerShape;
import androidx.compose.foundation.shape.RoundedCornerShapeKt;
import androidx.compose.material3.AppBarKt;
import androidx.compose.material3.ButtonKt;
import androidx.compose.material3.IconButtonKt;
import androidx.compose.material3.MaterialTheme;
import androidx.compose.material3.ScaffoldKt;
import androidx.compose.material3.TextKt;
import androidx.compose.material3.TopAppBarDefaults;
import androidx.compose.runtime.Applier;
import androidx.compose.runtime.ComposablesKt;
import androidx.compose.runtime.Composer;
import androidx.compose.runtime.ComposerKt;
import androidx.compose.runtime.CompositionLocalMap;
import androidx.compose.runtime.MutableState;
import androidx.compose.runtime.RecomposeScopeImplKt;
import androidx.compose.runtime.ScopeUpdateScope;
import androidx.compose.runtime.SnapshotStateKt__SnapshotStateKt;
import androidx.compose.runtime.Updater;
import androidx.compose.runtime.internal.ComposableLambdaKt;
import androidx.compose.ui.Alignment;
import androidx.compose.ui.ComposedModifierKt;
import androidx.compose.ui.Modifier;
import androidx.compose.ui.graphics.Color;
import androidx.compose.ui.layout.MeasurePolicy;
import androidx.compose.ui.node.ComposeUiNode;
import androidx.compose.ui.text.TextLayoutResult;
import androidx.compose.ui.text.TextStyle;
import androidx.compose.ui.text.font.FontFamily;
import androidx.compose.ui.text.font.FontStyle;
import androidx.compose.ui.text.font.FontWeight;
import androidx.compose.ui.text.style.TextAlign;
import androidx.compose.ui.text.style.TextDecoration;
import androidx.compose.ui.unit.Dp;
import androidx.lifecycle.ViewModel;
import androidx.lifecycle.ViewModelStoreOwner;
import androidx.lifecycle.viewmodel.compose.LocalViewModelStoreOwner;
import androidx.profileinstaller.ProfileVerifier;
import com.sistemasolton.itranvias.core.presentation.ConnectionErrorScreenKt;
import com.sistemasolton.itranvias.core.presentation.LoadingScreenKt;
import com.sistemasolton.itranvias.home.data.remote.dto.infodto.ActualizacionDto;
import com.sistemasolton.itranvias.home.data.remote.dto.infodto.DestinoDto;
import com.sistemasolton.itranvias.home.data.remote.dto.infodto.EnlaceSentidoDto;
import com.sistemasolton.itranvias.home.data.remote.dto.infodto.ITranviasDto;
import com.sistemasolton.itranvias.home.data.remote.dto.infodto.InfoDto;
import com.sistemasolton.itranvias.home.data.remote.dto.infodto.LineaDto;
import com.sistemasolton.itranvias.home.data.remote.dto.infodto.OrigenDto;
import com.sistemasolton.itranvias.home.presentation.freetransfer.FreeTranferScreenKt;
import com.sistemasolton.itranvias.home.presentation.freetransfer.TransferResult;
import itranvias.composeapp.generated.resources.Res;
import itranvias.composeapp.generated.resources.String0_commonMainKt;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import kotlin.Metadata;
import kotlin.NoWhenBranchMatchedException;
import kotlin.Pair;
import kotlin.TuplesKt;
import kotlin.Unit;
import kotlin.collections.CollectionsKt;
import kotlin.collections.MapsKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.functions.Function3;
import kotlin.jvm.functions.Function4;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Reflection;
import kotlin.ranges.RangesKt;
import org.jetbrains.compose.resources.StringResourcesKt;
import org.koin.compose.KoinApplicationKt;
import org.koin.viewmodel.CreationExtrasExtKt;
import org.koin.viewmodel.GetViewModelKt;

/* JADX INFO: compiled from: FreeTranferScreen.kt */
/* JADX INFO: loaded from: classes2.dex */
@Metadata(d1 = {"\u0000D\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\u000b\u001a\u001b\u0010\u0000\u001a\u00020\u00012\f\u0010\u0002\u001a\b\u0012\u0004\u0012\u00020\u00010\u0003H\u0007¢\u0006\u0002\u0010\u0004\u001a/\u0010\u0005\u001a\b\u0012\u0004\u0012\u00020\u00070\u00062\b\u0010\b\u001a\u0004\u0018\u00010\t2\b\u0010\n\u001a\u0004\u0018\u00010\t2\b\u0010\u000b\u001a\u0004\u0018\u00010\f¢\u0006\u0002\u0010\r\u001aU\u0010\u000e\u001a\u00020\u00012\u0006\u0010\u000f\u001a\u00020\u00102\u0018\u0010\u0011\u001a\u0014\u0012\u0010\u0012\u000e\u0012\u0004\u0012\u00020\t\u0012\u0004\u0012\u00020\u00100\u00120\u00062\b\u0010\u0013\u001a\u0004\u0018\u00010\t2\u0006\u0010\u0014\u001a\u00020\u00102\u0012\u0010\u0015\u001a\u000e\u0012\u0004\u0012\u00020\t\u0012\u0004\u0012\u00020\u00010\u0016H\u0007¢\u0006\u0002\u0010\u0017¨\u0006\u0018²\u0006\f\u0010\b\u001a\u0004\u0018\u00010\tX\u008a\u008e\u0002²\u0006\f\u0010\n\u001a\u0004\u0018\u00010\tX\u008a\u008e\u0002²\u0006\u0010\u0010\u0019\u001a\b\u0012\u0004\u0012\u00020\u00070\u0006X\u008a\u008e\u0002²\u0006\n\u0010\u001a\u001a\u00020\u001bX\u008a\u008e\u0002"}, d2 = {"FreeTransferScreen", "", "onBackPressed", "Lkotlin/Function0;", "(Lkotlin/jvm/functions/Function0;Landroidx/compose/runtime/Composer;I)V", "calculateTransfer", "", "Lcom/sistemasolton/itranvias/home/presentation/freetransfer/TransferResult;", "selectedOrigen", "", "selectedDestino", "infoDto", "Lcom/sistemasolton/itranvias/home/data/remote/dto/infodto/InfoDto;", "(Ljava/lang/Integer;Ljava/lang/Integer;Lcom/sistemasolton/itranvias/home/data/remote/dto/infodto/InfoDto;)Ljava/util/List;", "SimpleSelector", "label", "", "items", "Lkotlin/Pair;", "selectedItem", "placeholder", "onItemSelected", "Lkotlin/Function1;", "(Ljava/lang/String;Ljava/util/List;Ljava/lang/Integer;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Landroidx/compose/runtime/Composer;I)V", "composeApp_release", "resultados", "expanded", ""}, k = 2, mv = {2, 1, 0}, xi = 48)
public final class FreeTranferScreenKt {
    /* JADX INFO: Access modifiers changed from: private */
    public static final Unit FreeTransferScreen$lambda$10(Function0 function0, int i, Composer composer, int i2) {
        FreeTransferScreen(function0, composer, RecomposeScopeImplKt.updateChangedFlags(i | 1));
        return Unit.INSTANCE;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final Unit SimpleSelector$lambda$28(String str, List list, Integer num, String str2, Function1 function1, int i, Composer composer, int i2) {
        SimpleSelector(str, list, num, str2, function1, composer, RecomposeScopeImplKt.updateChangedFlags(i | 1));
        return Unit.INSTANCE;
    }

    public static final void FreeTransferScreen(final Function0<Unit> onBackPressed, Composer composer, final int i) {
        List listEmptyList;
        Composer composer2;
        ITranviasDto iTranvias;
        ActualizacionDto actualizacion;
        List<LineaDto> lineas;
        Intrinsics.checkNotNullParameter(onBackPressed, "onBackPressed");
        Composer composerStartRestartGroup = composer.startRestartGroup(-1077182756);
        int i2 = (i & 6) == 0 ? (composerStartRestartGroup.changedInstance(onBackPressed) ? 4 : 2) | i : i;
        if ((i2 & 3) != 2 || !composerStartRestartGroup.getSkipping()) {
            if (ComposerKt.isTraceInProgress()) {
                ComposerKt.traceEventStart(-1077182756, i2, -1, "com.sistemasolton.itranvias.home.presentation.freetransfer.FreeTransferScreen (FreeTranferScreen.kt:59)");
            }
            composerStartRestartGroup.startReplaceGroup(-924953623);
            ViewModelStoreOwner current = LocalViewModelStoreOwner.INSTANCE.getCurrent(composerStartRestartGroup, LocalViewModelStoreOwner.$stable);
            if (current == null) {
                throw new IllegalStateException("No ViewModelStoreOwner was provided via LocalViewModelStoreOwner".toString());
            }
            ViewModel viewModelResolveViewModel = GetViewModelKt.resolveViewModel(Reflection.getOrCreateKotlinClass(FreeTransferViewmodel.class), current.getViewModelStore(), null, CreationExtrasExtKt.defaultExtras(current), null, KoinApplicationKt.currentKoinScope(composerStartRestartGroup, 0), null);
            composerStartRestartGroup.endReplaceGroup();
            FreeTransferViewmodel freeTransferViewmodel = (FreeTransferViewmodel) viewModelResolveViewModel;
            FreeTransferState state = freeTransferViewmodel.getState();
            composerStartRestartGroup.startReplaceGroup(1849434622);
            Object objRememberedValue = composerStartRestartGroup.rememberedValue();
            if (objRememberedValue == Composer.INSTANCE.getEmpty()) {
                objRememberedValue = SnapshotStateKt__SnapshotStateKt.mutableStateOf$default(null, null, 2, null);
                composerStartRestartGroup.updateRememberedValue(objRememberedValue);
            }
            MutableState mutableState = (MutableState) objRememberedValue;
            composerStartRestartGroup.endReplaceGroup();
            composerStartRestartGroup.startReplaceGroup(1849434622);
            Object objRememberedValue2 = composerStartRestartGroup.rememberedValue();
            if (objRememberedValue2 == Composer.INSTANCE.getEmpty()) {
                objRememberedValue2 = SnapshotStateKt__SnapshotStateKt.mutableStateOf$default(null, null, 2, null);
                composerStartRestartGroup.updateRememberedValue(objRememberedValue2);
            }
            MutableState mutableState2 = (MutableState) objRememberedValue2;
            composerStartRestartGroup.endReplaceGroup();
            composerStartRestartGroup.startReplaceGroup(1849434622);
            Object objRememberedValue3 = composerStartRestartGroup.rememberedValue();
            if (objRememberedValue3 == Composer.INSTANCE.getEmpty()) {
                objRememberedValue3 = SnapshotStateKt__SnapshotStateKt.mutableStateOf$default(CollectionsKt.emptyList(), null, 2, null);
                composerStartRestartGroup.updateRememberedValue(objRememberedValue3);
            }
            MutableState mutableState3 = (MutableState) objRememberedValue3;
            composerStartRestartGroup.endReplaceGroup();
            InfoDto infoDto = state.getInfoDto();
            if (infoDto == null || (iTranvias = infoDto.getITranvias()) == null || (actualizacion = iTranvias.getActualizacion()) == null || (lineas = actualizacion.getLineas()) == null) {
                listEmptyList = CollectionsKt.emptyList();
            } else {
                List<LineaDto> list = lineas;
                ArrayList arrayList = new ArrayList(CollectionsKt.collectionSizeOrDefault(list, 10));
                for (LineaDto lineaDto : list) {
                    arrayList.add(TuplesKt.to(Integer.valueOf(lineaDto.getId()), lineaDto.getLinComer()));
                }
                listEmptyList = arrayList;
            }
            composer2 = composerStartRestartGroup;
            ScaffoldKt.m2518ScaffoldTvnljyQ(null, ComposableLambdaKt.rememberComposableLambda(-784662376, true, new Function2<Composer, Integer, Unit>() { // from class: com.sistemasolton.itranvias.home.presentation.freetransfer.FreeTranferScreenKt.FreeTransferScreen.1
                @Override // kotlin.jvm.functions.Function2
                public /* bridge */ /* synthetic */ Unit invoke(Composer composer3, Integer num) {
                    invoke(composer3, num.intValue());
                    return Unit.INSTANCE;
                }

                public final void invoke(Composer composer3, int i3) {
                    if ((i3 & 3) == 2 && composer3.getSkipping()) {
                        composer3.skipToGroupEnd();
                        return;
                    }
                    if (ComposerKt.isTraceInProgress()) {
                        ComposerKt.traceEventStart(-784662376, i3, -1, "com.sistemasolton.itranvias.home.presentation.freetransfer.FreeTransferScreen.<anonymous> (FreeTranferScreen.kt:71)");
                    }
                    Function2<Composer, Integer, Unit> function2M7950getLambda$438924196$composeApp_release = ComposableSingletons$FreeTranferScreenKt.INSTANCE.m7950getLambda$438924196$composeApp_release();
                    final Function0<Unit> function0 = onBackPressed;
                    AppBarKt.m1882TopAppBarGHTll3U(function2M7950getLambda$438924196$composeApp_release, null, ComposableLambdaKt.rememberComposableLambda(-446923170, true, new Function2<Composer, Integer, Unit>() { // from class: com.sistemasolton.itranvias.home.presentation.freetransfer.FreeTranferScreenKt.FreeTransferScreen.1.1
                        @Override // kotlin.jvm.functions.Function2
                        public /* bridge */ /* synthetic */ Unit invoke(Composer composer4, Integer num) {
                            invoke(composer4, num.intValue());
                            return Unit.INSTANCE;
                        }

                        public final void invoke(Composer composer4, int i4) {
                            if ((i4 & 3) == 2 && composer4.getSkipping()) {
                                composer4.skipToGroupEnd();
                                return;
                            }
                            if (ComposerKt.isTraceInProgress()) {
                                ComposerKt.traceEventStart(-446923170, i4, -1, "com.sistemasolton.itranvias.home.presentation.freetransfer.FreeTransferScreen.<anonymous>.<anonymous> (FreeTranferScreen.kt:74)");
                            }
                            IconButtonKt.IconButton(function0, null, false, null, null, ComposableSingletons$FreeTranferScreenKt.INSTANCE.m7948getLambda$1093074565$composeApp_release(), composer4, ProfileVerifier.CompilationStatus.RESULT_CODE_ERROR_CANT_WRITE_PROFILE_VERIFICATION_RESULT_CACHE_FILE, 30);
                            if (ComposerKt.isTraceInProgress()) {
                                ComposerKt.traceEventEnd();
                            }
                        }
                    }, composer3, 54), null, 0.0f, null, TopAppBarDefaults.INSTANCE.m2974topAppBarColorszjMxDiM(MaterialTheme.INSTANCE.getColorScheme(composer3, MaterialTheme.$stable).getInversePrimary(), 0L, 0L, 0L, 0L, composer3, TopAppBarDefaults.$stable << 15, 30), null, composer3, 390, 186);
                    if (ComposerKt.isTraceInProgress()) {
                        ComposerKt.traceEventEnd();
                    }
                }
            }, composerStartRestartGroup, 54), null, null, null, 0, 0L, 0L, null, ComposableLambdaKt.rememberComposableLambda(-1921872467, true, new AnonymousClass2(state, freeTransferViewmodel, listEmptyList, mutableState, mutableState3, mutableState2), composerStartRestartGroup, 54), composerStartRestartGroup, 805306416, 509);
            if (ComposerKt.isTraceInProgress()) {
                ComposerKt.traceEventEnd();
            }
        } else {
            composerStartRestartGroup.skipToGroupEnd();
            composer2 = composerStartRestartGroup;
        }
        ScopeUpdateScope scopeUpdateScopeEndRestartGroup = composer2.endRestartGroup();
        if (scopeUpdateScopeEndRestartGroup != null) {
            scopeUpdateScopeEndRestartGroup.updateScope(new Function2() { // from class: com.sistemasolton.itranvias.home.presentation.freetransfer.FreeTranferScreenKt$$ExternalSyntheticLambda3
                @Override // kotlin.jvm.functions.Function2
                public final Object invoke(Object obj, Object obj2) {
                    return FreeTranferScreenKt.FreeTransferScreen$lambda$10(onBackPressed, i, (Composer) obj, ((Integer) obj2).intValue());
                }
            });
        }
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final Integer FreeTransferScreen$lambda$1(MutableState<Integer> mutableState) {
        return mutableState.getValue();
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final Integer FreeTransferScreen$lambda$4(MutableState<Integer> mutableState) {
        return mutableState.getValue();
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final List<TransferResult> FreeTransferScreen$lambda$7(MutableState<List<TransferResult>> mutableState) {
        return mutableState.getValue();
    }

    /* JADX INFO: renamed from: com.sistemasolton.itranvias.home.presentation.freetransfer.FreeTranferScreenKt$FreeTransferScreen$2, reason: invalid class name */
    /* JADX INFO: compiled from: FreeTranferScreen.kt */
    @Metadata(k = 3, mv = {2, 1, 0}, xi = 48)
    static final class AnonymousClass2 implements Function3<PaddingValues, Composer, Integer, Unit> {
        final /* synthetic */ MutableState<List<TransferResult>> $resultados$delegate;
        final /* synthetic */ MutableState<Integer> $selectedDestino$delegate;
        final /* synthetic */ MutableState<Integer> $selectedOrigen$delegate;
        final /* synthetic */ FreeTransferState $state;
        final /* synthetic */ List<Pair<Integer, String>> $todasLineas;
        final /* synthetic */ FreeTransferViewmodel $viewModel;

        AnonymousClass2(FreeTransferState freeTransferState, FreeTransferViewmodel freeTransferViewmodel, List<Pair<Integer, String>> list, MutableState<Integer> mutableState, MutableState<List<TransferResult>> mutableState2, MutableState<Integer> mutableState3) {
            this.$state = freeTransferState;
            this.$viewModel = freeTransferViewmodel;
            this.$todasLineas = list;
            this.$selectedOrigen$delegate = mutableState;
            this.$resultados$delegate = mutableState2;
            this.$selectedDestino$delegate = mutableState3;
        }

        @Override // kotlin.jvm.functions.Function3
        public /* bridge */ /* synthetic */ Unit invoke(PaddingValues paddingValues, Composer composer, Integer num) {
            invoke(paddingValues, composer, num.intValue());
            return Unit.INSTANCE;
        }

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

        /* JADX INFO: Access modifiers changed from: private */
        public static final Unit invoke$lambda$11$lambda$3$lambda$2(MutableState mutableState, MutableState mutableState2, int i) {
            FreeTranferScreenKt.FreeTransferScreen$lambda$2(mutableState, Integer.valueOf(i));
            FreeTranferScreenKt.FreeTransferScreen$lambda$8(mutableState2, CollectionsKt.emptyList());
            return Unit.INSTANCE;
        }

        /* JADX INFO: Access modifiers changed from: private */
        public static final Unit invoke$lambda$11$lambda$6$lambda$5(MutableState mutableState, MutableState mutableState2, int i) {
            FreeTranferScreenKt.FreeTransferScreen$lambda$5(mutableState, Integer.valueOf(i));
            FreeTranferScreenKt.FreeTransferScreen$lambda$8(mutableState2, CollectionsKt.emptyList());
            return Unit.INSTANCE;
        }

        /* JADX INFO: Access modifiers changed from: private */
        public static final Unit invoke$lambda$11$lambda$8$lambda$7(FreeTransferState freeTransferState, MutableState mutableState, MutableState mutableState2, MutableState mutableState3) {
            FreeTranferScreenKt.FreeTransferScreen$lambda$8(mutableState3, FreeTranferScreenKt.calculateTransfer(FreeTranferScreenKt.FreeTransferScreen$lambda$1(mutableState), FreeTranferScreenKt.FreeTransferScreen$lambda$4(mutableState2), freeTransferState.getInfoDto()));
            return Unit.INSTANCE;
        }

        public final void invoke(PaddingValues padding, Composer composer, int i) {
            final MutableState<List<TransferResult>> mutableState;
            final MutableState<Integer> mutableState2;
            final MutableState<Integer> mutableState3;
            LinkedHashMap linkedHashMapEmptyMap;
            String strStringResource;
            ITranviasDto iTranvias;
            ActualizacionDto actualizacion;
            List<LineaDto> lineas;
            Intrinsics.checkNotNullParameter(padding, "padding");
            int i2 = (i & 6) == 0 ? i | (composer.changed(padding) ? 4 : 2) : i;
            if ((i2 & 19) == 18 && composer.getSkipping()) {
                composer.skipToGroupEnd();
                return;
            }
            if (ComposerKt.isTraceInProgress()) {
                ComposerKt.traceEventStart(-1921872467, i2, -1, "com.sistemasolton.itranvias.home.presentation.freetransfer.FreeTransferScreen.<anonymous> (FreeTranferScreen.kt:82)");
            }
            if (this.$state.isLoading()) {
                composer.startReplaceGroup(-83501604);
                LoadingScreenKt.LoadingScreen(composer, 0);
                composer.endReplaceGroup();
            } else if (this.$state.isError()) {
                composer.startReplaceGroup(-83500133);
                composer.startReplaceGroup(5004770);
                boolean zChangedInstance = composer.changedInstance(this.$viewModel);
                final FreeTransferViewmodel freeTransferViewmodel = this.$viewModel;
                Object objRememberedValue = composer.rememberedValue();
                if (zChangedInstance || objRememberedValue == Composer.INSTANCE.getEmpty()) {
                    objRememberedValue = new Function0() { // from class: com.sistemasolton.itranvias.home.presentation.freetransfer.FreeTranferScreenKt$FreeTransferScreen$2$$ExternalSyntheticLambda0
                        @Override // kotlin.jvm.functions.Function0
                        public final Object invoke() {
                            return FreeTranferScreenKt.AnonymousClass2.invoke$lambda$1$lambda$0(freeTransferViewmodel);
                        }
                    };
                    composer.updateRememberedValue(objRememberedValue);
                }
                composer.endReplaceGroup();
                ConnectionErrorScreenKt.ConnectionErrorScreen(null, (Function0) objRememberedValue, composer, 0, 1);
                composer.endReplaceGroup();
            } else if (this.$state.getInfoDto() != null) {
                composer.startReplaceGroup(1706679586);
                float f = 12;
                Modifier modifierM832padding3ABfNKs = PaddingKt.m832padding3ABfNKs(SizeKt.fillMaxSize$default(PaddingKt.padding(Modifier.INSTANCE, padding), 0.0f, 1, null), Dp.m7215constructorimpl(f));
                Alignment.Horizontal centerHorizontally = Alignment.INSTANCE.getCenterHorizontally();
                Arrangement.HorizontalOrVertical horizontalOrVerticalM691spacedBy0680j_4 = Arrangement.INSTANCE.m691spacedBy0680j_4(Dp.m7215constructorimpl(f));
                List<Pair<Integer, String>> list = this.$todasLineas;
                final FreeTransferState freeTransferState = this.$state;
                MutableState<Integer> mutableState4 = this.$selectedOrigen$delegate;
                MutableState<List<TransferResult>> mutableState5 = this.$resultados$delegate;
                MutableState<Integer> mutableState6 = this.$selectedDestino$delegate;
                ComposerKt.sourceInformationMarkerStart(composer, 1341605231, "CC(Column)N(modifier,verticalArrangement,horizontalAlignment,content)87@4443L61,88@4509L134:Column.kt#2w3rfo");
                MeasurePolicy measurePolicyColumnMeasurePolicy = ColumnKt.columnMeasurePolicy(horizontalOrVerticalM691spacedBy0680j_4, centerHorizontally, composer, 54);
                ComposerKt.sourceInformationMarkerStart(composer, -1159599143, "CC(Layout)P(!1,2)80@3267L27,83@3433L360:Layout.kt#80mrfh");
                int iHashCode = Long.hashCode(ComposablesKt.getCurrentCompositeKeyHashCode(composer, 0));
                CompositionLocalMap currentCompositionLocalMap = composer.getCurrentCompositionLocalMap();
                Modifier modifierMaterializeModifier = ComposedModifierKt.materializeModifier(composer, modifierM832padding3ABfNKs);
                Function0<ComposeUiNode> constructor = ComposeUiNode.INSTANCE.getConstructor();
                ComposerKt.sourceInformationMarkerStart(composer, -553112988, "CC(ReusableComposeNode)N(factory,update,content)399@15590L9:Composables.kt#9igjgp");
                if (!(composer.getApplier() instanceof Applier)) {
                    ComposablesKt.invalidApplier();
                }
                composer.startReusableNode();
                if (composer.getInserting()) {
                    composer.createNode(constructor);
                } else {
                    composer.useNode();
                }
                Composer composerM3820constructorimpl = Updater.m3820constructorimpl(composer);
                Updater.m3827setimpl(composerM3820constructorimpl, measurePolicyColumnMeasurePolicy, ComposeUiNode.INSTANCE.getSetMeasurePolicy());
                Updater.m3827setimpl(composerM3820constructorimpl, currentCompositionLocalMap, ComposeUiNode.INSTANCE.getSetResolvedCompositionLocals());
                Function2<ComposeUiNode, Integer, Unit> setCompositeKeyHash = ComposeUiNode.INSTANCE.getSetCompositeKeyHash();
                if (composerM3820constructorimpl.getInserting() || !Intrinsics.areEqual(composerM3820constructorimpl.rememberedValue(), Integer.valueOf(iHashCode))) {
                    composerM3820constructorimpl.updateRememberedValue(Integer.valueOf(iHashCode));
                    composerM3820constructorimpl.apply(Integer.valueOf(iHashCode), setCompositeKeyHash);
                }
                Updater.m3827setimpl(composerM3820constructorimpl, modifierMaterializeModifier, ComposeUiNode.INSTANCE.getSetModifier());
                ComposerKt.sourceInformationMarkerStart(composer, 2093002350, "C89@4557L9:Column.kt#2w3rfo");
                ColumnScopeInstance columnScopeInstance = ColumnScopeInstance.INSTANCE;
                TextKt.m2803Text4IGK_g(StringResourcesKt.stringResource(String0_commonMainKt.getFree_transfer_select_line(Res.string.INSTANCE), composer, 0), (Modifier) null, MaterialTheme.INSTANCE.getColorScheme(composer, MaterialTheme.$stable).getOnSurface(), 0L, (FontStyle) null, (FontWeight) null, (FontFamily) null, 0L, (TextDecoration) null, (TextAlign) null, 0L, 0, false, 0, 0, (Function1<? super TextLayoutResult, Unit>) null, (TextStyle) null, composer, 0, 0, 131066);
                float f2 = 8;
                Composer composer2 = composer;
                SpacerKt.Spacer(SizeKt.m870height3ABfNKs(Modifier.INSTANCE, Dp.m7215constructorimpl(f2)), composer2, 6);
                int i3 = 0;
                String strStringResource2 = StringResourcesKt.stringResource(String0_commonMainKt.getFree_transfer_label_origen(Res.string.INSTANCE), composer2, 0);
                Integer numFreeTransferScreen$lambda$1 = FreeTranferScreenKt.FreeTransferScreen$lambda$1(mutableState4);
                String strStringResource3 = StringResourcesKt.stringResource(String0_commonMainKt.getFree_transfer_select_line(Res.string.INSTANCE), composer2, 0);
                composer2.startReplaceGroup(-1633490746);
                Object objRememberedValue2 = composer.rememberedValue();
                if (objRememberedValue2 == Composer.INSTANCE.getEmpty()) {
                    mutableState = mutableState5;
                    mutableState2 = mutableState4;
                    objRememberedValue2 = new Function1() { // from class: com.sistemasolton.itranvias.home.presentation.freetransfer.FreeTranferScreenKt$FreeTransferScreen$2$$ExternalSyntheticLambda1
                        @Override // kotlin.jvm.functions.Function1
                        public final Object invoke(Object obj) {
                            return FreeTranferScreenKt.AnonymousClass2.invoke$lambda$11$lambda$3$lambda$2(mutableState2, mutableState, ((Integer) obj).intValue());
                        }
                    };
                    composer2.updateRememberedValue(objRememberedValue2);
                } else {
                    mutableState = mutableState5;
                    mutableState2 = mutableState4;
                }
                composer.endReplaceGroup();
                FreeTranferScreenKt.SimpleSelector(strStringResource2, list, numFreeTransferScreen$lambda$1, strStringResource3, (Function1) objRememberedValue2, composer, 24576);
                String strStringResource4 = StringResourcesKt.stringResource(String0_commonMainKt.getFree_transfer_label_destino(Res.string.INSTANCE), composer2, 0);
                ArrayList arrayList = new ArrayList();
                for (Object obj : list) {
                    int iIntValue = ((Number) ((Pair) obj).getFirst()).intValue();
                    Integer numFreeTransferScreen$lambda$12 = FreeTranferScreenKt.FreeTransferScreen$lambda$1(mutableState2);
                    if (numFreeTransferScreen$lambda$12 == null || iIntValue != numFreeTransferScreen$lambda$12.intValue()) {
                        arrayList.add(obj);
                    }
                }
                ArrayList arrayList2 = arrayList;
                Integer numFreeTransferScreen$lambda$4 = FreeTranferScreenKt.FreeTransferScreen$lambda$4(mutableState6);
                String strStringResource5 = StringResourcesKt.stringResource(String0_commonMainKt.getFree_transfer_select_line(Res.string.INSTANCE), composer2, 0);
                composer2.startReplaceGroup(-1633490746);
                Object objRememberedValue3 = composer.rememberedValue();
                if (objRememberedValue3 == Composer.INSTANCE.getEmpty()) {
                    mutableState3 = mutableState6;
                    objRememberedValue3 = new Function1() { // from class: com.sistemasolton.itranvias.home.presentation.freetransfer.FreeTranferScreenKt$FreeTransferScreen$2$$ExternalSyntheticLambda2
                        @Override // kotlin.jvm.functions.Function1
                        public final Object invoke(Object obj2) {
                            return FreeTranferScreenKt.AnonymousClass2.invoke$lambda$11$lambda$6$lambda$5(mutableState3, mutableState, ((Integer) obj2).intValue());
                        }
                    };
                    composer2.updateRememberedValue(objRememberedValue3);
                } else {
                    mutableState3 = mutableState6;
                }
                composer.endReplaceGroup();
                FreeTranferScreenKt.SimpleSelector(strStringResource4, arrayList2, numFreeTransferScreen$lambda$4, strStringResource5, (Function1) objRememberedValue3, composer, 24576);
                SpacerKt.Spacer(SizeKt.m870height3ABfNKs(Modifier.INSTANCE, Dp.m7215constructorimpl(24)), composer2, 6);
                boolean z = (FreeTranferScreenKt.FreeTransferScreen$lambda$1(mutableState2) == null || FreeTranferScreenKt.FreeTransferScreen$lambda$4(mutableState3) == null) ? false : true;
                Modifier modifierFillMaxWidth$default = SizeKt.fillMaxWidth$default(Modifier.INSTANCE, 0.0f, 1, null);
                RoundedCornerShape roundedCornerShapeM1197RoundedCornerShape0680j_4 = RoundedCornerShapeKt.m1197RoundedCornerShape0680j_4(Dp.m7215constructorimpl(f2));
                composer2.startReplaceGroup(-1224400529);
                boolean zChangedInstance2 = composer2.changedInstance(freeTransferState);
                Object objRememberedValue4 = composer.rememberedValue();
                if (zChangedInstance2 || objRememberedValue4 == Composer.INSTANCE.getEmpty()) {
                    objRememberedValue4 = new Function0() { // from class: com.sistemasolton.itranvias.home.presentation.freetransfer.FreeTranferScreenKt$FreeTransferScreen$2$$ExternalSyntheticLambda3
                        @Override // kotlin.jvm.functions.Function0
                        public final Object invoke() {
                            return FreeTranferScreenKt.AnonymousClass2.invoke$lambda$11$lambda$8$lambda$7(freeTransferState, mutableState2, mutableState3, mutableState);
                        }
                    };
                    composer2.updateRememberedValue(objRememberedValue4);
                }
                composer.endReplaceGroup();
                MutableState<List<TransferResult>> mutableState7 = mutableState;
                ButtonKt.Button((Function0) objRememberedValue4, modifierFillMaxWidth$default, z, roundedCornerShapeM1197RoundedCornerShape0680j_4, null, null, null, null, null, ComposableSingletons$FreeTranferScreenKt.INSTANCE.m7949getLambda$1268417197$composeApp_release(), composer, 805306416, 496);
                InfoDto infoDto = freeTransferState.getInfoDto();
                if (infoDto == null || (iTranvias = infoDto.getITranvias()) == null || (actualizacion = iTranvias.getActualizacion()) == null || (lineas = actualizacion.getLineas()) == null) {
                    linkedHashMapEmptyMap = MapsKt.emptyMap();
                } else {
                    List<LineaDto> list2 = lineas;
                    linkedHashMapEmptyMap = new LinkedHashMap(RangesKt.coerceAtLeast(MapsKt.mapCapacity(CollectionsKt.collectionSizeOrDefault(list2, 10)), 16));
                    for (LineaDto lineaDto : list2) {
                        Pair pair = TuplesKt.to(Integer.valueOf(lineaDto.getId()), lineaDto.getLinComer());
                        linkedHashMapEmptyMap.put(pair.getFirst(), pair.getSecond());
                    }
                }
                Map map = linkedHashMapEmptyMap;
                composer2.startReplaceGroup(-1581603593);
                for (TransferResult transferResult : FreeTranferScreenKt.FreeTransferScreen$lambda$7(mutableState7)) {
                    if (transferResult instanceof TransferResult.NoFree) {
                        composer2.startReplaceGroup(-1314078594);
                        TransferResult.NoFree noFree = (TransferResult.NoFree) transferResult;
                        String strValueOf = (String) map.get(Integer.valueOf(noFree.getOrigen()));
                        if (strValueOf == null) {
                            strValueOf = String.valueOf(noFree.getOrigen());
                        }
                        String strValueOf2 = (String) map.get(Integer.valueOf(noFree.getDestino()));
                        if (strValueOf2 == null) {
                            strValueOf2 = String.valueOf(noFree.getDestino());
                        }
                        strStringResource = StringResourcesKt.stringResource(String0_commonMainKt.getFree_transfer_no_free(Res.string.INSTANCE), new Object[]{strValueOf, strValueOf2}, composer2, i3);
                        composer.endReplaceGroup();
                    } else if (transferResult instanceof TransferResult.Free) {
                        composer2.startReplaceGroup(-1313486463);
                        TransferResult.Free free = (TransferResult.Free) transferResult;
                        String strValueOf3 = (String) map.get(Integer.valueOf(free.getOrigen()));
                        if (strValueOf3 == null) {
                            strValueOf3 = String.valueOf(free.getOrigen());
                        }
                        String strValueOf4 = (String) map.get(Integer.valueOf(free.getDestino()));
                        if (strValueOf4 == null) {
                            strValueOf4 = String.valueOf(free.getDestino());
                        }
                        strStringResource = StringResourcesKt.stringResource(String0_commonMainKt.getFree_transfer_free(Res.string.INSTANCE), new Object[]{strValueOf3, strValueOf4}, composer2, i3);
                        composer.endReplaceGroup();
                    } else {
                        if (!(transferResult instanceof TransferResult.AllFree)) {
                            composer.startReplaceGroup(96156476);
                            composer.endReplaceGroup();
                            throw new NoWhenBranchMatchedException();
                        }
                        composer2.startReplaceGroup(-1312894115);
                        TransferResult.AllFree allFree = (TransferResult.AllFree) transferResult;
                        String strValueOf5 = (String) map.get(Integer.valueOf(allFree.getOrigen()));
                        if (strValueOf5 == null) {
                            strValueOf5 = String.valueOf(allFree.getOrigen());
                        }
                        String strValueOf6 = (String) map.get(Integer.valueOf(allFree.getDestino()));
                        if (strValueOf6 == null) {
                            strValueOf6 = String.valueOf(allFree.getDestino());
                        }
                        strStringResource = StringResourcesKt.stringResource(String0_commonMainKt.getFree_transfer_all_free(Res.string.INSTANCE), new Object[]{strValueOf5, strValueOf6}, composer2, i3);
                        composer.endReplaceGroup();
                    }
                    TextKt.m2803Text4IGK_g(strStringResource, (Modifier) null, 0L, 0L, (FontStyle) null, FontWeight.INSTANCE.getBold(), (FontFamily) null, 0L, (TextDecoration) null, (TextAlign) null, 0L, 0, false, 0, 0, (Function1<? super TextLayoutResult, Unit>) null, (TextStyle) null, composer, ProfileVerifier.CompilationStatus.RESULT_CODE_ERROR_CANT_WRITE_PROFILE_VERIFICATION_RESULT_CACHE_FILE, 0, 131038);
                    composer2 = composer;
                    i3 = i3;
                    map = map;
                }
                composer.endReplaceGroup();
                ComposerKt.sourceInformationMarkerEnd(composer);
                composer.endNode();
                ComposerKt.sourceInformationMarkerEnd(composer);
                ComposerKt.sourceInformationMarkerEnd(composer);
                ComposerKt.sourceInformationMarkerEnd(composer);
                composer.endReplaceGroup();
            } else {
                composer.startReplaceGroup(1710859285);
                composer.endReplaceGroup();
            }
            if (ComposerKt.isTraceInProgress()) {
                ComposerKt.traceEventEnd();
            }
        }
    }

    public static final List<TransferResult> calculateTransfer(Integer num, Integer num2, InfoDto infoDto) {
        Object next;
        Object next2;
        if (num == null || num2 == null || infoDto == null) {
            return CollectionsKt.emptyList();
        }
        Iterator<T> it = infoDto.getITranvias().getActualizacion().getEnlaces().getOrigen().iterator();
        while (true) {
            if (!it.hasNext()) {
                next = null;
                break;
            }
            next = it.next();
            int linea = ((OrigenDto) next).getLinea();
            if (num != null && linea == num.intValue()) {
                break;
            }
        }
        OrigenDto origenDto = (OrigenDto) next;
        ArrayList arrayList = new ArrayList();
        if (origenDto != null) {
            for (EnlaceSentidoDto enlaceSentidoDto : origenDto.getSentidos()) {
                Iterator<T> it2 = enlaceSentidoDto.getDestinos().iterator();
                while (true) {
                    if (!it2.hasNext()) {
                        next2 = null;
                        break;
                    }
                    next2 = it2.next();
                    int linea2 = ((DestinoDto) next2).getLinea();
                    if (num2 != null && linea2 == num2.intValue()) {
                        break;
                    }
                }
                DestinoDto destinoDto = (DestinoDto) next2;
                if (destinoDto != null) {
                    if (destinoDto.getSentidos().containsAll(CollectionsKt.listOf((Object[]) new Integer[]{0, 1}))) {
                        arrayList.add(new TransferResult.NoFree(num.intValue(), num2.intValue(), enlaceSentidoDto.getSentido()));
                    } else {
                        List listListOf = CollectionsKt.listOf((Object[]) new Integer[]{0, 1});
                        ArrayList arrayList2 = new ArrayList();
                        for (Object obj : listListOf) {
                            if (!destinoDto.getSentidos().contains(Integer.valueOf(((Number) obj).intValue()))) {
                                arrayList2.add(obj);
                            }
                        }
                        ArrayList arrayList3 = arrayList2;
                        if (!arrayList3.isEmpty()) {
                            arrayList.add(new TransferResult.Free(num.intValue(), num2.intValue(), arrayList3));
                        }
                    }
                }
            }
        }
        if (arrayList.isEmpty()) {
            arrayList.add(new TransferResult.AllFree(num.intValue(), num2.intValue()));
        }
        return arrayList;
    }

    public static final void SimpleSelector(final String label, final List<Pair<Integer, String>> items, final Integer num, final String placeholder, final Function1<? super Integer, Unit> onItemSelected, Composer composer, final int i) {
        int i2;
        Object next;
        String str;
        final MutableState mutableState;
        Composer composer2;
        Intrinsics.checkNotNullParameter(label, "label");
        Intrinsics.checkNotNullParameter(items, "items");
        Intrinsics.checkNotNullParameter(placeholder, "placeholder");
        Intrinsics.checkNotNullParameter(onItemSelected, "onItemSelected");
        Composer composerStartRestartGroup = composer.startRestartGroup(-1467208462);
        if ((i & 6) == 0) {
            i2 = (composerStartRestartGroup.changed(label) ? 4 : 2) | i;
        } else {
            i2 = i;
        }
        if ((i & 48) == 0) {
            i2 |= composerStartRestartGroup.changedInstance(items) ? 32 : 16;
        }
        if ((i & 384) == 0) {
            i2 |= composerStartRestartGroup.changed(num) ? 256 : 128;
        }
        if ((i & 3072) == 0) {
            i2 |= composerStartRestartGroup.changed(placeholder) ? 2048 : 1024;
        }
        if ((i & 24576) == 0) {
            i2 |= composerStartRestartGroup.changedInstance(onItemSelected) ? 16384 : 8192;
        }
        int i3 = i2;
        if ((i3 & 9363) != 9362 || !composerStartRestartGroup.getSkipping()) {
            if (ComposerKt.isTraceInProgress()) {
                ComposerKt.traceEventStart(-1467208462, i3, -1, "com.sistemasolton.itranvias.home.presentation.freetransfer.SimpleSelector (FreeTranferScreen.kt:225)");
            }
            composerStartRestartGroup.startReplaceGroup(1849434622);
            Object objRememberedValue = composerStartRestartGroup.rememberedValue();
            if (objRememberedValue == Composer.INSTANCE.getEmpty()) {
                objRememberedValue = SnapshotStateKt__SnapshotStateKt.mutableStateOf$default(false, null, 2, null);
                composerStartRestartGroup.updateRememberedValue(objRememberedValue);
            }
            MutableState mutableState2 = (MutableState) objRememberedValue;
            composerStartRestartGroup.endReplaceGroup();
            Iterator<T> it = items.iterator();
            while (true) {
                if (!it.hasNext()) {
                    next = null;
                    break;
                }
                next = it.next();
                int iIntValue = ((Number) ((Pair) next).getFirst()).intValue();
                if (num != null && iIntValue == num.intValue()) {
                    break;
                }
            }
            Pair pair = (Pair) next;
            if (pair == null || (str = (String) pair.getSecond()) == null) {
                str = "";
            }
            String str2 = str;
            Modifier modifierFillMaxWidth$default = SizeKt.fillMaxWidth$default(Modifier.INSTANCE, 0.0f, 1, null);
            ComposerKt.sourceInformationMarkerStart(composerStartRestartGroup, 1341605231, "CC(Column)N(modifier,verticalArrangement,horizontalAlignment,content)87@4443L61,88@4509L134:Column.kt#2w3rfo");
            MeasurePolicy measurePolicyColumnMeasurePolicy = ColumnKt.columnMeasurePolicy(Arrangement.INSTANCE.getTop(), Alignment.INSTANCE.getStart(), composerStartRestartGroup, 0);
            ComposerKt.sourceInformationMarkerStart(composerStartRestartGroup, -1159599143, "CC(Layout)P(!1,2)80@3267L27,83@3433L360:Layout.kt#80mrfh");
            int iHashCode = Long.hashCode(ComposablesKt.getCurrentCompositeKeyHashCode(composerStartRestartGroup, 0));
            CompositionLocalMap currentCompositionLocalMap = composerStartRestartGroup.getCurrentCompositionLocalMap();
            Modifier modifierMaterializeModifier = ComposedModifierKt.materializeModifier(composerStartRestartGroup, modifierFillMaxWidth$default);
            Function0<ComposeUiNode> constructor = ComposeUiNode.INSTANCE.getConstructor();
            ComposerKt.sourceInformationMarkerStart(composerStartRestartGroup, -553112988, "CC(ReusableComposeNode)N(factory,update,content)399@15590L9:Composables.kt#9igjgp");
            if (!(composerStartRestartGroup.getApplier() instanceof Applier)) {
                ComposablesKt.invalidApplier();
            }
            composerStartRestartGroup.startReusableNode();
            if (composerStartRestartGroup.getInserting()) {
                composerStartRestartGroup.createNode(constructor);
            } else {
                composerStartRestartGroup.useNode();
            }
            Composer composerM3820constructorimpl = Updater.m3820constructorimpl(composerStartRestartGroup);
            Updater.m3827setimpl(composerM3820constructorimpl, measurePolicyColumnMeasurePolicy, ComposeUiNode.INSTANCE.getSetMeasurePolicy());
            Updater.m3827setimpl(composerM3820constructorimpl, currentCompositionLocalMap, ComposeUiNode.INSTANCE.getSetResolvedCompositionLocals());
            Function2<ComposeUiNode, Integer, Unit> setCompositeKeyHash = ComposeUiNode.INSTANCE.getSetCompositeKeyHash();
            if (composerM3820constructorimpl.getInserting() || !Intrinsics.areEqual(composerM3820constructorimpl.rememberedValue(), Integer.valueOf(iHashCode))) {
                composerM3820constructorimpl.updateRememberedValue(Integer.valueOf(iHashCode));
                composerM3820constructorimpl.apply(Integer.valueOf(iHashCode), setCompositeKeyHash);
            }
            Updater.m3827setimpl(composerM3820constructorimpl, modifierMaterializeModifier, ComposeUiNode.INSTANCE.getSetModifier());
            ComposerKt.sourceInformationMarkerStart(composerStartRestartGroup, 2093002350, "C89@4557L9:Column.kt#2w3rfo");
            ColumnScopeInstance columnScopeInstance = ColumnScopeInstance.INSTANCE;
            TextKt.m2803Text4IGK_g(label, PaddingKt.m836paddingqDBjuR0$default(Modifier.INSTANCE, Dp.m7215constructorimpl(3), 0.0f, 0.0f, Dp.m7215constructorimpl(2), 6, null), MaterialTheme.INSTANCE.getColorScheme(composerStartRestartGroup, MaterialTheme.$stable).getOnSurface(), 0L, (FontStyle) null, FontWeight.INSTANCE.getMedium(), (FontFamily) null, 0L, (TextDecoration) null, (TextAlign) null, 0L, 0, false, 0, 0, (Function1<? super TextLayoutResult, Unit>) null, (TextStyle) null, composerStartRestartGroup, (i3 & 14) | 196656, 0, 131032);
            float f = 4;
            Modifier modifierM269borderxT4_qwU = BorderKt.m269borderxT4_qwU(BackgroundKt.m256backgroundbw27NRU(SizeKt.fillMaxWidth$default(Modifier.INSTANCE, 0.0f, 1, null), MaterialTheme.INSTANCE.getColorScheme(composerStartRestartGroup, MaterialTheme.$stable).getTertiary(), RoundedCornerShapeKt.m1197RoundedCornerShape0680j_4(Dp.m7215constructorimpl(f))), Dp.m7215constructorimpl(1), Color.INSTANCE.m4533getLightGray0d7_KjU(), RoundedCornerShapeKt.m1197RoundedCornerShape0680j_4(Dp.m7215constructorimpl(f)));
            composerStartRestartGroup.startReplaceGroup(5004770);
            Object objRememberedValue2 = composerStartRestartGroup.rememberedValue();
            if (objRememberedValue2 == Composer.INSTANCE.getEmpty()) {
                mutableState = mutableState2;
                objRememberedValue2 = new Function0() { // from class: com.sistemasolton.itranvias.home.presentation.freetransfer.FreeTranferScreenKt$$ExternalSyntheticLambda0
                    @Override // kotlin.jvm.functions.Function0
                    public final Object invoke() {
                        return FreeTranferScreenKt.SimpleSelector$lambda$27$lambda$20$lambda$19(mutableState);
                    }
                };
                composerStartRestartGroup.updateRememberedValue(objRememberedValue2);
            } else {
                mutableState = mutableState2;
            }
            composerStartRestartGroup.endReplaceGroup();
            Modifier modifierM298clickableoSLSa3U$default = ClickableKt.m298clickableoSLSa3U$default(modifierM269borderxT4_qwU, false, null, null, null, (Function0) objRememberedValue2, 15, null);
            ComposerKt.sourceInformationMarkerStart(composerStartRestartGroup, 1341605231, "CC(Column)N(modifier,verticalArrangement,horizontalAlignment,content)87@4443L61,88@4509L134:Column.kt#2w3rfo");
            MeasurePolicy measurePolicyColumnMeasurePolicy2 = ColumnKt.columnMeasurePolicy(Arrangement.INSTANCE.getTop(), Alignment.INSTANCE.getStart(), composerStartRestartGroup, 0);
            ComposerKt.sourceInformationMarkerStart(composerStartRestartGroup, -1159599143, "CC(Layout)P(!1,2)80@3267L27,83@3433L360:Layout.kt#80mrfh");
            int iHashCode2 = Long.hashCode(ComposablesKt.getCurrentCompositeKeyHashCode(composerStartRestartGroup, 0));
            CompositionLocalMap currentCompositionLocalMap2 = composerStartRestartGroup.getCurrentCompositionLocalMap();
            Modifier modifierMaterializeModifier2 = ComposedModifierKt.materializeModifier(composerStartRestartGroup, modifierM298clickableoSLSa3U$default);
            Function0<ComposeUiNode> constructor2 = ComposeUiNode.INSTANCE.getConstructor();
            ComposerKt.sourceInformationMarkerStart(composerStartRestartGroup, -553112988, "CC(ReusableComposeNode)N(factory,update,content)399@15590L9:Composables.kt#9igjgp");
            if (!(composerStartRestartGroup.getApplier() instanceof Applier)) {
                ComposablesKt.invalidApplier();
            }
            composerStartRestartGroup.startReusableNode();
            if (composerStartRestartGroup.getInserting()) {
                composerStartRestartGroup.createNode(constructor2);
            } else {
                composerStartRestartGroup.useNode();
            }
            Composer composerM3820constructorimpl2 = Updater.m3820constructorimpl(composerStartRestartGroup);
            Updater.m3827setimpl(composerM3820constructorimpl2, measurePolicyColumnMeasurePolicy2, ComposeUiNode.INSTANCE.getSetMeasurePolicy());
            Updater.m3827setimpl(composerM3820constructorimpl2, currentCompositionLocalMap2, ComposeUiNode.INSTANCE.getSetResolvedCompositionLocals());
            Function2<ComposeUiNode, Integer, Unit> setCompositeKeyHash2 = ComposeUiNode.INSTANCE.getSetCompositeKeyHash();
            if (composerM3820constructorimpl2.getInserting() || !Intrinsics.areEqual(composerM3820constructorimpl2.rememberedValue(), Integer.valueOf(iHashCode2))) {
                composerM3820constructorimpl2.updateRememberedValue(Integer.valueOf(iHashCode2));
                composerM3820constructorimpl2.apply(Integer.valueOf(iHashCode2), setCompositeKeyHash2);
            }
            Updater.m3827setimpl(composerM3820constructorimpl2, modifierMaterializeModifier2, ComposeUiNode.INSTANCE.getSetModifier());
            ComposerKt.sourceInformationMarkerStart(composerStartRestartGroup, 2093002350, "C89@4557L9:Column.kt#2w3rfo");
            ColumnScopeInstance columnScopeInstance2 = ColumnScopeInstance.INSTANCE;
            final MutableState mutableState3 = mutableState;
            TextKt.m2803Text4IGK_g(str2.length() > 0 ? str2 : placeholder, PaddingKt.m832padding3ABfNKs(Modifier.INSTANCE, Dp.m7215constructorimpl(12)), MaterialTheme.INSTANCE.getColorScheme(composerStartRestartGroup, MaterialTheme.$stable).getOnSurface(), 0L, (FontStyle) null, (FontWeight) null, (FontFamily) null, 0L, (TextDecoration) null, (TextAlign) null, 0L, 0, false, 0, 0, (Function1<? super TextLayoutResult, Unit>) null, (TextStyle) null, composerStartRestartGroup, 48, 0, 131064);
            composer2 = composerStartRestartGroup;
            composer2.startReplaceGroup(-1545453766);
            if (SimpleSelector$lambda$16(mutableState3)) {
                Modifier modifierM872heightInVpY3zN4$default = SizeKt.m872heightInVpY3zN4$default(SizeKt.fillMaxWidth$default(Modifier.INSTANCE, 0.0f, 1, null), 0.0f, Dp.m7215constructorimpl(ComposerKt.invocationKey), 1, null);
                composer2.startReplaceGroup(-1746271574);
                boolean zChangedInstance = composer2.changedInstance(items) | ((i3 & 57344) == 16384);
                Object objRememberedValue3 = composer2.rememberedValue();
                if (zChangedInstance || objRememberedValue3 == Composer.INSTANCE.getEmpty()) {
                    objRememberedValue3 = new Function1() { // from class: com.sistemasolton.itranvias.home.presentation.freetransfer.FreeTranferScreenKt$$ExternalSyntheticLambda1
                        @Override // kotlin.jvm.functions.Function1
                        public final Object invoke(Object obj) {
                            return FreeTranferScreenKt.SimpleSelector$lambda$27$lambda$26$lambda$25$lambda$24(items, onItemSelected, mutableState3, (LazyListScope) obj);
                        }
                    };
                    composer2.updateRememberedValue(objRememberedValue3);
                }
                composer2.endReplaceGroup();
                LazyDslKt.LazyColumn(modifierM872heightInVpY3zN4$default, null, null, false, null, null, null, false, null, (Function1) objRememberedValue3, composer2, 6, 510);
            }
            composer2.endReplaceGroup();
            ComposerKt.sourceInformationMarkerEnd(composer2);
            composer2.endNode();
            ComposerKt.sourceInformationMarkerEnd(composer2);
            ComposerKt.sourceInformationMarkerEnd(composer2);
            ComposerKt.sourceInformationMarkerEnd(composer2);
            ComposerKt.sourceInformationMarkerEnd(composer2);
            composer2.endNode();
            ComposerKt.sourceInformationMarkerEnd(composer2);
            ComposerKt.sourceInformationMarkerEnd(composer2);
            ComposerKt.sourceInformationMarkerEnd(composer2);
            if (ComposerKt.isTraceInProgress()) {
                ComposerKt.traceEventEnd();
            }
        } else {
            composerStartRestartGroup.skipToGroupEnd();
            composer2 = composerStartRestartGroup;
        }
        ScopeUpdateScope scopeUpdateScopeEndRestartGroup = composer2.endRestartGroup();
        if (scopeUpdateScopeEndRestartGroup != null) {
            scopeUpdateScopeEndRestartGroup.updateScope(new Function2() { // from class: com.sistemasolton.itranvias.home.presentation.freetransfer.FreeTranferScreenKt$$ExternalSyntheticLambda2
                @Override // kotlin.jvm.functions.Function2
                public final Object invoke(Object obj, Object obj2) {
                    return FreeTranferScreenKt.SimpleSelector$lambda$28(label, items, num, placeholder, onItemSelected, i, (Composer) obj, ((Integer) obj2).intValue());
                }
            });
        }
    }

    private static final boolean SimpleSelector$lambda$16(MutableState<Boolean> mutableState) {
        return mutableState.getValue().booleanValue();
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void SimpleSelector$lambda$17(MutableState<Boolean> mutableState, boolean z) {
        mutableState.setValue(Boolean.valueOf(z));
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final Unit SimpleSelector$lambda$27$lambda$20$lambda$19(MutableState mutableState) {
        SimpleSelector$lambda$17(mutableState, !SimpleSelector$lambda$16(mutableState));
        return Unit.INSTANCE;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void FreeTransferScreen$lambda$2(MutableState<Integer> mutableState, Integer num) {
        mutableState.setValue(num);
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void FreeTransferScreen$lambda$5(MutableState<Integer> mutableState, Integer num) {
        mutableState.setValue(num);
    }

    /* JADX INFO: Access modifiers changed from: private */
    /* JADX WARN: Multi-variable type inference failed */
    public static final void FreeTransferScreen$lambda$8(MutableState<List<TransferResult>> mutableState, List<? extends TransferResult> list) {
        mutableState.setValue(list);
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final Unit SimpleSelector$lambda$27$lambda$26$lambda$25$lambda$24(final List list, final Function1 function1, final MutableState mutableState, LazyListScope LazyColumn) {
        Intrinsics.checkNotNullParameter(LazyColumn, "$this$LazyColumn");
        final FreeTranferScreenKt$SimpleSelector$lambda$27$lambda$26$lambda$25$lambda$24$$inlined$items$default$1 freeTranferScreenKt$SimpleSelector$lambda$27$lambda$26$lambda$25$lambda$24$$inlined$items$default$1 = new Function1() { // from class: com.sistemasolton.itranvias.home.presentation.freetransfer.FreeTranferScreenKt$SimpleSelector$lambda$27$lambda$26$lambda$25$lambda$24$$inlined$items$default$1
            @Override // kotlin.jvm.functions.Function1
            public final Void invoke(Pair<? extends Integer, ? extends String> pair) {
                return null;
            }

            @Override // kotlin.jvm.functions.Function1
            public /* bridge */ /* synthetic */ Object invoke(Object obj) {
                return invoke((Pair<? extends Integer, ? extends String>) obj);
            }
        };
        LazyColumn.items(list.size(), null, new Function1<Integer, Object>() { // from class: com.sistemasolton.itranvias.home.presentation.freetransfer.FreeTranferScreenKt$SimpleSelector$lambda$27$lambda$26$lambda$25$lambda$24$$inlined$items$default$3
            @Override // kotlin.jvm.functions.Function1
            public /* bridge */ /* synthetic */ Object invoke(Integer num) {
                return invoke(num.intValue());
            }

            public final Object invoke(int i) {
                return freeTranferScreenKt$SimpleSelector$lambda$27$lambda$26$lambda$25$lambda$24$$inlined$items$default$1.invoke(list.get(i));
            }
        }, ComposableLambdaKt.composableLambdaInstance(802480018, true, new Function4<LazyItemScope, Integer, Composer, Integer, Unit>() { // from class: com.sistemasolton.itranvias.home.presentation.freetransfer.FreeTranferScreenKt$SimpleSelector$lambda$27$lambda$26$lambda$25$lambda$24$$inlined$items$default$4
            @Override // kotlin.jvm.functions.Function4
            public /* bridge */ /* synthetic */ Unit invoke(LazyItemScope lazyItemScope, Integer num, Composer composer, Integer num2) {
                invoke(lazyItemScope, num.intValue(), composer, num2.intValue());
                return Unit.INSTANCE;
            }

            public final void invoke(LazyItemScope lazyItemScope, int i, Composer composer, int i2) {
                int i3;
                ComposerKt.sourceInformation(composer, "CN(it)178@8834L22:LazyDsl.kt#428nma");
                if ((i2 & 6) == 0) {
                    i3 = i2 | (composer.changed(lazyItemScope) ? 4 : 2);
                } else {
                    i3 = i2;
                }
                if ((i2 & 48) == 0) {
                    i3 |= composer.changed(i) ? 32 : 16;
                }
                if (!composer.shouldExecute((i3 & 147) != 146, i3 & 1)) {
                    composer.skipToGroupEnd();
                    return;
                }
                if (ComposerKt.isTraceInProgress()) {
                    ComposerKt.traceEventStart(802480018, i3, -1, "androidx.compose.foundation.lazy.items.<anonymous> (LazyDsl.kt:178)");
                }
                Pair pair = (Pair) list.get(i);
                composer.startReplaceGroup(-1868523954);
                final int iIntValue = ((Number) pair.component1()).intValue();
                String str = (String) pair.component2();
                Modifier modifierFillMaxWidth$default = SizeKt.fillMaxWidth$default(Modifier.INSTANCE, 0.0f, 1, null);
                composer.startReplaceGroup(-1746271574);
                boolean zChanged = composer.changed(function1) | composer.changed(iIntValue);
                Object objRememberedValue = composer.rememberedValue();
                if (zChanged || objRememberedValue == Composer.INSTANCE.getEmpty()) {
                    final Function1 function12 = function1;
                    final MutableState mutableState2 = mutableState;
                    objRememberedValue = (Function0) new Function0<Unit>() { // from class: com.sistemasolton.itranvias.home.presentation.freetransfer.FreeTranferScreenKt$SimpleSelector$1$2$1$1$1$1$1
                        @Override // kotlin.jvm.functions.Function0
                        public /* bridge */ /* synthetic */ Unit invoke() {
                            invoke2();
                            return Unit.INSTANCE;
                        }

                        /* JADX INFO: renamed from: invoke, reason: avoid collision after fix types in other method */
                        public final void invoke2() {
                            function12.invoke(Integer.valueOf(iIntValue));
                            FreeTranferScreenKt.SimpleSelector$lambda$17(mutableState2, false);
                        }
                    };
                    composer.updateRememberedValue(objRememberedValue);
                }
                composer.endReplaceGroup();
                Modifier modifierM832padding3ABfNKs = PaddingKt.m832padding3ABfNKs(ClickableKt.m298clickableoSLSa3U$default(modifierFillMaxWidth$default, false, null, null, null, (Function0) objRememberedValue, 15, null), Dp.m7215constructorimpl(12));
                ComposerKt.sourceInformationMarkerStart(composer, 1042775818, "CC(Box)N(modifier,contentAlignment,propagateMinConstraints,content)71@3424L131:Box.kt#2w3rfo");
                MeasurePolicy measurePolicyMaybeCachedBoxMeasurePolicy = BoxKt.maybeCachedBoxMeasurePolicy(Alignment.INSTANCE.getTopStart(), false);
                ComposerKt.sourceInformationMarkerStart(composer, -1159599143, "CC(Layout)P(!1,2)80@3267L27,83@3433L360:Layout.kt#80mrfh");
                int iHashCode = Long.hashCode(ComposablesKt.getCurrentCompositeKeyHashCode(composer, 0));
                CompositionLocalMap currentCompositionLocalMap = composer.getCurrentCompositionLocalMap();
                Modifier modifierMaterializeModifier = ComposedModifierKt.materializeModifier(composer, modifierM832padding3ABfNKs);
                Function0<ComposeUiNode> constructor = ComposeUiNode.INSTANCE.getConstructor();
                ComposerKt.sourceInformationMarkerStart(composer, -553112988, "CC(ReusableComposeNode)N(factory,update,content)399@15590L9:Composables.kt#9igjgp");
                if (!(composer.getApplier() instanceof Applier)) {
                    ComposablesKt.invalidApplier();
                }
                composer.startReusableNode();
                if (composer.getInserting()) {
                    composer.createNode(constructor);
                } else {
                    composer.useNode();
                }
                Composer composerM3820constructorimpl = Updater.m3820constructorimpl(composer);
                Updater.m3827setimpl(composerM3820constructorimpl, measurePolicyMaybeCachedBoxMeasurePolicy, ComposeUiNode.INSTANCE.getSetMeasurePolicy());
                Updater.m3827setimpl(composerM3820constructorimpl, currentCompositionLocalMap, ComposeUiNode.INSTANCE.getSetResolvedCompositionLocals());
                Function2<ComposeUiNode, Integer, Unit> setCompositeKeyHash = ComposeUiNode.INSTANCE.getSetCompositeKeyHash();
                if (composerM3820constructorimpl.getInserting() || !Intrinsics.areEqual(composerM3820constructorimpl.rememberedValue(), Integer.valueOf(iHashCode))) {
                    composerM3820constructorimpl.updateRememberedValue(Integer.valueOf(iHashCode));
                    composerM3820constructorimpl.apply(Integer.valueOf(iHashCode), setCompositeKeyHash);
                }
                Updater.m3827setimpl(composerM3820constructorimpl, modifierMaterializeModifier, ComposeUiNode.INSTANCE.getSetModifier());
                ComposerKt.sourceInformationMarkerStart(composer, 1833054614, "C72@3469L9:Box.kt#2w3rfo");
                BoxScopeInstance boxScopeInstance = BoxScopeInstance.INSTANCE;
                TextKt.m2803Text4IGK_g(str, (Modifier) null, MaterialTheme.INSTANCE.getColorScheme(composer, MaterialTheme.$stable).getOnSurface(), 0L, (FontStyle) null, (FontWeight) null, (FontFamily) null, 0L, (TextDecoration) null, (TextAlign) null, 0L, 0, false, 0, 0, (Function1<? super TextLayoutResult, Unit>) null, (TextStyle) null, composer, 0, 0, 131066);
                ComposerKt.sourceInformationMarkerEnd(composer);
                composer.endNode();
                ComposerKt.sourceInformationMarkerEnd(composer);
                ComposerKt.sourceInformationMarkerEnd(composer);
                ComposerKt.sourceInformationMarkerEnd(composer);
                composer.endReplaceGroup();
                if (ComposerKt.isTraceInProgress()) {
                    ComposerKt.traceEventEnd();
                }
            }
        }));
        return Unit.INSTANCE;
    }
}