package com.scb.phone.view.fragment.ccrredemption.oprredemption; import android.graphics.PorterDuff; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.ProgressBar; import android.widget.TextView; import butterknife.BindView; import butterknife.ButterKnife; import com.scb.phone.R; import o.C0490Hu; import o.C0579JxJ; import o.C3247ats; import o.EnumC0496Hy; import o.EnumC12984fNP; import o.InterfaceC13391fZD; import o.InterfaceC9041dcI; import o.ZI; import o.nMh; /* loaded from: classes5.dex */ public class CurrentCycleInfoFragment extends Hilt_CurrentCycleInfoFragment implements InterfaceC9041dcI { @BindView TextView currentSpendingValue; @BindView ImageView leftTierImage; @BindView TextView leftTierLabel; @BindView TextView leftTierValue; @InterfaceC13391fZD public C0579JxJ picassoFactory; @InterfaceC13391fZD public C3247ats presenter; @BindView ImageView rightTierImage; @BindView TextView rightTierLabel; @BindView TextView rightTierValue; @BindView ProgressBar spendingProgressBar; public static CurrentCycleInfoFragment c(C0490Hu c0490Hu) { Bundle bundle = new Bundle(); bundle.putParcelable("CurrentCycleInfoFragment.CURRENT_CYCLE_MODEL_EXTRA", c0490Hu); CurrentCycleInfoFragment currentCycleInfoFragment = new CurrentCycleInfoFragment(); currentCycleInfoFragment.setArguments(bundle); return currentCycleInfoFragment; } @Override // androidx.fragment.app.Fragment public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) { View inflate = layoutInflater.inflate(R.layout.2131559531, viewGroup, false); ButterKnife.c(this, inflate); this.presenter.e((C3247ats) this); final C0490Hu c0490Hu = (C0490Hu) getArguments().getParcelable("CurrentCycleInfoFragment.CURRENT_CYCLE_MODEL_EXTRA"); C3247ats c3247ats = this.presenter; ZI.IeS ieS = new ZI.IeS(c0490Hu) { // from class: o.atr private C0490Hu a; @Override // o.ZI.IeS public final void e(Object obj) { ((InterfaceC9041dcI) obj).d(this.a); } { this.a = c0490Hu; } }; if (c3247ats.f != 0) { ieS.e(c3247ats.f); } return inflate; } @Override // o.InterfaceC9041dcI public final void d(C0490Hu c0490Hu) { String obj; String obj2; this.leftTierLabel.setText(c0490Hu.f); this.leftTierValue.setText(c0490Hu.h); this.rightTierLabel.setText(c0490Hu.i); this.rightTierValue.setText(c0490Hu.m); this.currentSpendingValue.setText(c0490Hu.c); this.spendingProgressBar.setMax(c0490Hu.l - c0490Hu.g); this.spendingProgressBar.setProgress(c0490Hu.b - c0490Hu.g); if (c0490Hu.n != EnumC0496Hy.NONE) { StringBuilder sb = new StringBuilder("https://fasteasy.scbeasy.com:8888/api/ccrewardredemption/"); sb.append(c0490Hu.e); obj = sb.toString(); } else { obj = c0490Hu.e; } if (c0490Hu.n != EnumC0496Hy.NONE) { StringBuilder sb2 = new StringBuilder("https://fasteasy.scbeasy.com:8888/api/ccrewardredemption/"); sb2.append(c0490Hu.j); obj2 = sb2.toString(); } else { obj2 = c0490Hu.j; } this.picassoFactory.c.e(obj).b(R.drawable.placeholder_tier_grey).e(R.drawable.placeholder_tier_grey).a(EnumC12984fNP.NO_STORE, new EnumC12984fNP[0]).aBu_(this.leftTierImage, null); this.picassoFactory.c.e(obj2).b(R.drawable.placeholder_tier_grey).e(R.drawable.placeholder_tier_grey).a(EnumC12984fNP.NO_STORE, new EnumC12984fNP[0]).aBu_(this.rightTierImage, null); EnumC0496Hy enumC0496Hy = c0490Hu.n; if (enumC0496Hy == EnumC0496Hy.LEFT) { this.leftTierImage.setColorFilter(nMh.getColor(getActivity(), R.color.f2112131099717), PorterDuff.Mode.SRC_IN); } else if (enumC0496Hy == EnumC0496Hy.RIGHT) { this.rightTierImage.setColorFilter(nMh.getColor(getActivity(), R.color.f2112131099717), PorterDuff.Mode.SRC_IN); } } }