package g3;

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

/* JADX INFO: loaded from: classes.dex */
public final class h extends C4.j implements J4.e {

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

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

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

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

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

    @Override // C4.a
    public final A4.d create(Object obj, A4.d dVar) {
        return new h(this.f16493b, this.f16494c, this.f16495d, dVar);
    }

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

    @Override // C4.a
    public final Object invokeSuspend(Object obj) throws Exception {
        B4.a aVar = B4.a.f492a;
        int i6 = this.f16492a;
        if (i6 == 0) {
            AbstractC2467b.l(obj);
            FirebaseFirestore firebaseFirestore = FirebaseFirestore.getInstance();
            kotlin.jvm.internal.o.g(firebaseFirestore, "getInstance(...)");
            DocumentReference documentReferenceDocument = firebaseFirestore.collection("accountSync").document(this.f16493b);
            kotlin.jvm.internal.o.g(documentReferenceDocument, "document(...)");
            Task taskRunTransaction = firebaseFirestore.runTransaction(new C2065g(documentReferenceDocument, this.f16494c, this.f16495d, 0));
            kotlin.jvm.internal.o.g(taskRunTransaction, "runTransaction(...)");
            this.f16492a = 1;
            obj = W0.e.h(taskRunTransaction, this);
            if (obj == aVar) {
                return aVar;
            }
        } else {
            if (i6 != 1) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            AbstractC2467b.l(obj);
        }
        return (Transaction) obj;
    }
}
