package d3;

import android.view.KeyEvent;
import androidx.compose.runtime.MutableState;
import h3.T2;
import w4.C3137A;

/* JADX INFO: loaded from: classes.dex */
public final class K1 implements J4.c {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final /* synthetic */ int f15191a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ MutableState f15192b;

    public /* synthetic */ K1(MutableState mutableState, int i6) {
        this.f15191a = i6;
        this.f15192b = mutableState;
    }

    /* JADX WARN: Multi-variable type inference failed */
    @Override // J4.c
    public final Object invoke(Object obj) {
        C3137A c3137a = C3137A.f25453a;
        MutableState mutableState = this.f15192b;
        switch (this.f15191a) {
            case 0:
                KeyEvent event = ((A0.c) obj).f76a;
                kotlin.jvm.internal.o.h(event, "event");
                if (event.getAction() == 0) {
                    int keyCode = event.getKeyCode();
                    boolean z6 = true;
                    if (keyCode == 21) {
                        long jLongValue = ((Number) mutableState.getValue()).longValue() - 500;
                        if (jLongValue < -5000) {
                            jLongValue = -5000;
                        }
                        mutableState.setValue(Long.valueOf(jLongValue));
                    } else if (keyCode != 22) {
                        z6 = false;
                    } else {
                        long jLongValue2 = ((Number) mutableState.getValue()).longValue() + 500;
                        if (jLongValue2 > 5000) {
                            jLongValue2 = 5000;
                        }
                        mutableState.setValue(Long.valueOf(jLongValue2));
                    }
                }
                break;
            case 1:
                n0.B it = (n0.B) obj;
                kotlin.jvm.internal.o.h(it, "it");
                boolean zB = ((n0.C) it).b();
                J.f fVar = h3.T.f17335e;
                mutableState.setValue(Boolean.valueOf(zB));
                break;
            default:
                n0.B it2 = (n0.B) obj;
                kotlin.jvm.internal.o.h(it2, "it");
                boolean zB2 = ((n0.C) it2).b();
                float f6 = T2.f17380a;
                mutableState.setValue(Boolean.valueOf(zB2));
                break;
        }
        return c3137a;
    }
}
