Rabbit-R1/switch port/java/sources/androidx/compose/foundation/ProgressSemanticsKt.java
2024-05-21 17:08:36 -04:00

69 lines
4.1 KiB
Java

package androidx.compose.foundation;
import androidx.compose.ui.Modifier;
import androidx.compose.ui.semantics.ProgressBarRangeInfo;
import androidx.compose.ui.semantics.SemanticsModifierKt;
import androidx.compose.ui.semantics.SemanticsPropertiesKt;
import androidx.compose.ui.semantics.SemanticsPropertyReceiver;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.ranges.ClosedFloatingPointRange;
import kotlin.ranges.RangesKt;
/* compiled from: ProgressSemantics.kt */
@Metadata(d1 = {"\u0000\u001a\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0007\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0000\u001a\f\u0010\u0000\u001a\u00020\u0001*\u00020\u0001H\u0007\u001a.\u0010\u0000\u001a\u00020\u0001*\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u00032\u000e\b\u0002\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00030\u00052\b\b\u0002\u0010\u0006\u001a\u00020\u0007H\u0007¨\u0006\b"}, d2 = {"progressSemantics", "Landroidx/compose/ui/Modifier;", "value", "", "valueRange", "Lkotlin/ranges/ClosedFloatingPointRange;", "steps", "", "foundation_release"}, k = 2, mv = {1, 8, 0}, xi = 48)
/* loaded from: classes.dex */
public final class ProgressSemanticsKt {
public static /* synthetic */ Modifier progressSemantics$default(Modifier modifier, float f, ClosedFloatingPointRange closedFloatingPointRange, int i, int i2, Object obj) {
if ((i2 & 2) != 0) {
closedFloatingPointRange = RangesKt.rangeTo(0.0f, 1.0f);
}
if ((i2 & 4) != 0) {
i = 0;
}
return progressSemantics(modifier, f, closedFloatingPointRange, i);
}
public static final Modifier progressSemantics(Modifier modifier, final float f, final ClosedFloatingPointRange<Float> valueRange, final int i) {
Intrinsics.checkNotNullParameter(modifier, "<this>");
Intrinsics.checkNotNullParameter(valueRange, "valueRange");
return SemanticsModifierKt.semantics(modifier, true, new Function1<SemanticsPropertyReceiver, Unit>() { // from class: androidx.compose.foundation.ProgressSemanticsKt$progressSemantics$1
/* JADX INFO: Access modifiers changed from: package-private */
/* 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(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.setProgressBarRangeInfo(semantics, new ProgressBarRangeInfo(((Number) RangesKt.coerceIn(Float.valueOf(f), valueRange)).floatValue(), valueRange, i));
}
});
}
public static final Modifier progressSemantics(Modifier modifier) {
Intrinsics.checkNotNullParameter(modifier, "<this>");
return SemanticsModifierKt.semantics(modifier, true, new Function1<SemanticsPropertyReceiver, Unit>() { // from class: androidx.compose.foundation.ProgressSemanticsKt$progressSemantics$2
@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.setProgressBarRangeInfo(semantics, ProgressBarRangeInfo.INSTANCE.getIndeterminate());
}
});
}
}