package E1;

import android.content.Context;
import android.content.ContextWrapper;
import android.view.View;
import com.martsnew.tv.R;
import java.lang.ref.WeakReference;
import n4.u0;

/* JADX INFO: renamed from: E1.c, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C0096c extends P6.h implements O6.l {

    /* JADX INFO: renamed from: s, reason: collision with root package name */
    public static final C0096c f2064s = new C0096c(1, 0);

    /* JADX INFO: renamed from: t, reason: collision with root package name */
    public static final C0096c f2065t = new C0096c(1, 1);

    /* JADX INFO: renamed from: u, reason: collision with root package name */
    public static final C0096c f2066u = new C0096c(1, 2);

    /* JADX INFO: renamed from: v, reason: collision with root package name */
    public static final C0096c f2067v = new C0096c(1, 3);

    /* JADX INFO: renamed from: w, reason: collision with root package name */
    public static final C0096c f2068w = new C0096c(1, 4);

    /* JADX INFO: renamed from: x, reason: collision with root package name */
    public static final C0096c f2069x = new C0096c(1, 5);

    /* JADX INFO: renamed from: y, reason: collision with root package name */
    public static final C0096c f2070y = new C0096c(1, 6);

    /* JADX INFO: renamed from: z, reason: collision with root package name */
    public static final C0096c f2071z = new C0096c(1, 7);

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

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public /* synthetic */ C0096c(int i, int i5) {
        super(i);
        this.f2072r = i5;
    }

    @Override // O6.l
    public final Object b(Object obj) {
        switch (this.f2072r) {
            case u0.f15495q /* 0 */:
                Context context = (Context) obj;
                P6.g.e(context, "it");
                if (context instanceof ContextWrapper) {
                    return ((ContextWrapper) context).getBaseContext();
                }
                return null;
            case 1:
                Context context2 = (Context) obj;
                P6.g.e(context2, "it");
                if (context2 instanceof ContextWrapper) {
                    return ((ContextWrapper) context2).getBaseContext();
                }
                return null;
            case 2:
                A a3 = (A) obj;
                P6.g.e(a3, "destination");
                D d8 = a3.f1979r;
                if (d8 == null || d8.f1991B != a3.f1985x) {
                    return null;
                }
                return d8;
            case 3:
                A a8 = (A) obj;
                P6.g.e(a8, "destination");
                D d9 = a8.f1979r;
                if (d9 == null || d9.f1991B != a8.f1985x) {
                    return null;
                }
                return d9;
            case 4:
                A a9 = (A) obj;
                P6.g.e(a9, "it");
                return a9.f1979r;
            case 5:
                A a10 = (A) obj;
                P6.g.e(a10, "it");
                if (!(a10 instanceof D)) {
                    return null;
                }
                D d10 = (D) a10;
                return d10.i(d10.f1991B, true);
            case Z.g.STRING_SET_FIELD_NUMBER /* 6 */:
                View view = (View) obj;
                P6.g.e(view, "it");
                Object parent = view.getParent();
                if (parent instanceof View) {
                    return (View) parent;
                }
                return null;
            default:
                View view2 = (View) obj;
                P6.g.e(view2, "it");
                Object tag = view2.getTag(R.id.nav_controller_view_tag);
                if (tag instanceof WeakReference) {
                    return (F) ((WeakReference) tag).get();
                }
                if (tag instanceof F) {
                    return (F) tag;
                }
                return null;
        }
    }
}
