package androidx.compose.foundation.selection; import androidx.compose.foundation.ClickableKt; import androidx.compose.foundation.Indication; import androidx.compose.foundation.IndicationKt; import androidx.compose.foundation.interaction.InteractionSourceKt; import androidx.compose.foundation.interaction.MutableInteractionSource; import androidx.compose.runtime.Composer; import androidx.compose.runtime.ComposerKt; import androidx.compose.runtime.ProvidableCompositionLocal; import androidx.compose.ui.ComposedModifierKt; import androidx.compose.ui.Modifier; import androidx.compose.ui.platform.InspectableValueKt; import androidx.compose.ui.platform.InspectorInfo; 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.compose.ui.state.ToggleableState; import androidx.compose.ui.state.ToggleableStateKt; import io.sentry.protocol.SentryThread; import kotlin.Metadata; import kotlin.Unit; import kotlin.jvm.functions.Function0; import kotlin.jvm.functions.Function1; import kotlin.jvm.functions.Function3; import kotlin.jvm.internal.Intrinsics; /* compiled from: Toggleable.kt */ @Metadata(d1 = {"\u0000<\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\u001aY\u0010\u0000\u001a\u00020\u0001*\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u00032\u0006\u0010\u0004\u001a\u00020\u00052\b\u0010\u0006\u001a\u0004\u0018\u00010\u00072\b\b\u0002\u0010\b\u001a\u00020\u00032\n\b\u0002\u0010\t\u001a\u0004\u0018\u00010\n2\u0012\u0010\u000b\u001a\u000e\u0012\u0004\u0012\u00020\u0003\u0012\u0004\u0012\u00020\r0\fø\u0001\u0000ø\u0001\u0001¢\u0006\u0002\b\u000e\u001aG\u0010\u0000\u001a\u00020\u0001*\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u00032\b\b\u0002\u0010\b\u001a\u00020\u00032\n\b\u0002\u0010\t\u001a\u0004\u0018\u00010\n2\u0012\u0010\u000b\u001a\u000e\u0012\u0004\u0012\u00020\u0003\u0012\u0004\u0012\u00020\r0\fø\u0001\u0000ø\u0001\u0001¢\u0006\u0002\b\u000f\u001aS\u0010\u0010\u001a\u00020\u0001*\u00020\u00012\u0006\u0010\u0011\u001a\u00020\u00122\u0006\u0010\u0004\u001a\u00020\u00052\b\u0010\u0006\u001a\u0004\u0018\u00010\u00072\b\b\u0002\u0010\b\u001a\u00020\u00032\n\b\u0002\u0010\t\u001a\u0004\u0018\u00010\n2\f\u0010\u0013\u001a\b\u0012\u0004\u0012\u00020\r0\u0014ø\u0001\u0000ø\u0001\u0001¢\u0006\u0002\b\u0015\u001aA\u0010\u0010\u001a\u00020\u0001*\u00020\u00012\u0006\u0010\u0011\u001a\u00020\u00122\b\b\u0002\u0010\b\u001a\u00020\u00032\n\b\u0002\u0010\t\u001a\u0004\u0018\u00010\n2\f\u0010\u0013\u001a\b\u0012\u0004\u0012\u00020\r0\u0014ø\u0001\u0000ø\u0001\u0001¢\u0006\u0002\b\u0016\u0082\u0002\u000b\n\u0005\b¡\u001e0\u0001\n\u0002\b\u0019¨\u0006\u0017"}, d2 = {"toggleable", "Landroidx/compose/ui/Modifier;", "value", "", "interactionSource", "Landroidx/compose/foundation/interaction/MutableInteractionSource;", "indication", "Landroidx/compose/foundation/Indication;", "enabled", "role", "Landroidx/compose/ui/semantics/Role;", "onValueChange", "Lkotlin/Function1;", "", "toggleable-O2vRcR0", "toggleable-XHw0xAI", "triStateToggleable", SentryThread.JsonKeys.STATE, "Landroidx/compose/ui/state/ToggleableState;", "onClick", "Lkotlin/Function0;", "triStateToggleable-O2vRcR0", "triStateToggleable-XHw0xAI", "foundation_release"}, k = 2, mv = {1, 8, 0}, xi = 48) /* loaded from: classes.dex */ public final class ToggleableKt { /* renamed from: toggleable-XHw0xAI$default, reason: not valid java name */ public static /* synthetic */ Modifier m721toggleableXHw0xAI$default(Modifier modifier, boolean z, boolean z2, Role role, Function1 function1, int i, Object obj) { if ((i & 2) != 0) { z2 = true; } if ((i & 4) != 0) { role = null; } return m720toggleableXHw0xAI(modifier, z, z2, role, function1); } /* renamed from: toggleable-O2vRcR0$default, reason: not valid java name */ public static /* synthetic */ Modifier m719toggleableO2vRcR0$default(Modifier modifier, boolean z, MutableInteractionSource mutableInteractionSource, Indication indication, boolean z2, Role role, Function1 function1, int i, Object obj) { if ((i & 8) != 0) { z2 = true; } boolean z3 = z2; if ((i & 16) != 0) { role = null; } return m718toggleableO2vRcR0(modifier, z, mutableInteractionSource, indication, z3, role, function1); } /* renamed from: triStateToggleable-XHw0xAI$default, reason: not valid java name */ public static /* synthetic */ Modifier m725triStateToggleableXHw0xAI$default(Modifier modifier, ToggleableState toggleableState, boolean z, Role role, Function0 function0, int i, Object obj) { if ((i & 2) != 0) { z = true; } if ((i & 4) != 0) { role = null; } return m724triStateToggleableXHw0xAI(modifier, toggleableState, z, role, function0); } /* renamed from: triStateToggleable-O2vRcR0$default, reason: not valid java name */ public static /* synthetic */ Modifier m723triStateToggleableO2vRcR0$default(Modifier modifier, ToggleableState toggleableState, MutableInteractionSource mutableInteractionSource, Indication indication, boolean z, Role role, Function0 function0, int i, Object obj) { if ((i & 8) != 0) { z = true; } boolean z2 = z; if ((i & 16) != 0) { role = null; } return m722triStateToggleableO2vRcR0(modifier, toggleableState, mutableInteractionSource, indication, z2, role, function0); } /* renamed from: toggleable-XHw0xAI, reason: not valid java name */ public static final Modifier m720toggleableXHw0xAI(Modifier toggleable, final boolean z, final boolean z2, final Role role, final Function1 onValueChange) { Intrinsics.checkNotNullParameter(toggleable, "$this$toggleable"); Intrinsics.checkNotNullParameter(onValueChange, "onValueChange"); return ComposedModifierKt.composed(toggleable, InspectableValueKt.isDebugInspectorInfoEnabled() ? new Function1() { // from class: androidx.compose.foundation.selection.ToggleableKt$toggleable-XHw0xAI$$inlined$debugInspectorInfo$1 /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ { super(1); } @Override // kotlin.jvm.functions.Function1 public /* bridge */ /* synthetic */ Unit invoke(InspectorInfo inspectorInfo) { invoke2(inspectorInfo); return Unit.INSTANCE; } /* renamed from: invoke, reason: avoid collision after fix types in other method */ public final void invoke2(InspectorInfo inspectorInfo) { Intrinsics.checkNotNullParameter(inspectorInfo, "$this$null"); inspectorInfo.setName("toggleable"); inspectorInfo.getProperties().set("value", Boolean.valueOf(z)); inspectorInfo.getProperties().set("enabled", Boolean.valueOf(z2)); inspectorInfo.getProperties().set("role", role); inspectorInfo.getProperties().set("onValueChange", onValueChange); } } : InspectableValueKt.getNoInspectorInfo(), new Function3() { // from class: androidx.compose.foundation.selection.ToggleableKt$toggleable$2 /* JADX INFO: Access modifiers changed from: package-private */ /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ /* JADX WARN: Multi-variable type inference failed */ { super(3); } @Override // kotlin.jvm.functions.Function3 public /* bridge */ /* synthetic */ Modifier invoke(Modifier modifier, Composer composer, Integer num) { return invoke(modifier, composer, num.intValue()); } public final Modifier invoke(Modifier composed, Composer composer, int i) { Intrinsics.checkNotNullParameter(composed, "$this$composed"); composer.startReplaceableGroup(290332169); ComposerKt.sourceInformation(composer, "C68@2718L39,69@2796L7:Toggleable.kt#gro6r2"); if (ComposerKt.isTraceInProgress()) { ComposerKt.traceEventStart(290332169, i, -1, "androidx.compose.foundation.selection.toggleable. (Toggleable.kt:65)"); } Modifier.Companion companion = Modifier.INSTANCE; boolean z3 = z; composer.startReplaceableGroup(-492369756); ComposerKt.sourceInformation(composer, "CC(remember):Composables.kt#9igjgp"); Object rememberedValue = composer.rememberedValue(); if (rememberedValue == Composer.INSTANCE.getEmpty()) { rememberedValue = InteractionSourceKt.MutableInteractionSource(); composer.updateRememberedValue(rememberedValue); } composer.endReplaceableGroup(); MutableInteractionSource mutableInteractionSource = (MutableInteractionSource) rememberedValue; ProvidableCompositionLocal localIndication = IndicationKt.getLocalIndication(); ComposerKt.sourceInformationMarkerStart(composer, 2023513938, "CC:CompositionLocal.kt#9igjgp"); Object consume = composer.consume(localIndication); ComposerKt.sourceInformationMarkerEnd(composer); Modifier m718toggleableO2vRcR0 = ToggleableKt.m718toggleableO2vRcR0(companion, z3, mutableInteractionSource, (Indication) consume, z2, role, onValueChange); if (ComposerKt.isTraceInProgress()) { ComposerKt.traceEventEnd(); } composer.endReplaceableGroup(); return m718toggleableO2vRcR0; } }); } /* renamed from: toggleable-O2vRcR0, reason: not valid java name */ public static final Modifier m718toggleableO2vRcR0(Modifier toggleable, final boolean z, final MutableInteractionSource interactionSource, final Indication indication, final boolean z2, final Role role, final Function1 onValueChange) { Intrinsics.checkNotNullParameter(toggleable, "$this$toggleable"); Intrinsics.checkNotNullParameter(interactionSource, "interactionSource"); Intrinsics.checkNotNullParameter(onValueChange, "onValueChange"); Function1 noInspectorInfo = InspectableValueKt.isDebugInspectorInfoEnabled() ? new Function1() { // from class: androidx.compose.foundation.selection.ToggleableKt$toggleable-O2vRcR0$$inlined$debugInspectorInfo$1 /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ { super(1); } @Override // kotlin.jvm.functions.Function1 public /* bridge */ /* synthetic */ Unit invoke(InspectorInfo inspectorInfo) { invoke2(inspectorInfo); return Unit.INSTANCE; } /* renamed from: invoke, reason: avoid collision after fix types in other method */ public final void invoke2(InspectorInfo inspectorInfo) { Intrinsics.checkNotNullParameter(inspectorInfo, "$this$null"); inspectorInfo.setName("toggleable"); inspectorInfo.getProperties().set("value", Boolean.valueOf(z)); inspectorInfo.getProperties().set("interactionSource", interactionSource); inspectorInfo.getProperties().set("indication", indication); inspectorInfo.getProperties().set("enabled", Boolean.valueOf(z2)); inspectorInfo.getProperties().set("role", role); inspectorInfo.getProperties().set("onValueChange", onValueChange); } } : InspectableValueKt.getNoInspectorInfo(); Modifier.Companion companion = Modifier.INSTANCE; return InspectableValueKt.inspectableWrapper(toggleable, noInspectorInfo, m722triStateToggleableO2vRcR0(Modifier.INSTANCE, ToggleableStateKt.ToggleableState(z), interactionSource, indication, z2, role, new Function0() { // from class: androidx.compose.foundation.selection.ToggleableKt$toggleable$4$1 /* JADX INFO: Access modifiers changed from: package-private */ /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ /* JADX WARN: Multi-variable type inference failed */ { super(0); } @Override // kotlin.jvm.functions.Function0 public /* bridge */ /* synthetic */ Unit invoke() { invoke2(); return Unit.INSTANCE; } /* renamed from: invoke, reason: avoid collision after fix types in other method */ public final void invoke2() { onValueChange.invoke(Boolean.valueOf(!z)); } })); } /* renamed from: triStateToggleable-XHw0xAI, reason: not valid java name */ public static final Modifier m724triStateToggleableXHw0xAI(Modifier triStateToggleable, final ToggleableState state, final boolean z, final Role role, final Function0 onClick) { Intrinsics.checkNotNullParameter(triStateToggleable, "$this$triStateToggleable"); Intrinsics.checkNotNullParameter(state, "state"); Intrinsics.checkNotNullParameter(onClick, "onClick"); return ComposedModifierKt.composed(triStateToggleable, InspectableValueKt.isDebugInspectorInfoEnabled() ? new Function1() { // from class: androidx.compose.foundation.selection.ToggleableKt$triStateToggleable-XHw0xAI$$inlined$debugInspectorInfo$1 /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ { super(1); } @Override // kotlin.jvm.functions.Function1 public /* bridge */ /* synthetic */ Unit invoke(InspectorInfo inspectorInfo) { invoke2(inspectorInfo); return Unit.INSTANCE; } /* renamed from: invoke, reason: avoid collision after fix types in other method */ public final void invoke2(InspectorInfo inspectorInfo) { Intrinsics.checkNotNullParameter(inspectorInfo, "$this$null"); inspectorInfo.setName("triStateToggleable"); inspectorInfo.getProperties().set(SentryThread.JsonKeys.STATE, ToggleableState.this); inspectorInfo.getProperties().set("enabled", Boolean.valueOf(z)); inspectorInfo.getProperties().set("role", role); inspectorInfo.getProperties().set("onClick", onClick); } } : InspectableValueKt.getNoInspectorInfo(), new Function3() { // from class: androidx.compose.foundation.selection.ToggleableKt$triStateToggleable$2 /* JADX INFO: Access modifiers changed from: package-private */ /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ { super(3); } @Override // kotlin.jvm.functions.Function3 public /* bridge */ /* synthetic */ Modifier invoke(Modifier modifier, Composer composer, Integer num) { return invoke(modifier, composer, num.intValue()); } public final Modifier invoke(Modifier composed, Composer composer, int i) { Intrinsics.checkNotNullParameter(composed, "$this$composed"); composer.startReplaceableGroup(-1808118329); ComposerKt.sourceInformation(composer, "C165@6476L39,166@6554L7:Toggleable.kt#gro6r2"); if (ComposerKt.isTraceInProgress()) { ComposerKt.traceEventStart(-1808118329, i, -1, "androidx.compose.foundation.selection.triStateToggleable. (Toggleable.kt:162)"); } Modifier.Companion companion = Modifier.INSTANCE; ToggleableState toggleableState = ToggleableState.this; composer.startReplaceableGroup(-492369756); ComposerKt.sourceInformation(composer, "CC(remember):Composables.kt#9igjgp"); Object rememberedValue = composer.rememberedValue(); if (rememberedValue == Composer.INSTANCE.getEmpty()) { rememberedValue = InteractionSourceKt.MutableInteractionSource(); composer.updateRememberedValue(rememberedValue); } composer.endReplaceableGroup(); MutableInteractionSource mutableInteractionSource = (MutableInteractionSource) rememberedValue; ProvidableCompositionLocal localIndication = IndicationKt.getLocalIndication(); ComposerKt.sourceInformationMarkerStart(composer, 2023513938, "CC:CompositionLocal.kt#9igjgp"); Object consume = composer.consume(localIndication); ComposerKt.sourceInformationMarkerEnd(composer); Modifier m722triStateToggleableO2vRcR0 = ToggleableKt.m722triStateToggleableO2vRcR0(companion, toggleableState, mutableInteractionSource, (Indication) consume, z, role, onClick); if (ComposerKt.isTraceInProgress()) { ComposerKt.traceEventEnd(); } composer.endReplaceableGroup(); return m722triStateToggleableO2vRcR0; } }); } /* renamed from: triStateToggleable-O2vRcR0, reason: not valid java name */ public static final Modifier m722triStateToggleableO2vRcR0(Modifier triStateToggleable, final ToggleableState state, final MutableInteractionSource interactionSource, final Indication indication, final boolean z, final Role role, final Function0 onClick) { Intrinsics.checkNotNullParameter(triStateToggleable, "$this$triStateToggleable"); Intrinsics.checkNotNullParameter(state, "state"); Intrinsics.checkNotNullParameter(interactionSource, "interactionSource"); Intrinsics.checkNotNullParameter(onClick, "onClick"); return InspectableValueKt.inspectableWrapper(triStateToggleable, InspectableValueKt.isDebugInspectorInfoEnabled() ? new Function1() { // from class: androidx.compose.foundation.selection.ToggleableKt$triStateToggleable-O2vRcR0$$inlined$debugInspectorInfo$1 /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ { super(1); } @Override // kotlin.jvm.functions.Function1 public /* bridge */ /* synthetic */ Unit invoke(InspectorInfo inspectorInfo) { invoke2(inspectorInfo); return Unit.INSTANCE; } /* renamed from: invoke, reason: avoid collision after fix types in other method */ public final void invoke2(InspectorInfo inspectorInfo) { Intrinsics.checkNotNullParameter(inspectorInfo, "$this$null"); inspectorInfo.setName("triStateToggleable"); inspectorInfo.getProperties().set(SentryThread.JsonKeys.STATE, ToggleableState.this); inspectorInfo.getProperties().set("enabled", Boolean.valueOf(z)); inspectorInfo.getProperties().set("role", role); inspectorInfo.getProperties().set("interactionSource", interactionSource); inspectorInfo.getProperties().set("indication", indication); inspectorInfo.getProperties().set("onClick", onClick); } } : InspectableValueKt.getNoInspectorInfo(), SemanticsModifierKt.semantics$default(ClickableKt.m200clickableO2vRcR0$default(Modifier.INSTANCE, interactionSource, indication, z, null, role, onClick, 8, null), false, new Function1() { // from class: androidx.compose.foundation.selection.ToggleableKt$triStateToggleable$4$1 /* JADX INFO: Access modifiers changed from: package-private */ { super(1); } @Override // kotlin.jvm.functions.Function1 public /* bridge */ /* synthetic */ Unit invoke(SemanticsPropertyReceiver semanticsPropertyReceiver) { invoke2(semanticsPropertyReceiver); return Unit.INSTANCE; } /* renamed from: invoke, reason: avoid collision after fix types in other method */ public final void invoke2(SemanticsPropertyReceiver semantics) { Intrinsics.checkNotNullParameter(semantics, "$this$semantics"); SemanticsPropertiesKt.setToggleableState(semantics, ToggleableState.this); } }, 1, null)); } }