package com.google.firebase.firestore.local;

import android.database.Cursor;
import android.util.SparseArray;
import com.google.firebase.firestore.core.Target;
import com.google.firebase.firestore.local.SQLiteTargetCache;
import com.google.firebase.firestore.model.DocumentKey;
import com.google.firebase.firestore.model.FieldIndex;
import com.google.firebase.firestore.util.BackgroundQueue;
import com.google.firebase.firestore.util.Consumer;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.TreeSet;

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

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

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

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

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

    public /* synthetic */ x(Object obj, Object obj2, Object obj3, int i6) {
        this.f14085a = i6;
        this.f14086b = obj;
        this.f14087c = obj2;
        this.f14088d = obj3;
    }

    @Override // com.google.firebase.firestore.util.Consumer
    public final void accept(Object obj) {
        switch (this.f14085a) {
            case 0:
                SQLiteIndexManager.lambda$getExistingIndexEntries$6((TreeSet) this.f14086b, (FieldIndex) this.f14087c, (DocumentKey) this.f14088d, (Cursor) obj);
                break;
            case 1:
                ((SQLiteMutationQueue) this.f14086b).lambda$getAllMutationBatchesAffectingDocumentKeys$8((HashSet) this.f14087c, (ArrayList) this.f14088d, (Cursor) obj);
                break;
            case 2:
                ((SQLiteRemoteDocumentCache) this.f14086b).lambda$getAll$0((BackgroundQueue) this.f14087c, (HashMap) this.f14088d, (Cursor) obj);
                break;
            case 3:
                ((SQLiteTargetCache) this.f14086b).lambda$removeQueries$2((SparseArray) this.f14087c, (int[]) this.f14088d, (Cursor) obj);
                break;
            case 4:
                ((SQLiteTargetCache) this.f14086b).lambda$getTargetData$3((Target) this.f14087c, (SQLiteTargetCache.TargetDataHolder) this.f14088d, (Cursor) obj);
                break;
            default:
                ((SQLiteDocumentOverlayCache) this.f14086b).lambda$processSingleCollection$1((BackgroundQueue) this.f14087c, (Map) this.f14088d, (Cursor) obj);
                break;
        }
    }
}
