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

import X.0HH;
import X.2nK;
import X.2uR;
import X.3c7;
import X.3cA;
import X.3cI;
import X.C2486Rz0;
import X.C2498RzC;
import X.C2526Rze;
import X.C2527Rzf;
import X.F2I;
import X.JtF;
import X.KLU;
import X.M12;
import X.Qeg;
import X.S0M;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import com.bytedance.covode.number.Covode;
import com.bytedance.keva.Keva;
import com.ss.android.ugc.aweme.account.login.v2.base.BaseAccountFlowFragment;
import com.ss.android.ugc.aweme.ug.UgCommonServiceImpl;
import java.util.HashMap;
import kotlin.h.b.n;

public final class EmailConsentPageFragment extends BaseAccountFlowFragment {
    public static final C2486Rz0 LIZIZ = new C2486Rz0((byte) 0);
    public final S0M LIZ;
    public HashMap LIZJ;

    static {
        Covode.recordClassIndex(52279);
    }

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

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

    public final boolean aA_() {
        return true;
    }

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

    public EmailConsentPageFragment(S0M s0m) {
        M12.LIZ(s0m);
        this.LIZ = s0m;
    }

    public final void a_(int i) {
        throw new KLU("An operation is not implemented: ".concat("Not yet implemented"));
    }

    public final void LIZ(int i, String str) {
        M12.LIZ(str);
        throw new KLU("An operation is not implemented: ".concat("Not yet implemented"));
    }

    public final void onViewCreated(View view, Bundle bundle) {
        M12.LIZ(view);
        EmailConsentPageFragment.super.onViewCreated(view, bundle);
        if (n.LIZ(at_(), "manage_account_page")) {
            Qeg LIZ2 = LIZ(2131370827);
            n.LIZIZ(LIZ2, "");
            LIZ2.setText(getString(2131820625));
            Keva.getRepo("email_consent_keva").storeLong("email_consent_show_time", System.currentTimeMillis());
            Keva.getRepo("email_consent_keva").storeLong(as_(), System.currentTimeMillis());
            Keva.getRepo("email_consent_keva").storeInt("email_consent_show_times", Keva.getRepo("email_consent_keva").getInt("email_consent_show_times", 0) + 1);
        } else {
            Qeg LIZ3 = LIZ(2131371242);
            n.LIZIZ(LIZ3, "");
            LIZ3.setText(getString(2131820642));
            Qeg LIZ4 = LIZ(2131370827);
            n.LIZIZ(LIZ4, "");
            LIZ4.setText(getString(2131820645));
            3c7 LIZ5 = LIZ(2131362582);
            n.LIZIZ(LIZ5, "");
            LIZ5.setVisibility(0);
            2uR r3 = new 2uR();
            3cA r1 = new 3cA();
            r1.LIZ(2131755735);
            r1.LIZIZ = true;
            r1.LIZ(new C2498RzC(this));
            r3.LIZ(new 3cI[]{r1});
            LIZ(2131362582).setNavActions(r3);
        }
        ImageView imageView = (ImageView) LIZ(2131365678);
        n.LIZIZ(imageView, "");
        M12.LIZ(imageView);
        F2I.LIZ(UgCommonServiceImpl.LJIIL().LIZJ(), imageView, "18d672861696c90ffb63e9a7c134f815");
        String as_ = as_();
        n.LIZIZ(as_, "");
        M12.LIZ(as_, "collect_email_consent_phase3");
        JtF jtF = new JtF();
        jtF.LIZ("page_name", as_);
        jtF.LIZ("exp_name", "collect_email_consent_phase3");
        2nK.LIZ("show_email_consent_popup_page", jtF.LIZ);
        LIZ(2131363646).setOnClickListener(new C2526Rze(this));
        LIZ(2131363125).setOnClickListener(new C2527Rzf(this));
    }

    public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        M12.LIZ(layoutInflater);
        return 0HH.LIZ(layoutInflater, 2131558697, viewGroup, false);
    }
}
