package com.ss.android.ugc.aweme.account.agegate.activity;

import X.8gF;
import X.AnonymousClass3FE;
import X.AnonymousClass3FF;
import X.Crj;
import X.SNU;
import android.content.Intent;
import android.view.View;
import com.bytedance.apm.agent.v2.instrumentation.ActivityAgent;
import com.bytedance.covode.number.Covode;
import com.bytedance.router.arg.RouteArgExtension;
import com.bytedance.sysoptimizer.EnterTransitionCrashOptimizer;
import java.util.HashMap;
import kotlin.h.b.n;

public final class DeleteVideoAlertActivity extends SNU implements View.OnClickListener {
    public static final AnonymousClass3FF LIZ = new AnonymousClass3FF((byte) 0);
    public final Crj LIZIZ = RouteArgExtension.INSTANCE.optionalArg(this, AnonymousClass3FE.LIZ, "enter_from", String.class);
    public HashMap LIZJ;

    static {
        Covode.recordClassIndex(50536);
    }

    public final String LIZ() {
        return (String) this.LIZIZ.getValue();
    }

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

    public final View _$_findCachedViewById(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 findViewById = findViewById(i);
        this.LIZJ.put(Integer.valueOf(i), findViewById);
        return findViewById;
    }

    public final void onBackPressed() {
    }

    /* JADX WARNING: type inference failed for: r0v0, types: [X.SNU, com.ss.android.ugc.aweme.account.agegate.activity.DeleteVideoAlertActivity, android.app.Activity] */
    public final void onDestroy() {
        8gF.LJ(this);
        DeleteVideoAlertActivity.super.onDestroy();
    }

    /* JADX WARNING: type inference failed for: r0v0, types: [X.SNU, com.ss.android.ugc.aweme.account.agegate.activity.DeleteVideoAlertActivity, android.app.Activity] */
    public final void onPause() {
        8gF.LIZJ(this);
        DeleteVideoAlertActivity.super.onPause();
    }

    /* JADX WARNING: type inference failed for: r3v0, types: [X.SNU, com.ss.android.ugc.aweme.account.agegate.activity.DeleteVideoAlertActivity, android.app.Activity] */
    public final void onResume() {
        8gF.LIZIZ(this);
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.account.agegate.activity.DeleteVideoAlertActivity", "onResume", true);
        DeleteVideoAlertActivity.super.onResume();
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.account.agegate.activity.DeleteVideoAlertActivity", "onResume", false);
    }

    /* JADX WARNING: type inference failed for: r0v0, types: [X.SNU, com.ss.android.ugc.aweme.account.agegate.activity.DeleteVideoAlertActivity, android.app.Activity] */
    public final void onStart() {
        8gF.LIZ(this);
        DeleteVideoAlertActivity.super.onStart();
    }

    public final void onWindowFocusChanged(boolean z) {
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.account.agegate.activity.DeleteVideoAlertActivity", "onWindowFocusChanged", true);
        DeleteVideoAlertActivity.super.onWindowFocusChanged(z);
    }

    public final boolean LIZIZ() {
        if (n.LIZ(LIZ(), "from_kids_account_page") || n.LIZ(LIZ(), "from_kids_password_page")) {
            return true;
        }
        return false;
    }

    /* JADX WARNING: type inference failed for: r1v0, types: [X.SNU, com.ss.android.ugc.aweme.account.agegate.activity.DeleteVideoAlertActivity, android.app.Activity] */
    public final void onStop() {
        8gF.LIZLLL(this);
        DeleteVideoAlertActivity.super.onStop();
        if (EnterTransitionCrashOptimizer.getContext() != null) {
            try {
                getWindow().getDecorView().getViewTreeObserver().dispatchOnPreDraw();
            } catch (Throwable unused) {
            }
        }
        try {
            getWindow().getDecorView().getViewTreeObserver().dispatchOnPreDraw();
        } catch (Throwable unused2) {
        }
    }

