package com.google.firebase.firestore.remote;

import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.android.gms.tasks.TaskCompletionSource;
import com.google.firebase.firestore.remote.FirestoreChannel;
import k4.AbstractC2390c;
import k4.AbstractC2397j;

/* JADX INFO: loaded from: classes3.dex */
public final /* synthetic */ class f implements OnCompleteListener {

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

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

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

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

    public /* synthetic */ f(Task task, AbstractC2390c abstractC2390c, Task task2) {
        this.f14122a = 0;
        this.f14123b = task;
        this.f14125d = abstractC2390c;
        this.f14124c = task2;
    }

    @Override // com.google.android.gms.tasks.OnCompleteListener
    public final void onComplete(Task task) {
        switch (this.f14122a) {
            case 0:
                FirestoreCallCredentials.lambda$applyRequestMetadata$0((Task) this.f14123b, (AbstractC2390c) this.f14125d, (Task) this.f14124c, task);
                break;
            case 1:
                ((FirestoreChannel) this.f14123b).lambda$runBidiStreamingRpc$0((AbstractC2397j[]) this.f14124c, (IncomingStreamObserver) this.f14125d, task);
                break;
            case 2:
                ((FirestoreChannel) this.f14123b).lambda$runRpc$2((TaskCompletionSource) this.f14124c, this.f14125d, task);
                break;
            default:
                ((FirestoreChannel) this.f14123b).lambda$runStreamingResponseRpc$1((FirestoreChannel.StreamingListener) this.f14124c, this.f14125d, task);
                break;
        }
    }

    public /* synthetic */ f(FirestoreChannel firestoreChannel, Object obj, Object obj2, int i6) {
        this.f14122a = i6;
        this.f14123b = firestoreChannel;
        this.f14124c = obj;
        this.f14125d = obj2;
    }
}
