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

import androidx.compose.material3.TextKt;
import androidx.compose.runtime.Composer;
import androidx.compose.runtime.ComposerKt;
import androidx.compose.ui.Modifier;
import androidx.compose.ui.semantics.SemanticsModifierKt;
import androidx.compose.ui.semantics.SemanticsPropertiesKt;
import androidx.compose.ui.semantics.SemanticsPropertyReceiver;
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 com.sistemasolton.itranvias.home.data.remote.dto.detalleparadadto.DetalleParadaDto;
import com.sistemasolton.itranvias.home.data.remote.dto.infodto.InfoDto;
import com.sistemasolton.itranvias.home.data.remote.dto.infodto.ParadaDto;
import com.sistemasolton.itranvias.ui.theme.ColorKt;
import itranvias.composeapp.generated.resources.Res;
import itranvias.composeapp.generated.resources.String0_commonMainKt;
import java.util.Iterator;
import java.util.List;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import org.jetbrains.compose.resources.StringResourcesKt;

/* JADX INFO: compiled from: StopDetailScreen.kt */
/* JADX INFO: loaded from: classes2.dex */
@Metadata(k = 3, mv = {2, 1, 0}, xi = 48)
final class StopDetailScreenKt$StopDetailScreen$3$1$1 implements Function2<Composer, Integer, Unit> {
    final /* synthetic */ DetalleParadaDto $detalle;
    final /* synthetic */ InfoDto $infoDto;

    StopDetailScreenKt$StopDetailScreen$3$1$1(InfoDto infoDto, DetalleParadaDto detalleParadaDto) {
        this.$infoDto = infoDto;
        this.$detalle = detalleParadaDto;
    }

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

    public final void invoke(Composer composer, int i) {
        Object next;
        if ((i & 3) == 2 && composer.getSkipping()) {
            composer.skipToGroupEnd();
            return;
        }
        if (ComposerKt.isTraceInProgress()) {
            ComposerKt.traceEventStart(-1810996574, i, -1, "com.sistemasolton.itranvias.home.presentation.stopdetail.StopDetailScreen.<anonymous>.<anonymous>.<anonymous> (StopDetailScreen.kt:127)");
        }
        List<ParadaDto> paradas = this.$infoDto.getITranvias().getActualizacion().getParadas();
        DetalleParadaDto detalleParadaDto = this.$detalle;
        Iterator<T> it = paradas.iterator();
        while (true) {
            if (!it.hasNext()) {
                next = null;
                break;
            } else {
                next = it.next();
                if (((ParadaDto) next).getId() == detalleParadaDto.getBuses().getParada()) {
                    break;
                }
            }
        }
        ParadaDto paradaDto = (ParadaDto) next;
        final String nombre = paradaDto != null ? paradaDto.getNombre() : null;
        composer.startReplaceGroup(-905950831);
        if (nombre == null) {
            nombre = StringResourcesKt.stringResource(String0_commonMainKt.getStop_detail_title(Res.string.INSTANCE), composer, 0);
        }
        composer.endReplaceGroup();
        long whiteTranvias = ColorKt.getWhiteTranvias();
        Modifier.Companion companion = Modifier.INSTANCE;
        composer.startReplaceGroup(5004770);
        boolean zChanged = composer.changed(nombre);
        Object objRememberedValue = composer.rememberedValue();
        if (zChanged || objRememberedValue == Composer.INSTANCE.getEmpty()) {
            objRememberedValue = new Function1() { // from class: com.sistemasolton.itranvias.home.presentation.stopdetail.StopDetailScreenKt$StopDetailScreen$3$1$1$$ExternalSyntheticLambda0
                @Override // kotlin.jvm.functions.Function1
                public final Object invoke(Object obj) {
                    return StopDetailScreenKt$StopDetailScreen$3$1$1.invoke$lambda$2$lambda$1(nombre, (SemanticsPropertyReceiver) obj);
                }
            };
            composer.updateRememberedValue(objRememberedValue);
        }
        composer.endReplaceGroup();
        TextKt.m2803Text4IGK_g(nombre, SemanticsModifierKt.semantics$default(companion, false, (Function1) objRememberedValue, 1, null), whiteTranvias, 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, 384, 0, 131064);
        if (ComposerKt.isTraceInProgress()) {
            ComposerKt.traceEventEnd();
        }
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final Unit invoke$lambda$2$lambda$1(String str, SemanticsPropertyReceiver semantics) {
        Intrinsics.checkNotNullParameter(semantics, "$this$semantics");
        SemanticsPropertiesKt.heading(semantics);
        SemanticsPropertiesKt.setContentDescription(semantics, "Parada: " + str);
        return Unit.INSTANCE;
    }
}