package IMuAHx_6.QxJ9d_1.KQgRr5e_0.Mqv2r_3;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.recyclerview.widget.RecyclerView;
import com.FDJAfGbVdJFkP.fpOujAROks.R;
import com.webh5app.wrap.config.ButtonItem;
import java.util.List;
/* compiled from: NavListAdapter.java */
/* loaded from: classes.dex */
public class KQgRr5e_0 extends RecyclerView.IMuAHx_6 {
    public int KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public IMuAHx_6.QxJ9d_1.KQgRr5e_0.Mqv2r_3.QxJ9d_1 f293KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public Context f294KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public List<ButtonItem> f295KQgRr5e_0;
    public int QxJ9d_1;

    /* compiled from: NavListAdapter.java */
    /* renamed from: IMuAHx_6.QxJ9d_1.KQgRr5e_0.Mqv2r_3.KQgRr5e_0$KQgRr5e_0  reason: collision with other inner class name */
    /* loaded from: classes.dex */
    public class View$OnClickListenerC0021KQgRr5e_0 implements View.OnClickListener {

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public final /* synthetic */ RecyclerView.WGk6X_27 f296KQgRr5e_0;

        public View$OnClickListenerC0021KQgRr5e_0(RecyclerView.WGk6X_27 wGk6X_27) {
            this.f296KQgRr5e_0 = wGk6X_27;
        }

        @Override // android.view.View.OnClickListener
        public void onClick(View view) {
            KQgRr5e_0.this.f293KQgRr5e_0.KQgRr5e_0(this.f296KQgRr5e_0.itemView, this.f296KQgRr5e_0.getLayoutPosition());
        }
    }

    /* compiled from: NavListAdapter.java */
    /* loaded from: classes.dex */
    public class PGPF6hQ_2 extends RecyclerView.WGk6X_27 {
        public View KQgRr5e_0;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public ImageView f297KQgRr5e_0;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public TextView f298KQgRr5e_0;

        public PGPF6hQ_2(KQgRr5e_0 kQgRr5e_0, View view) {
            super(view);
            this.f298KQgRr5e_0 = (TextView) view.findViewById(R.id.bottom_navlist_text);
            this.f297KQgRr5e_0 = (ImageView) view.findViewById(R.id.bottom_navlist_icon);
            this.KQgRr5e_0 = view.findViewById(R.id.navlist_divider);
        }
    }

    /* compiled from: NavListAdapter.java */
    /* loaded from: classes.dex */
    public class QxJ9d_1 implements View.OnLongClickListener {

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public final /* synthetic */ RecyclerView.WGk6X_27 f299KQgRr5e_0;

        public QxJ9d_1(RecyclerView.WGk6X_27 wGk6X_27) {
            this.f299KQgRr5e_0 = wGk6X_27;
        }

        @Override // android.view.View.OnLongClickListener
        public boolean onLongClick(View view) {
            KQgRr5e_0.this.f293KQgRr5e_0.QxJ9d_1(this.f299KQgRr5e_0.itemView, this.f299KQgRr5e_0.getLayoutPosition());
            return false;
        }
    }

    public KQgRr5e_0(Context context, List<ButtonItem> list, int i, int i2) {
        this.f294KQgRr5e_0 = context;
        this.KQgRr5e_0 = i;
        this.QxJ9d_1 = i2;
        this.f295KQgRr5e_0 = list;
    }

    @Override // androidx.recyclerview.widget.RecyclerView.IMuAHx_6
    public int getItemCount() {
        return this.f295KQgRr5e_0.size();
    }

    @Override // androidx.recyclerview.widget.RecyclerView.IMuAHx_6
    public void onBindViewHolder(RecyclerView.WGk6X_27 wGk6X_27, int i) {
        ButtonItem buttonItem = this.f295KQgRr5e_0.get(i);
        PGPF6hQ_2 pGPF6hQ_2 = (PGPF6hQ_2) wGk6X_27;
        pGPF6hQ_2.f298KQgRr5e_0.setText(buttonItem.label);
        pGPF6hQ_2.f297KQgRr5e_0.setImageDrawable(this.f294KQgRr5e_0.getResources().getDrawable(this.f294KQgRr5e_0.getResources().getIdentifier(buttonItem.icon, "drawable", this.f294KQgRr5e_0.getPackageName())));
        pGPF6hQ_2.f297KQgRr5e_0.setColorFilter(this.KQgRr5e_0);
        pGPF6hQ_2.f298KQgRr5e_0.setTextColor(this.KQgRr5e_0);
        pGPF6hQ_2.KQgRr5e_0.setBackgroundColor(this.QxJ9d_1);
        if (i == this.f295KQgRr5e_0.size() - 1) {
            pGPF6hQ_2.KQgRr5e_0.setVisibility(4);
        }
        if (this.f293KQgRr5e_0 != null) {
            wGk6X_27.itemView.setOnClickListener(new View$OnClickListenerC0021KQgRr5e_0(wGk6X_27));
            wGk6X_27.itemView.setOnLongClickListener(new QxJ9d_1(wGk6X_27));
        }
    }

    @Override // androidx.recyclerview.widget.RecyclerView.IMuAHx_6
    public RecyclerView.WGk6X_27 onCreateViewHolder(ViewGroup viewGroup, int i) {
        return new PGPF6hQ_2(this, LayoutInflater.from(this.f294KQgRr5e_0).inflate(R.layout.navlist_item, viewGroup, false));
    }

    public void KQgRr5e_0(IMuAHx_6.QxJ9d_1.KQgRr5e_0.Mqv2r_3.QxJ9d_1 qxJ9d_1) {
        this.f293KQgRr5e_0 = qxJ9d_1;
    }
}
