package g3;

import V4.C;
import com.google.android.gms.tasks.Task;
import com.google.firebase.firestore.DocumentReference;
import com.google.firebase.firestore.FieldValue;
import com.google.firebase.firestore.FirebaseFirestore;
import m3.AbstractC2467b;
import w4.C3137A;

/* JADX INFO: renamed from: g3.d, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C2062d extends C4.j implements J4.e {

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

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

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

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

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

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C2062d(String str, String str2, String str3, A4.d dVar) {
        super(2, dVar);
        this.f16476c = str;
        this.f16477d = str2;
        this.f16478e = str3;
    }

    @Override // C4.a
    public final A4.d create(Object obj, A4.d dVar) {
        C2062d c2062d = new C2062d(this.f16476c, this.f16477d, this.f16478e, dVar);
        c2062d.f16475b = obj;
        return c2062d;
    }

    @Override // J4.e
    public final Object invoke(Object obj, Object obj2) {
        return ((C2062d) create((C) obj, (A4.d) obj2)).invokeSuspend(C3137A.f25453a);
    }

    @Override // C4.a
    public final Object invokeSuspend(Object obj) {
        Object objD;
        B4.a aVar = B4.a.f492a;
        int i6 = this.f16474a;
        try {
            if (i6 == 0) {
                AbstractC2467b.l(obj);
                FirebaseFirestore firebaseFirestore = FirebaseFirestore.getInstance();
                kotlin.jvm.internal.o.g(firebaseFirestore, "getInstance(...)");
                DocumentReference documentReferenceDocument = firebaseFirestore.collection("accountSync").document(this.f16476c);
                kotlin.jvm.internal.o.g(documentReferenceDocument, "document(...)");
                Task<Void> taskUpdate = firebaseFirestore.document(documentReferenceDocument.getPath()).update(this.f16477d + ".progress." + this.f16478e, FieldValue.delete(), new Object[0]);
                kotlin.jvm.internal.o.g(taskUpdate, "update(...)");
                this.f16474a = 1;
                obj = W0.e.h(taskUpdate, this);
                if (obj == aVar) {
                    return aVar;
                }
            } else {
                if (i6 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                AbstractC2467b.l(obj);
            }
            objD = (Void) obj;
        } catch (Throwable th) {
            objD = AbstractC2467b.d(th);
        }
        w4.n.a(objD);
        return new w4.n(objD);
    }
}
