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

import androidx.compose.foundation.layout.RowScope;
import androidx.compose.material.icons.Icons;
import androidx.compose.material.icons.filled.StarKt;
import androidx.compose.material.icons.outlined.StarBorderKt;
import androidx.compose.material3.IconButtonKt;
import androidx.compose.material3.IconKt;
import androidx.compose.runtime.Composer;
import androidx.compose.runtime.ComposerKt;
import androidx.compose.runtime.internal.ComposableLambdaKt;
import androidx.compose.ui.Modifier;
import androidx.compose.ui.semantics.Role;
import androidx.compose.ui.semantics.SemanticsModifierKt;
import androidx.compose.ui.semantics.SemanticsPropertiesKt;
import androidx.compose.ui.semantics.SemanticsPropertyReceiver;
import androidx.profileinstaller.ProfileVerifier;
import com.sistemasolton.itranvias.ui.theme.ColorKt;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.functions.Function3;
import kotlin.jvm.internal.Intrinsics;

/* JADX INFO: compiled from: LineDetailScreen.kt */
/* JADX INFO: loaded from: classes2.dex */
@Metadata(k = 3, mv = {2, 1, 0}, xi = 48)
final class LineDetailScreenKt$LineDetailScreen$3$1$3 implements Function3<RowScope, Composer, Integer, Unit> {
    final /* synthetic */ String $addFavoriteDesc;
    final /* synthetic */ String $lineId;
    final /* synthetic */ String $removeFavoriteDesc;
    final /* synthetic */ LineDetailState $state;
    final /* synthetic */ LineDetailViewmodel $viewModel;

    LineDetailScreenKt$LineDetailScreen$3$1$3(LineDetailState lineDetailState, String str, String str2, LineDetailViewmodel lineDetailViewmodel, String str3) {
        this.$state = lineDetailState;
        this.$removeFavoriteDesc = str;
        this.$addFavoriteDesc = str2;
        this.$viewModel = lineDetailViewmodel;
        this.$lineId = str3;
    }

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

    public final void invoke(RowScope TopAppBar, Composer composer, int i) {
        Intrinsics.checkNotNullParameter(TopAppBar, "$this$TopAppBar");
        if ((i & 17) == 16 && composer.getSkipping()) {
            composer.skipToGroupEnd();
            return;
        }
        if (ComposerKt.isTraceInProgress()) {
            ComposerKt.traceEventStart(-1659075535, i, -1, "com.sistemasolton.itranvias.home.presentation.linedetail.LineDetailScreen.<anonymous>.<anonymous>.<anonymous> (LineDetailScreen.kt:219)");
        }
        final String str = this.$state.isFavorite() ? this.$removeFavoriteDesc : this.$addFavoriteDesc;
        composer.startReplaceGroup(-1633490746);
        boolean zChangedInstance = composer.changedInstance(this.$viewModel) | composer.changed(this.$lineId);
        final LineDetailViewmodel lineDetailViewmodel = this.$viewModel;
        final String str2 = this.$lineId;
        Object objRememberedValue = composer.rememberedValue();
        if (zChangedInstance || objRememberedValue == Composer.INSTANCE.getEmpty()) {
            objRememberedValue = new Function0() { // from class: com.sistemasolton.itranvias.home.presentation.linedetail.LineDetailScreenKt$LineDetailScreen$3$1$3$$ExternalSyntheticLambda0
                @Override // kotlin.jvm.functions.Function0
                public final Object invoke() {
                    return LineDetailScreenKt$LineDetailScreen$3$1$3.invoke$lambda$1$lambda$0(lineDetailViewmodel, str2);
                }
            };
            composer.updateRememberedValue(objRememberedValue);
        }
        Function0 function0 = (Function0) objRememberedValue;
        composer.endReplaceGroup();
        Modifier.Companion companion = Modifier.INSTANCE;
        composer.startReplaceGroup(5004770);
        boolean zChanged = composer.changed(str);
        Object objRememberedValue2 = composer.rememberedValue();
        if (zChanged || objRememberedValue2 == Composer.INSTANCE.getEmpty()) {
            objRememberedValue2 = new Function1() { // from class: com.sistemasolton.itranvias.home.presentation.linedetail.LineDetailScreenKt$LineDetailScreen$3$1$3$$ExternalSyntheticLambda1
                @Override // kotlin.jvm.functions.Function1
                public final Object invoke(Object obj) {
                    return LineDetailScreenKt$LineDetailScreen$3$1$3.invoke$lambda$3$lambda$2(str, (SemanticsPropertyReceiver) obj);
                }
            };
            composer.updateRememberedValue(objRememberedValue2);
        }
        composer.endReplaceGroup();
        Modifier modifierSemantics$default = SemanticsModifierKt.semantics$default(companion, false, (Function1) objRememberedValue2, 1, null);
        final LineDetailState lineDetailState = this.$state;
        IconButtonKt.IconButton(function0, modifierSemantics$default, false, null, null, ComposableLambdaKt.rememberComposableLambda(881421070, true, new Function2<Composer, Integer, Unit>() { // from class: com.sistemasolton.itranvias.home.presentation.linedetail.LineDetailScreenKt$LineDetailScreen$3$1$3.3
            @Override // kotlin.jvm.functions.Function2
            public /* bridge */ /* synthetic */ Unit invoke(Composer composer2, Integer num) {
                invoke(composer2, num.intValue());
                return Unit.INSTANCE;
            }

            public final void invoke(Composer composer2, int i2) {
                if ((i2 & 3) == 2 && composer2.getSkipping()) {
                    composer2.skipToGroupEnd();
                    return;
                }
                if (ComposerKt.isTraceInProgress()) {
                    ComposerKt.traceEventStart(881421070, i2, -1, "com.sistemasolton.itranvias.home.presentation.linedetail.LineDetailScreen.<anonymous>.<anonymous>.<anonymous>.<anonymous> (LineDetailScreen.kt:231)");
                }
                IconKt.m2260Iconww6aTOc(lineDetailState.isFavorite() ? StarKt.getStar(Icons.Filled.INSTANCE) : StarBorderKt.getStarBorder(Icons.Outlined.INSTANCE), (String) null, (Modifier) null, ColorKt.getWhiteTranvias(), composer2, 3120, 4);
                if (ComposerKt.isTraceInProgress()) {
                    ComposerKt.traceEventEnd();
                }
            }
        }, composer, 54), composer, ProfileVerifier.CompilationStatus.RESULT_CODE_ERROR_CANT_WRITE_PROFILE_VERIFICATION_RESULT_CACHE_FILE, 28);
        if (ComposerKt.isTraceInProgress()) {
            ComposerKt.traceEventEnd();
        }
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final Unit invoke$lambda$1$lambda$0(LineDetailViewmodel lineDetailViewmodel, String str) {
        lineDetailViewmodel.toggleFavorite(str);
        return Unit.INSTANCE;
    }

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