package com.scb.phone.view.custom.easycash; import android.content.Context; import android.content.res.TypedArray; import android.graphics.Rect; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.LinearLayout; import android.widget.TextView; import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.RecyclerView; import butterknife.BindView; import butterknife.ButterKnife; import com.scb.phone.R; import com.scb.phone.view.adapter.easycash.CustomCheckboxAdapter; import com.scb.phone.view.custom.easycash.CustomCheckBoxLayout; import java.util.List; import o.C15715hv; import o.C6583cXR; import o.GEP; import o.JM; import o.Jel; import o.PRA; import o.YKU; import o.gjJ; /* loaded from: classes5.dex */ public class CustomCheckBoxLayout extends LinearLayout { public CustomCheckboxAdapter d; @BindView public TextView errorMessage; @BindView public RecyclerView rvCustomCheckBox; public CustomCheckBoxLayout(Context context) { this(context, null); } public CustomCheckBoxLayout(Context context, AttributeSet attributeSet) { this(context, attributeSet, 0); } public CustomCheckBoxLayout(Context context, AttributeSet attributeSet, int i) { super(context, attributeSet, i); ((LayoutInflater) context.getSystemService("layout_inflater")).inflate(R.layout.2131558944, (ViewGroup) this, true); byte b = 0; TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, C15715hv.jbe.CustomCheckBoxLayout, 0, 0); try { String string = obtainStyledAttributes.getString(0); int i2 = obtainStyledAttributes.getInt(1, 8); obtainStyledAttributes.recycle(); ButterKnife.c(this); RecyclerView recyclerView = this.rvCustomCheckBox; getContext(); recyclerView.setLayoutManager(new GridLayoutManager(2, (byte) 0)); this.rvCustomCheckBox.d(new IeS(this, C6583cXR.d(i2, getContext()), b), -1); if (gjJ.b((CharSequence) string)) { this.errorMessage.setText(string); } } catch (Throwable th) { obtainStyledAttributes.recycle(); throw th; } } public void setCreditPowerTileDisplayList(List list) { CustomCheckboxAdapter customCheckboxAdapter = this.d; customCheckboxAdapter.a = list; customCheckboxAdapter.notifyDataSetChanged(); } /* loaded from: classes5.dex */ class IeS extends RecyclerView.ZqN { private int b; private CustomCheckBoxLayout d; private IeS(CustomCheckBoxLayout customCheckBoxLayout, int i) { this.d = customCheckBoxLayout; this.b = i; } @Override // androidx.recyclerview.widget.RecyclerView.ZqN public final void apG_(Rect rect, View view, RecyclerView recyclerView, RecyclerView.AcL acL) { rect.top = this.b; rect.right = this.b; rect.bottom = this.b; rect.left = this.b; } /* synthetic */ IeS(CustomCheckBoxLayout customCheckBoxLayout, int i, byte b) { this(customCheckBoxLayout, i); } } public static /* synthetic */ boolean d(JM jm) { if (jm == null) { return false; } return jm.j.booleanValue(); } public final List a() { YKU yku = new YKU(this.d.a); return (List) new YKU(yku.a, new GEP(yku.b, new Jel() { // from class: o.eCN @Override // o.Jel public final boolean e(Object obj) { return CustomCheckBoxLayout.d((JM) obj); } })).a(new PRA.Sts(new PRA.AnonymousClass4(), new PRA.AnonymousClass8())); } }