    /* JADX WARNING: type inference failed for: r7v0, types: [android.content.Context, X.SNU, com.ss.android.ugc.aweme.account.agegate.activity.DeleteVideoAlertActivity] */
    /* JADX WARNING: Code restructure failed: missing block: B:37:0x00f9, code lost:
        if (r4.equals("from_kids_account_page") == false) goto L_0x00a9;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:42:0x010c, code lost:
        if (r4.equals("from_kids_password_page") != false) goto L_0x010e;
     */
    /* JADX WARNING: Removed duplicated region for block: B:27:0x00c4  */
    /* JADX WARNING: Removed duplicated region for block: B:29:0x00db  */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public final void onClick(android.view.View r8) {
        /*
            r7 = this;
            if (r8 == 0) goto L_0x0015
            int r0 = r8.getId()
            java.lang.Integer r6 = java.lang.Integer.valueOf(r0)
        L_0x000a:
            java.lang.String r4 = "type"
            java.lang.String r5 = "pop_up"
            java.lang.String r2 = "enter_method"
            java.lang.String r3 = "from_delete_account"
            if (r6 != 0) goto L_0x0017
            return
        L_0x0015:
            r6 = 0
            goto L_0x000a
        L_0x0017:
            int r1 = r6.intValue()
            r0 = 2131373172(0x7f0a2c74, float:1.8366428E38)
            if (r1 != r0) goto L_0x0066
            java.lang.String r0 = r7.LIZ()
            boolean r0 = android.text.TextUtils.equals(r0, r3)
            if (r0 != 0) goto L_0x005a
            X.JtF r1 = new X.JtF
            r1.<init>()
            r1.LIZ(r2, r5)
            boolean r0 = r7.LIZIZ()
            r1.LIZ(r4, r0)
            java.util.Map r1 = r1.LIZ
            java.lang.String r0 = "export_video_yes"
            X.C12422nK.LIZ((java.lang.String) r0, (java.util.Map<java.lang.String, java.lang.String>) r1)
        L_0x0040:
            r1 = r7
            java.lang.String r0 = "//account/video/export"
            com.bytedance.router.SmartRoute r2 = com.bytedance.router.SmartRouter.buildRoute(r1, r0)
            android.content.Intent r0 = r7.getIntent()
            java.lang.String r1 = "age_gate_response"
            java.io.Serializable r0 = r0.getSerializableExtra(r1)
            r2.withParam(r1, r0)
            r0 = 1024(0x400, float:1.435E-42)
            r2.open(r0)
            return
        L_0x005a:
            X.35r r2 = X.C217535r.LIZ
            java.lang.String r1 = r7.LIZ()
            java.lang.String r0 = "download"
            r2.LIZ(r0, r1)
            goto L_0x0040
        L_0x0066:
            int r1 = r6.intValue()
            r0 = 2131368014(0x7f0a184e, float:1.8355966E38)
            if (r1 != r0) goto L_0x00da
            java.lang.String r0 = r7.LIZ()
            boolean r0 = android.text.TextUtils.equals(r0, r3)
            if (r0 != 0) goto L_0x0116
            X.JtF r1 = new X.JtF
            r1.<init>()
            r1.LIZ(r2, r5)
            boolean r0 = r7.LIZIZ()
            r1.LIZ(r4, r0)
            java.util.Map r1 = r1.LIZ
            java.lang.String r0 = "export_video_no"
            X.C12422nK.LIZ((java.lang.String) r0, (java.util.Map<java.lang.String, java.lang.String>) r1)
        L_0x008f:
            X.4vl r2 = X.AnonymousClass3FG.LIZ(r7)
            java.lang.String r0 = r7.LIZ()
            boolean r0 = android.text.TextUtils.equals(r0, r3)
            if (r0 == 0) goto L_0x0112
            r0 = 2131822082(0x7f110602, float:1.9276925E38)
        L_0x00a0:
            r2.LIZJ(r0)
            java.lang.String r4 = r7.LIZ()
            if (r4 != 0) goto L_0x00df
        L_0x00a9:
            r0 = 2131825353(0x7f1112c9, float:1.928356E38)
        L_0x00ac:
            r2.LIZLLL((int) r0)
            r1 = 2131822252(0x7f1106ac, float:1.927727E38)
            X.3FD r0 = new X.3FD
            r0.<init>(r7)
            r2.LIZIZ((int) r1, (android.content.DialogInterface.OnClickListener) r0)
            java.lang.String r0 = r7.LIZ()
            boolean r0 = android.text.TextUtils.equals(r0, r3)
            if (r0 == 0) goto L_0x00db
            r1 = 2131822081(0x7f110601, float:1.9276923E38)
        L_0x00c7:
            X.3FC r0 = new X.3FC
            r0.<init>(r7)
            r2.LIZJ(r1, r0)
            X.4vk r0 = r2.LIZ()
            android.app.Dialog r0 = r0.LIZJ()
            X.AnonymousClass4FQ.LIZ((android.app.Dialog) r0)
        L_0x00da:
            return
        L_0x00db:
            r1 = 2131822256(0x7f1106b0, float:1.9277278E38)
            goto L_0x00c7
        L_0x00df:
            int r1 = r4.hashCode()
            r0 = -2102608362(0xffffffff82acbe16, float:-2.5382233E-37)
            if (r1 == r0) goto L_0x0106
            r0 = -1607227186(0xffffffffa033a8ce, float:-1.5217743E-19)
            if (r1 == r0) goto L_0x00fc
            r0 = -1206495074(0xffffffffb816589e, float:-3.5845318E-5)
            if (r1 == r0) goto L_0x00f3
            goto L_0x00a9
        L_0x00f3:
            java.lang.String r0 = "from_kids_account_page"
            boolean r0 = r4.equals(r0)
            if (r0 == 0) goto L_0x00a9
            goto L_0x010e
        L_0x00fc:
            boolean r0 = r4.equals(r3)
            if (r0 == 0) goto L_0x00a9
            r0 = 2131822080(0x7f110600, float:1.9276921E38)
            goto L_0x00ac
        L_0x0106:
            java.lang.String r0 = "from_kids_password_page"
            boolean r0 = r4.equals(r0)
            if (r0 == 0) goto L_0x00a9
        L_0x010e:
            r0 = 2131823151(0x7f110a2f, float:1.9279094E38)
            goto L_0x00ac
        L_0x0112:
            r0 = 2131825352(0x7f1112c8, float:1.9283558E38)
            goto L_0x00a0
        L_0x0116:
            X.35r r2 = X.C217535r.LIZ
            java.lang.String r1 = r7.LIZ()
            java.lang.String r0 = "not_download"
            r2.LIZ(r0, r1)
            goto L_0x008f
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.account.agegate.activity.DeleteVideoAlertActivity.onClick(android.view.View):void");
    }

    /* JADX WARNING: type inference failed for: r10v0, types: [X.4Qh, X.SNU, com.ss.android.ugc.aweme.account.agegate.activity.DeleteVideoAlertActivity, android.app.Activity] */
    /* JADX WARNING: Code restructure failed: missing block: B:30:0x00f1, code lost:
        if (r9.equals("from_kids_account_page") == false) goto L_0x0046;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:35:0x0124, code lost:
        if (r9.equals("from_kids_password_page") != false) goto L_0x0126;
     */
    /* JADX WARNING: Removed duplicated region for block: B:11:0x0092  */
    /* JADX WARNING: Removed duplicated region for block: B:18:0x00bc  */
    /* JADX WARNING: Removed duplicated region for block: B:23:0x00d1  */
    /* JADX WARNING: Removed duplicated region for block: B:5:0x0062  */
    /* JADX WARNING: Removed duplicated region for block: B:8:0x007e  */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public final void onCreate(android.os.Bundle r11) {
        /*
            r10 = this;
            X.8gF.LIZ(r10, r11)
            java.lang.String r6 = "com.ss.android.ugc.aweme.account.agegate.activity.DeleteVideoAlertActivity"
            java.lang.String r5 = "onCreate"
            r4 = 1
            com.bytedance.apm.agent.v2.instrumentation.ActivityAgent.onTrace(r6, r5, r4)
            com.ss.android.ugc.aweme.account.agegate.activity.DeleteVideoAlertActivity.super.onCreate(r11)
            r0 = 2131558676(0x7f0d0114, float:1.8742675E38)
            r10.setContentView(r0)
            r0 = 2131373172(0x7f0a2c74, float:1.8366428E38)
            android.view.View r0 = r10._$_findCachedViewById(r0)
            androidx.constraintlayout.widget.ConstraintLayout r0 = (androidx.constraintlayout.widget.ConstraintLayout) r0
            r1 = r10
            r0.setOnClickListener(r1)
            r0 = 2131368014(0x7f0a184e, float:1.8355966E38)
            android.view.View r0 = r10._$_findCachedViewById(r0)
            androidx.constraintlayout.widget.ConstraintLayout r0 = (androidx.constraintlayout.widget.ConstraintLayout) r0
            r0.setOnClickListener(r1)
            r0 = 2131364000(0x7f0a08a0, float:1.8347825E38)
            android.view.View r7 = r10._$_findCachedViewById(r0)
            X.Qeg r7 = (X.Qeg) r7
            java.lang.String r3 = ""
            kotlin.h.b.n.LIZIZ(r7, r3)
            java.lang.String r9 = r10.LIZ()
            r2 = -1607227186(0xffffffffa033a8ce, float:-1.5217743E-19)
            java.lang.String r1 = "from_delete_account"
            if (r9 != 0) goto L_0x00d9
        L_0x0046:
            r0 = 2131825354(0x7f1112ca, float:1.9283562E38)
            java.lang.String r0 = r10.getString(r0)
        L_0x004d:
            r7.setText(r0)
            r0 = 2131373173(0x7f0a2c75, float:1.836643E38)
            android.view.View r8 = r10._$_findCachedViewById(r0)
            X.Qeg r8 = (X.Qeg) r8
            kotlin.h.b.n.LIZIZ(r8, r3)
            java.lang.String r7 = r10.LIZ()
            if (r7 != 0) goto L_0x00c4
        L_0x0062:
            r0 = 2131825356(0x7f1112cc, float:1.9283566E38)
            java.lang.String r0 = r10.getString(r0)
        L_0x0069:
            r8.setText(r0)
            r0 = 2131368019(0x7f0a1853, float:1.8355976E38)
            android.view.View r7 = r10._$_findCachedViewById(r0)
            X.Qeg r7 = (X.Qeg) r7
            kotlin.h.b.n.LIZIZ(r7, r3)
            java.lang.String r3 = r10.LIZ()
            if (r3 != 0) goto L_0x00af
        L_0x007e:
            r0 = 2131825355(0x7f1112cb, float:1.9283564E38)
            java.lang.String r0 = r10.getString(r0)
        L_0x0085:
            r7.setText(r0)
            java.lang.String r0 = r10.LIZ()
            boolean r0 = android.text.TextUtils.equals(r0, r1)
            if (r0 != 0) goto L_0x0095
            X.C468844i.LIZ((boolean) r4)
        L_0x0095:
            X.JtF r2 = new X.JtF
            r2.<init>()
            java.lang.String r1 = r10.LIZ()
            java.lang.String r0 = "enter_from"
            r2.LIZ(r0, r1)
            java.util.Map r1 = r2.LIZ
            java.lang.String r0 = "delete_video_alert_show"
            X.C12422nK.LIZ((java.lang.String) r0, (java.util.Map<java.lang.String, java.lang.String>) r1)
            r0 = 0
            com.bytedance.apm.agent.v2.instrumentation.ActivityAgent.onTrace(r6, r5, r0)
            return
        L_0x00af:
            int r0 = r3.hashCode()
            if (r0 == r2) goto L_0x00b6
            goto L_0x007e
        L_0x00b6:
            boolean r0 = r3.equals(r1)
            if (r0 == 0) goto L_0x007e
            r0 = 2131822083(0x7f110603, float:1.9276927E38)
            java.lang.String r0 = r10.getString(r0)
            goto L_0x0085
        L_0x00c4:
            int r0 = r7.hashCode()
            if (r0 == r2) goto L_0x00cb
            goto L_0x0062
        L_0x00cb:
            boolean r0 = r7.equals(r1)
            if (r0 == 0) goto L_0x0062
            r0 = 2131822085(0x7f110605, float:1.9276931E38)
            java.lang.String r0 = r10.getString(r0)
            goto L_0x0069
        L_0x00d9:
            int r8 = r9.hashCode()
            r0 = -2102608362(0xffffffff82acbe16, float:-2.5382233E-37)
            if (r8 == r0) goto L_0x011e
            if (r8 == r2) goto L_0x00f4
            r0 = -1206495074(0xffffffffb816589e, float:-3.5845318E-5)
            if (r8 == r0) goto L_0x00eb
            goto L_0x0046
        L_0x00eb:
            java.lang.String r0 = "from_kids_account_page"
            boolean r0 = r9.equals(r0)
            if (r0 == 0) goto L_0x0046
            goto L_0x0126
        L_0x00f4:
            boolean r0 = r9.equals(r1)
            if (r0 == 0) goto L_0x0046
            java.lang.StringBuilder r8 = new java.lang.StringBuilder
            r8.<init>()
            r0 = 2131822077(0x7f1105fd, float:1.9276915E38)
            java.lang.String r0 = r10.getString(r0)
            r8.append(r0)
            java.lang.String r0 = "\n"
            r8.append(r0)
            r0 = 2131822078(0x7f1105fe, float:1.9276917E38)
            java.lang.String r0 = r10.getString(r0)
            r8.append(r0)
            java.lang.String r0 = r8.toString()
            goto L_0x004d
        L_0x011e:
            java.lang.String r0 = "from_kids_password_page"
            boolean r0 = r9.equals(r0)
            if (r0 == 0) goto L_0x0046
        L_0x0126:
            r0 = 2131823733(0x7f110c75, float:1.9280274E38)
            java.lang.String r0 = r10.getString(r0)
            goto L_0x004d
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.account.agegate.activity.DeleteVideoAlertActivity.onCreate(android.os.Bundle):void");
    }

    public final void onActivityResult(int i, int i2, Intent intent) {
        if (i == 1024 && i2 == -1) {
            finish();
        }
        DeleteVideoAlertActivity.super.onActivityResult(i, i2, intent);
    }
}
