package com.ss.android.ugc.aweme.account.bind;

import X.2nK;
import X.7he;
import X.C1666Rlm;
import X.C1911Rpj;
import X.C1912Rpk;
import X.C1984Rqu;
import X.C2133RtJ;
import X.C2189RuD;
import X.C2196RuK;
import X.C2202RuQ;
import X.C2206RuU;
import X.C2210RuY;
import X.Crj;
import X.M12;
import X.PgW;
import X.Pmr;
import android.os.Bundle;
import android.view.View;
import com.bytedance.covode.number.Covode;
import com.ss.android.ugc.aweme.account.login.v2.ui.fragments.InputCodeFragmentV2;
import java.util.HashMap;
import kotlin.h.b.n;

public final class BindEmailCodeVerifyFragment extends InputCodeFragmentV2 {
    public final Crj LIZ = 7he.LIZ(new C2210RuY(this));
    public final Crj LIZIZ = 7he.LIZ(new C2189RuD(this));
    public HashMap LJIILIIL;

    static {
        Covode.recordClassIndex(50659);
    }

    private String LJIIJJI() {
        return (String) this.LIZ.getValue();
    }

    public final View LIZ(int i) {
        if (this.LJIILIIL == null) {
            this.LJIILIIL = new HashMap();
        }
        View view = (View) this.LJIILIIL.get(Integer.valueOf(i));
        if (view != null) {
            return view;
        }
        View view2 = getView();
        if (view2 == null) {
            return null;
        }
        View findViewById = view2.findViewById(i);
        this.LJIILIIL.put(Integer.valueOf(i), findViewById);
        return findViewById;
    }

    public final boolean LJIIIIZZ() {
        return ((Boolean) this.LIZIZ.getValue()).booleanValue();
    }

    public final void LJIIJ() {
        HashMap hashMap = this.LJIILIIL;
        if (hashMap != null) {
            hashMap.clear();
        }
    }

    public final /* synthetic */ void onDestroyView() {
        super.onDestroyView();
        LJIIJ();
    }

    public final C2196RuK LJII() {
        C2196RuK ruK = new C2196RuK();
        ruK.LIZ(LJIIJJI());
        ruK.LIZIZ = false;
        ruK.LIZLLL = C2133RtJ.LIZ.LIZLLL(this);
        return ruK;
    }

    public final C2202RuQ LIZLLL() {
        C2202RuQ ruQ = new C2202RuQ((String) null, (String) null, false, (String) null, (String) null, false, (String) null, false, false, 2047);
        ruQ.LJ = getString(2131823119);
        ruQ.LJFF = getString(2131823120, new Object[]{LJIIJJI()});
        ruQ.LIZ = " ";
        ruQ.LJIIIZ = false;
        return ruQ;
    }

    public final void LJIIIZ() {
        if (LJIIIIZZ()) {
            2nK.onEventV3("resend_code_email");
        }
        ((PgW) BindEmailFragment.LIZIZ.invoke(this, LJIIJJI(), "resend")).LIZLLL(new C2206RuU(this)).LIZLLL();
    }

    public final void LIZ(String str) {
        M12.LIZ(str);
        String LJIIJJI = LJIIJJI();
        Bundle arguments = getArguments();
        if (arguments == null) {
            n.LIZIZ();
        }
        boolean z = arguments.getBoolean("from_changePwd", false);
        M12.LIZ(this, LJIIJJI, str);
        PgW LIZIZ2 = PgW.LIZ(new C1666Rlm(this, LJIIJJI, str, z)).LIZLLL(new C1912Rpk(this)).LIZIZ(new C1911Rpj(this));
        n.LIZIZ(LIZIZ2, "");
        Pmr.LIZ(this, LIZIZ2).LIZLLL(new C1984Rqu(this)).LIZLLL();
    }
}
