package com.scb.phone.view.fragment.scheduledtransaction; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import butterknife.BindView; import butterknife.ButterKnife; import com.scb.phone.R; import com.scb.phone.view.activity.scheduledtransaction.CalendarDialogActivity; import com.scb.phone.view.custom.common.ScheduleDate; import o.InterfaceC12869fJm; import o.InterfaceC8931daE; import o.VN; import o.cXG; import org.threeten.bp.OffsetDateTime; /* loaded from: classes5.dex */ public class ScheduleOnceFragment extends Hilt_ScheduleOnceFragment implements InterfaceC12869fJm { private boolean c = false; private InterfaceC8931daE d; private OffsetDateTime i; @BindView ScheduleDate paymentDate; @Override // androidx.fragment.app.Fragment public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) { View inflate = layoutInflater.inflate(R.layout.2131559902, viewGroup, false); ButterKnife.c(this, inflate); OffsetDateTime plusDays = this.d.e().d.plusDays(1L); this.i = plusDays; this.d.d(new VN("O", plusDays.toString(), this.i.toString(), ""), "O"); this.paymentDate.setOnSelectDateListener(this); this.paymentDate.setDateHint(getString(R.string.schedule_setup_once_select_date)); return inflate; } @Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment public void onActivityResult(int i, int i2, Intent intent) { this.c = false; if (i == 0 && i2 == -1) { this.i = (OffsetDateTime) intent.getSerializableExtra("com.scb.phone.EXTRA_DATE"); Context requireContext = requireContext(); this.paymentDate.setDateField(cXG.VL_(requireContext.getResources(), "dd MMM yyyy", this.i)); this.d.a(); this.d.d(new VN("O", this.i.toString(), this.i.toString(), ""), "O"); } } @Override // o.InterfaceC12869fJm public final void b() { if (this.c) { return; } this.c = true; startActivityForResult(CalendarDialogActivity.alH_(getContext(), 0, null, null, this.d.e().i, this.d.e().a, this.d.e().d), 0); } /* JADX WARN: Multi-variable type inference failed */ @Override // com.scb.phone.view.fragment.scheduledtransaction.Hilt_ScheduleOnceFragment, com.scb.phone.view.fragment.Hilt_BaseFragment, androidx.fragment.app.Fragment public void onAttach(Context context) { super.onAttach(context); if (this.d == null) { if (context instanceof InterfaceC8931daE) { this.d = (InterfaceC8931daE) context; } else { if (getParentFragment() instanceof InterfaceC8931daE) { this.d = (InterfaceC8931daE) getParentFragment(); return; } throw new ClassCastException(); } } } @Override // androidx.fragment.app.Fragment public void onDetach() { super.onDetach(); this.d = null; } }