package com.google.firebase.firestore;

import android.app.Activity;
import com.google.firebase.firestore.core.AsyncEventListener;
import com.google.firebase.firestore.core.EventManager;
import com.google.firebase.firestore.core.FirestoreClient;
import com.google.firebase.firestore.util.Function;

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

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

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ EventManager.ListenOptions f13966b;

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

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

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

    public /* synthetic */ f(Object obj, EventManager.ListenOptions listenOptions, AsyncEventListener asyncEventListener, Activity activity, int i6) {
        this.f13965a = i6;
        this.f13969e = obj;
        this.f13966b = listenOptions;
        this.f13967c = asyncEventListener;
        this.f13968d = activity;
    }

    @Override // com.google.firebase.firestore.util.Function
    public final Object apply(Object obj) {
        FirestoreClient firestoreClient = (FirestoreClient) obj;
        switch (this.f13965a) {
            case 0:
                return DocumentReference.lambda$addSnapshotListenerInternal$8((com.google.firebase.firestore.core.Query) this.f13969e, this.f13966b, this.f13967c, this.f13968d, firestoreClient);
            default:
                return ((Query) this.f13969e).lambda$addSnapshotListenerInternal$5(this.f13966b, this.f13967c, this.f13968d, firestoreClient);
        }
    }
}
