package W;

import java.util.LinkedHashSet;
import n4.u0;

/* JADX INFO: renamed from: W.m, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C0346m extends P6.h implements O6.a {

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

    /* JADX INFO: renamed from: s, reason: collision with root package name */
    public final /* synthetic */ K f7020s;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public /* synthetic */ C0346m(K k8, int i) {
        super(0);
        this.f7019r = i;
        this.f7020s = k8;
    }

    @Override // O6.a
    public final Object a() {
        switch (this.f7019r) {
            case u0.f15495q /* 0 */:
                return ((Y.i) this.f7020s.f6943j.getValue()).f7286c;
            default:
                Y.f fVar = this.f7020s.f6935a;
                String strP = ((x7.x) fVar.f7270d.getValue()).f18798q.p();
                synchronized (Y.f.f7266f) {
                    LinkedHashSet linkedHashSet = Y.f.f7265e;
                    if (linkedHashSet.contains(strP)) {
                        throw new IllegalStateException(("There are multiple DataStores active for the same file: " + strP + ". You should either maintain your DataStore as a singleton or confirm that there is no two DataStore's active on the same file (by confirming that the scope is cancelled).").toString());
                    }
                    linkedHashSet.add(strP);
                }
                return new Y.i(fVar.f7267a, (x7.x) fVar.f7270d.getValue(), (U) fVar.f7268b.k((x7.x) fVar.f7270d.getValue(), fVar.f7267a), new Y.e(fVar, 1));
        }
    }
}
