package o;

import java.io.File;
import java.io.IOException;
import java.util.LinkedHashSet;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.lp, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C1802lp extends AbstractC0706aK implements NC {
    public final /* synthetic */ int m;
    public final /* synthetic */ C0041Bp n;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public /* synthetic */ C1802lp(C0041Bp c0041Bp, int i) {
        super(0);
        this.m = i;
        this.n = c0041Bp;
    }

    @Override // o.NC
    public final Object a() throws IOException {
        switch (this.m) {
            case 0:
                return ((C1343gy) this.n.j.getValue()).c;
            default:
                C1055dy c1055dy = this.n.a;
                File canonicalFile = ((File) c1055dy.c.a()).getCanonicalFile();
                synchronized (C1055dy.e) {
                    String absolutePath = canonicalFile.getAbsolutePath();
                    LinkedHashSet linkedHashSet = C1055dy.d;
                    if (linkedHashSet.contains(absolutePath)) {
                        throw new IllegalStateException(("There are multiple DataStores active for the same file: " + absolutePath + ". 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(absolutePath);
                }
                return new C1343gy(canonicalFile, c1055dy.a, (InterfaceC1754lI) c1055dy.b.g(canonicalFile), new U4(7, canonicalFile));
        }
    }
}
