package Q0;

import com.google.firebase.firestore.core.DocumentViewChange;
import com.google.firebase.firestore.core.View;
import com.google.firebase.firestore.model.Document;
import com.google.firebase.firestore.model.DocumentSet;
import java.util.Comparator;
import m3.AbstractC2478m;

/* JADX INFO: loaded from: classes.dex */
public final /* synthetic */ class B implements Comparator {

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

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

    public /* synthetic */ B(Object obj, int i6) {
        this.f5723a = i6;
        this.f5724b = obj;
    }

    @Override // java.util.Comparator
    public final int compare(Object obj, Object obj2) {
        switch (this.f5723a) {
            case 0:
                return ((Number) ((l) this.f5724b).invoke(obj, obj2)).intValue();
            case 1:
                return ((View) this.f5724b).lambda$applyChanges$0((DocumentViewChange) obj, (DocumentViewChange) obj2);
            case 2:
                return DocumentSet.lambda$emptySet$0((Comparator) this.f5724b, (Document) obj, (Document) obj2);
            default:
                for (J4.c cVar : (J4.c[]) this.f5724b) {
                    int iD = AbstractC2478m.d((Comparable) cVar.invoke(obj), (Comparable) cVar.invoke(obj2));
                    if (iD != 0) {
                        return iD;
                    }
                }
                return 0;
        }
    }
}
