package o;

import android.content.Context;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.text.TextUtils;
import android.view.textclassifier.TextClassification;
import java.util.List;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.Bg, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final /* synthetic */ class C0032Bg implements SC {
    public final /* synthetic */ int l;
    public final /* synthetic */ Object m;
    public final /* synthetic */ Object n;

    public /* synthetic */ C0032Bg(int i, int i2, Object obj, Object obj2) {
        this.l = i2;
        this.m = obj;
        this.n = obj2;
    }

    @Override // o.SC
    public final Object f(Object obj, Object obj2) throws Throwable {
        Ue0 ue0;
        int i = this.l;
        Oh0 oh0 = Oh0.a;
        Object obj3 = this.n;
        Object obj4 = this.m;
        switch (i) {
            case 0:
                ((Integer) obj2).getClass();
                AbstractC2798wI.a(AbstractC1904ms0.D(1), (C0321Mk) obj, (OC) obj3, (MP) obj4);
                break;
            case 1:
                ((Integer) obj2).getClass();
                ((C0012Am) obj4).a((C3030ym) obj3, (C0321Mk) obj, AbstractC1904ms0.D(1));
                break;
            case 2:
                ((Integer) obj2).getClass();
                ((C0430Qp) obj4).a((C2062oc0) obj3, (C0321Mk) obj, AbstractC1904ms0.D(1));
                break;
            case 3:
                ((Integer) obj2).getClass();
                AbstractC0198Hq.a((C1968nd) obj4, (C1495id0) obj3, (C0321Mk) obj, AbstractC1904ms0.D(1));
                break;
            case 4:
                ((Integer) obj2).getClass();
                C60.g((String) obj4, (C0554Vj) obj3, (C0321Mk) obj, AbstractC1904ms0.D(55));
                break;
            case 5:
                ((Integer) obj2).getClass();
                C60.e((String) obj4, (String) obj3, (C0321Mk) obj, AbstractC1904ms0.D(55));
                break;
            case 6:
                ((Integer) obj2).getClass();
                As0.g((MP) obj4, (C0554Vj) obj3, (C0321Mk) obj, AbstractC1904ms0.D(49));
                break;
            case 7:
                ((Integer) obj2).getClass();
                ((C0669Zu) obj4).a((Drawable) obj3, (C0321Mk) obj, AbstractC1904ms0.D(49));
                break;
            default:
                C2066oe0 c2066oe0 = (C2066oe0) obj4;
                InterfaceC0065Cn interfaceC0065Cn = (InterfaceC0065Cn) obj3;
                C1303gd0 c1303gd0 = (C1303gd0) obj;
                Context context = (Context) obj2;
                boolean zBooleanValue = ((Boolean) c2066oe0.m.getValue()).booleanValue();
                C0977d7 c0977d7L = c2066oe0.l();
                TextClassification textClassification = null;
                String str = c0977d7L != null ? c0977d7L.m : null;
                Ue0 ue02 = c2066oe0.w;
                if (ue02 != null) {
                    long j = ue02.a;
                    InterfaceC1955nT interfaceC1955nT = c2066oe0.b;
                    ue0 = new Ue0(AbstractC2378rs0.u(interfaceC1955nT.p((int) (j >> 32)), interfaceC1955nT.p((int) (j & 4294967295L))));
                } else {
                    ue0 = null;
                }
                C2149pX c2149pX = c2066oe0.j;
                C1358h6 c1358h6 = new C1358h6(c2066oe0, interfaceC0065Cn, context, 10);
                Ma0 ma0 = AbstractC2338rX.a;
                if (Build.VERSION.SDK_INT >= 28 && str != null && ue0 != null && c2149pX != null && (c2149pX instanceof C2149pX)) {
                    long j2 = ue0.a;
                    Object obj5 = c2149pX.h;
                    C2427sR c2427sR = c2149pX.e;
                    if (c2427sR.e()) {
                        C1207fd0 c1207fd0 = (C1207fd0) c2149pX.g.getValue();
                        TextClassification textClassification2 = (c1207fd0 != null && Ue0.b(j2, c1207fd0.b) && F3.c(str, c1207fd0.a)) ? c1207fd0.c : null;
                        c2427sR.f(null);
                        textClassification = textClassification2;
                    }
                    if (textClassification == null) {
                        c1358h6.g(c1303gd0);
                    } else {
                        if (!textClassification.getActions().isEmpty()) {
                            c1303gd0.a.a(new C2633ud0(obj5, textClassification, 0));
                        } else if ((textClassification.getIcon() != null || !TextUtils.isEmpty(textClassification.getLabel())) && (textClassification.getIntent() != null || textClassification.getOnClickListener() != null)) {
                            c1303gd0.a.a(new C2633ud0(obj5, textClassification, -1));
                        }
                        c1358h6.g(c1303gd0);
                        List actions = textClassification.getActions();
                        int size = actions.size();
                        for (int i2 = 0; i2 < size; i2++) {
                            AbstractC0719aX.y(actions.get(i2));
                            if (i2 > 0) {
                                c1303gd0.a.a(new C2633ud0(obj5, textClassification, i2));
                            }
                        }
                    }
                    C2887xC.f(c1303gd0, context, zBooleanValue, str, ue0.a);
                    break;
                } else {
                    c1358h6.g(c1303gd0);
                    if (str != null && ue0 != null) {
                        C2887xC.f(c1303gd0, context, zBooleanValue, str, ue0.a);
                        break;
                    }
                }
                break;
        }
        return oh0;
    }

    public /* synthetic */ C0032Bg(C2066oe0 c2066oe0, InterfaceC0065Cn interfaceC0065Cn) {
        this.l = 8;
        this.m = c2066oe0;
        this.n = interfaceC0065Cn;
    }
}
