package d3;

import V2.R2;
import android.content.Context;
import androidx.compose.runtime.MutableState;
import androidx.compose.runtime.State;
import androidx.media3.exoplayer.ExoPlayer;
import w4.C3137A;

/* JADX INFO: renamed from: d3.m0, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final /* synthetic */ class C1905m0 implements J4.a {

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

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

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final /* synthetic */ Object f15810c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final /* synthetic */ Object f15811d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final /* synthetic */ Object f15812e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public final /* synthetic */ Object f15813f;

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    public final /* synthetic */ Object f15814j;

    public /* synthetic */ C1905m0(MutableState mutableState, MutableState mutableState2, MutableState mutableState3, V4.C c6, MutableState mutableState4, n0.x xVar) {
        this.f15808a = 2;
        this.f15809b = mutableState;
        this.f15810c = mutableState2;
        this.f15811d = mutableState3;
        this.f15813f = c6;
        this.f15812e = mutableState4;
        this.f15814j = xVar;
    }

    /* JADX WARN: Multi-variable type inference failed */
    @Override // J4.a
    public final Object invoke() {
        switch (this.f15808a) {
            case 0:
                break;
            case 1:
                ((ExoPlayer) this.f15812e).setPlayWhenReady(false);
                ((MutableState) this.f15809b).setValue((Integer) this.f15813f);
                ((MutableState) this.f15810c).setValue((Integer) this.f15814j);
                v2.W((MutableState) this.f15811d, true);
                break;
            case 2:
                if (((Boolean) ((MutableState) this.f15809b).getValue()).booleanValue()) {
                    MutableState mutableState = (MutableState) this.f15810c;
                    mutableState.setValue(Integer.valueOf(((Number) mutableState.getValue()).intValue() + 1));
                } else {
                    MutableState mutableState2 = (MutableState) this.f15811d;
                    if (!((Boolean) mutableState2.getValue()).booleanValue()) {
                        h3.Q0.h((V4.C) this.f15813f, (MutableState) this.f15812e, mutableState2, (n0.x) this.f15814j);
                    }
                }
                break;
            case 3:
                R2 r22 = (R2) this.f15813f;
                MutableState mutableState3 = (MutableState) this.f15809b;
                String pin = (String) mutableState3.getValue();
                Context context = (Context) this.f15812e;
                kotlin.jvm.internal.o.h(context, "context");
                String profileKey = r22.f7513a;
                kotlin.jvm.internal.o.h(profileKey, "profileKey");
                kotlin.jvm.internal.o.h(pin, "pin");
                String string = context.getApplicationContext().getSharedPreferences("debridstream_profile_pins", 0).getString(profileKey, null);
                boolean zEquals = string != null ? string.equals(S4.p.o1(pin).toString()) : false;
                MutableState mutableState4 = (MutableState) this.f15811d;
                if (zEquals) {
                    ((MutableState) this.f15810c).setValue(null);
                    mutableState3.setValue("");
                    mutableState4.setValue(null);
                    ((J4.c) this.f15814j).invoke(r22);
                } else {
                    mutableState4.setValue("Incorrect PIN");
                    mutableState3.setValue("");
                }
                break;
            default:
                J4.c cVar = (J4.c) this.f15809b;
                if (cVar != null) {
                    cVar.invoke(new D0((V4.C) this.f15810c, (n0.x) this.f15811d, (n0.x) this.f15812e, (D.H) this.f15813f, (State) this.f15814j, 1));
                }
                break;
        }
        return C3137A.f25453a;
    }

    public /* synthetic */ C1905m0(Object obj, Object obj2, Object obj3, MutableState mutableState, MutableState mutableState2, MutableState mutableState3, int i6) {
        this.f15808a = i6;
        this.f15812e = obj;
        this.f15813f = obj2;
        this.f15814j = obj3;
        this.f15809b = mutableState;
        this.f15810c = mutableState2;
        this.f15811d = mutableState3;
    }

    public /* synthetic */ C1905m0(Object obj, Object obj2, Object obj3, Object obj4, Object obj5, State state, int i6) {
        this.f15808a = i6;
        this.f15809b = obj;
        this.f15810c = obj2;
        this.f15811d = obj3;
        this.f15812e = obj4;
        this.f15813f = obj5;
        this.f15814j = state;
    }
}
