package F5;

import android.view.ViewGroup;
import android.widget.TextView;
import com.google.android.gms.internal.measurement.C1;
import com.martsnew.domain.model.Genre;
import com.martsnew.tv.R;
import java.util.List;
import u5.AbstractC1620e;

/* JADX INFO: renamed from: F5.c, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C0116c extends G6.i implements O6.p {

    /* JADX INFO: renamed from: u, reason: collision with root package name */
    public /* synthetic */ Object f2532u;

    /* JADX INFO: renamed from: v, reason: collision with root package name */
    public final /* synthetic */ g f2533v;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C0116c(g gVar, E6.d dVar) {
        super(2, dVar);
        this.f2533v = gVar;
    }

    @Override // O6.p
    public final Object k(Object obj, Object obj2) throws Throwable {
        C0116c c0116c = (C0116c) m((E6.d) obj2, (List) obj);
        A6.n nVar = A6.n.f457a;
        c0116c.p(nVar);
        return nVar;
    }

    @Override // G6.a
    public final E6.d m(E6.d dVar, Object obj) {
        C0116c c0116c = new C0116c(this.f2533v, dVar);
        c0116c.f2532u = obj;
        return c0116c;
    }

    /* JADX WARN: Type inference fix 'apply assigned field type' failed
    java.lang.UnsupportedOperationException: ArgType.getObject(), call class: class jadx.core.dex.instructions.args.ArgType$UnknownArg
    	at jadx.core.dex.instructions.args.ArgType.getObject(ArgType.java:593)
    	at jadx.core.dex.attributes.nodes.ClassTypeVarsAttr.getTypeVarsMapFor(ClassTypeVarsAttr.java:35)
    	at jadx.core.dex.nodes.utils.TypeUtils.replaceClassGenerics(TypeUtils.java:177)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.insertExplicitUseCast(FixTypesVisitor.java:397)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.tryFieldTypeWithNewCasts(FixTypesVisitor.java:359)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.applyFieldType(FixTypesVisitor.java:309)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.visit(FixTypesVisitor.java:94)
     */
    @Override // G6.a
    public final Object p(Object obj) throws Throwable {
        C1.N(obj);
        List<Genre> list = (List) this.f2532u;
        if (!list.isEmpty()) {
            for (Genre genre : list) {
                g gVar = this.f2533v;
                AbstractC1620e abstractC1620e = gVar.f2545J0;
                if (abstractC1620e == null) {
                    P6.g.h("binding");
                    throw null;
                }
                TextView textView = new TextView(abstractC1620e.f17717L.getContext());
                textView.setFocusable(true);
                K2.f fVar = new K2.f(new ViewGroup.LayoutParams(-2, -2));
                fVar.f3557q = 1;
                fVar.f3558r = 0.0f;
                fVar.f3559s = 1.0f;
                fVar.f3560t = -1;
                fVar.f3561u = -1.0f;
                fVar.f3562v = -1;
                fVar.f3563w = -1;
                fVar.f3564x = 16777215;
                fVar.f3565y = 16777215;
                fVar.setMargins(0, 0, textView.getResources().getDimensionPixelSize(R.dimen.dp_36), textView.getResources().getDimensionPixelSize(R.dimen.dp_36));
                textView.setLayoutParams(fVar);
                textView.setTextSize(0, textView.getResources().getDimension(R.dimen.sp_36));
                AbstractC1620e abstractC1620e2 = gVar.f2545J0;
                if (abstractC1620e2 == null) {
                    P6.g.h("binding");
                    throw null;
                }
                textView.setTextColor(s7.d.p(abstractC1620e2.f17717L.getContext(), genre.f11050u ? R.color.color_text_genre_selected : R.color.color_text_genre_item));
                textView.setText(genre.f11047r);
                textView.setOnClickListener(new A5.b(gVar, 1, genre));
                AbstractC1620e abstractC1620e3 = gVar.f2545J0;
                if (abstractC1620e3 == null) {
                    P6.g.h("binding");
                    throw null;
                }
                abstractC1620e3.f17717L.addView(textView);
            }
        }
        return A6.n.f457a;
    }
}
