package com.scb.phone.view.fragment.sme.gifting; import android.content.Intent; import android.os.Bundle; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; import com.scb.phone.R; import com.scb.phone.view.activity.sme.gifting.GiftPreviewActivity; import com.scb.phone.view.custom.common.CustomSelectAccountGift; import com.scb.phone.view.custom.common.DefaultButton; import com.scb.phone.view.custom.common.NoteEditText; import com.scb.phone.view.custom.transferandpay.CustomTransferAndPayBiller; import com.scb.phone.view.fragment.sme.gifting.BaseGiftTransferInputFragment; import java.util.concurrent.TimeUnit; import o.AbstractC13163fSk; import o.C12891fKc; import o.C13417fZt; import o.InterfaceC12846fIu; import o.InterfaceC12872fJp; import o.InterfaceC6673cZp; import o.WG; import o.WI; import o.WM; import o.fRR; import o.fSJ; import o.fSQ; import o.nMh; /* loaded from: classes5.dex */ public abstract class BaseGiftTransferInputFragment extends Hilt_BaseGiftTransferInputFragment implements InterfaceC6673cZp.jNh, InterfaceC12872fJp, InterfaceC12846fIu { protected fSJ c; @BindView protected CustomSelectAccountGift customSelectAccountGift; @BindView protected CustomTransferAndPayBiller customTransferAndPayBiller; @BindView protected TextView giftTransferDescription; @BindView protected ImageView giftTransferImage; @BindView protected TextView giftTransferTitle; @BindView protected NoteEditText noteEditText; @BindView protected DefaultButton previewButton; @BindView protected DefaultButton sendGiftButton; protected abstract void c(WG wg); public abstract void g(); protected abstract void j(); /* JADX INFO: Access modifiers changed from: protected */ @OnClick public abstract void onPreviewButtonClicked(); @Override // androidx.fragment.app.Fragment public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) { View axz_ = axz_(layoutInflater, viewGroup); this.sendGiftButton.setButtonEnabled(false); this.customSelectAccountGift.setOnSelectAccountGiftListener(this); this.customTransferAndPayBiller.setEditButtonImage(); this.customTransferAndPayBiller.setOnCustomTransferAndPayItemListener(this); this.c = AbstractC13163fSk.interval(1L, TimeUnit.SECONDS).observeOn(fRR.e()).subscribeOn(C13417fZt.c()).subscribe(new fSQ(this) { // from class: o.fBu private BaseGiftTransferInputFragment e; @Override // o.fSQ public final void c(Object obj) { this.e.g(); } { this.e = this; } }, new fSQ() { // from class: o.fBv @Override // o.fSQ public final void c(Object obj) { guQ.a((Throwable) obj); } }); return axz_; } protected View axz_(LayoutInflater layoutInflater, ViewGroup viewGroup) { View inflate = layoutInflater.inflate(R.layout.2131559676, viewGroup, false); ButterKnife.c(this, inflate); return inflate; } @Override // o.InterfaceC6673cZp.jNh public final void a(WM wm) { getContext(); C12891fKc.azn_(nMh.getDrawable(getContext(), R.color.f3412131099849), this.giftTransferImage, wm.h); this.giftTransferTitle.setText(wm.i); this.giftTransferDescription.setText(wm.c); } @Override // o.InterfaceC6673cZp.jNh public final void b(WG wg) { this.customSelectAccountGift.setVisibility(8); if (TextUtils.isEmpty(wg.f)) { this.customTransferAndPayBiller.setTitle(wg.d); CustomTransferAndPayBiller customTransferAndPayBiller = this.customTransferAndPayBiller; customTransferAndPayBiller.mDescriptionTextView.setText(""); customTransferAndPayBiller.mDescriptionTextView.setVisibility(8); } else { this.customTransferAndPayBiller.setTitle(wg.f); this.customTransferAndPayBiller.setDescription(wg.d); } this.customTransferAndPayBiller.setAvatar(wg.b); this.customTransferAndPayBiller.setVisibility(0); } @Override // o.InterfaceC6673cZp.jNh public final void e() { this.customSelectAccountGift.setVisibility(0); this.customTransferAndPayBiller.setVisibility(8); } @Override // o.InterfaceC6673cZp.jNh public final void b() { this.noteEditText.d(); } @Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment public void onActivityResult(int i, int i2, Intent intent) { super.onActivityResult(i, i2, intent); if (i == 100 && i2 == -1) { c((WG) intent.getParcelableExtra("GIFT_RECIPIENT_INFO")); } } @Override // o.InterfaceC12846fIu public final void aT_() { i(); } @Override // o.InterfaceC6673cZp.jNh public final void a(WI wi) { Intent intent = new Intent(getActivity(), (Class) GiftPreviewActivity.class); intent.putExtra("EXTRA_GIFT_STATUS_SELECTED", wi); startActivity(intent); } @OnClick public void onSendGiftButtonClicked() { j(); } @Override // o.InterfaceC6673cZp.jNh public final void f() { this.sendGiftButton.setButtonEnabled(!r0.isEnabled()); } }