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

import X.0HH;
import X.1hK;
import X.AnonymousClass35U;
import X.AnonymousClass44I;
import X.M12;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import com.bytedance.covode.number.Covode;
import com.ss.android.ugc.aweme.base.fragment.AmeBaseFragment;
import java.util.HashMap;

public final class OperatorCompleteFragment extends AmeBaseFragment implements AnonymousClass35U {
    public static final AnonymousClass44I LIZ = new AnonymousClass44I((byte) 0);
    public HashMap LIZIZ;

    static {
        Covode.recordClassIndex(50569);
    }

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

    public final /* synthetic */ void onDestroyView() {
        OperatorCompleteFragment.super.onDestroyView();
        HashMap hashMap = this.LIZIZ;
        if (hashMap != null) {
            hashMap.clear();
        }
    }

    public final void onActivityCreated(Bundle bundle) {
        Window window;
        OperatorCompleteFragment.super.onActivityCreated(bundle);
        1hK activity = getActivity();
        if (activity != null && (window = activity.getWindow()) != null) {
            window.setSoftInputMode(3);
        }
    }

    /* JADX WARNING: Removed duplicated region for block: B:25:0x0085  */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public final void onViewCreated(android.view.View r23, android.os.Bundle r24) {
        /*
            r22 = this;
            r4 = r22
            r4 = r4
            r7 = r23
            X.M12.LIZ(r7)
            r0 = r24
            com.ss.android.ugc.aweme.account.agegate.fragment.OperatorCompleteFragment.super.onViewCreated(r7, r0)
            android.os.Bundle r1 = r4.getArguments()
            if (r1 == 0) goto L_0x01c7
            java.lang.String r0 = "age_gate_response"
            java.io.Serializable r3 = r1.getSerializable(r0)
        L_0x0019:
            X.44L r3 = (X.AnonymousClass44L) r3
            if (r3 == 0) goto L_0x01c4
            X.3v1 r1 = r3.getAgeGatePostAction()
        L_0x0021:
            X.3v1 r0 = X.C42673v1.PASS
            r9 = 2131364007(0x7f0a08a7, float:1.8347839E38)
            r5 = 1
            r11 = 0
            if (r1 != r0) goto L_0x007b
            boolean r0 = r3.is_prompt()
            if (r0 == 0) goto L_0x007d
            android.view.View r1 = r4.LIZ(r9)
            X.Qeg r1 = (X.Qeg) r1
            r0 = 2131825364(0x7f1112d4, float:1.9283582E38)
            r1.setText(r0)
        L_0x003c:
            r0 = 2131363638(0x7f0a0736, float:1.834709E38)
            android.view.View r1 = r4.LIZ(r0)
            X.Qeg r1 = (X.Qeg) r1
            X.44N r0 = new X.44N
            r0.<init>(r4, r3)
            r1.setOnClickListener(r0)
            X.JtF r2 = new X.JtF
            r2.<init>()
            java.lang.String r1 = "enter_method"
            java.lang.String r0 = "pop_up"
            r2.LIZ(r1, r0)
            if (r3 == 0) goto L_0x0079
            X.3v1 r1 = r3.getAgeGatePostAction()
        L_0x005f:
            X.3v1 r0 = X.C42673v1.PASS
            if (r1 != r0) goto L_0x0077
            r1 = 1
        L_0x0064:
            java.lang.String r0 = "pass_gate"
            r2.LIZ(r0, r1)
            java.lang.String r1 = "pass_export"
            r0 = 1
            r2.LIZ(r1, r0)
            java.util.Map r1 = r2.LIZ
            java.lang.String r0 = "age_gate_complete"
            X.C12422nK.LIZ((java.lang.String) r0, (java.util.Map<java.lang.String, java.lang.String>) r1)
            return
        L_0x0077:
            r1 = 0
            goto L_0x0064
        L_0x0079:
            r1 = 0
            goto L_0x005f
        L_0x007b:
            if (r3 == 0) goto L_0x01c1
        L_0x007d:
            X.3v1 r1 = r3.getAgeGatePostAction()
        L_0x0081:
            X.3v1 r0 = X.C42673v1.US_FTC
            if (r1 != r0) goto L_0x003c
            r0 = 2131825366(0x7f1112d6, float:1.9283586E38)
            java.lang.String r8 = r4.getString(r0)
            java.lang.String r6 = ""
            kotlin.h.b.n.LIZIZ(r8, r6)
            android.text.Spannable$Factory r2 = android.text.Spannable.Factory.getInstance()
            r1 = 2131825365(0x7f1112d5, float:1.9283584E38)
            java.lang.Object[] r0 = new java.lang.Object[r5]
            r0[r11] = r8
            java.lang.String r0 = r4.getString(r1, r0)
            android.text.Spannable r5 = r2.newSpannable(r0)
            android.text.style.ForegroundColorSpan r2 = new android.text.style.ForegroundColorSpan
            android.content.Context r1 = r7.getContext()
            r0 = 2131099750(0x7f060066, float:1.7811862E38)
            int r0 = X.070.LIZJ(r1, r0)
            r2.<init>(r0)
            int r1 = r5.length()
            int r0 = r8.length()
            int r1 = r1 - r0
            int r0 = r5.length()
            r8 = 17
            r5.setSpan(r2, r1, r0, r8)
            android.view.View r0 = r4.LIZ(r9)
            X.Qeg r0 = (X.Qeg) r0
            kotlin.h.b.n.LIZIZ(r0, r6)
            r0.setText(r5)
            r2 = 2131367473(0x7f0a1631, float:1.8354869E38)
            android.view.View r0 = r4.LIZ(r2)
            X.4ZZ r0 = (X.AnonymousClass4ZZ) r0
            kotlin.h.b.n.LIZIZ(r0, r6)
            android.view.ViewGroup$LayoutParams r1 = r0.getLayoutParams()
            android.content.Context r0 = r4.getContext()
            int r0 = X.HeD.LIZ(r0)
            int r0 = r0 * 160
            int r0 = r0 / 375
            r1.width = r0
            android.view.View r0 = r4.LIZ(r2)
            X.4ZZ r0 = (X.AnonymousClass4ZZ) r0
            kotlin.h.b.n.LIZIZ(r0, r6)
            android.view.ViewGroup$LayoutParams r1 = r0.getLayoutParams()
            android.view.View r0 = r4.LIZ(r2)
            X.4ZZ r0 = (X.AnonymousClass4ZZ) r0
            kotlin.h.b.n.LIZIZ(r0, r6)
            android.view.ViewGroup$LayoutParams r0 = r0.getLayoutParams()
            int r0 = r0.width
            r1.height = r0
            android.text.Spannable$Factory r1 = android.text.Spannable.Factory.getInstance()
            r12 = 2131825367(0x7f1112d7, float:1.9283588E38)
            java.lang.String r0 = r4.getString(r12)
            android.text.Spannable r5 = r1.newSpannable(r0)
            r0 = 2131825368(0x7f1112d8, float:1.928359E38)
            java.lang.String r0 = r4.getString(r0)
            kotlin.h.b.n.LIZIZ(r0, r6)
            r1 = 2131825369(0x7f1112d9, float:1.9283592E38)
            java.lang.String r10 = r4.getString(r1)
            kotlin.h.b.n.LIZIZ(r10, r6)
            java.lang.String r1 = r4.getString(r12)
            kotlin.h.b.n.LIZIZ(r1, r6)
            r2 = 6
            int r9 = kotlin.o.z.LIZ(r1, r0, r11, r11, r2)
            java.lang.String r1 = r4.getString(r12)
            kotlin.h.b.n.LIZIZ(r1, r6)
            int r2 = kotlin.o.z.LIZ(r1, r10, r11, r11, r2)
            if (r9 < 0) goto L_0x014c
            if (r2 >= 0) goto L_0x0164
        L_0x014c:
            X.2aZ r12 = new X.2aZ
            r12.<init>()
            java.lang.String r11 = "enter_from"
            java.lang.String r1 = "ftc_complete"
            r12.LIZ((java.lang.String) r11, (java.lang.String) r1)
            org.json.JSONObject r11 = r12.LIZ()
            kotlin.h.b.n.LIZIZ(r11, r6)
            java.lang.String r1 = "text_highlight_not_match"
            X.9AI.LIZ(r1, r6, r11)
        L_0x0164:
            android.content.Context r11 = r7.getContext()
            r1 = 2131099967(0x7f06013f, float:1.7812302E38)
            int r13 = X.070.LIZJ(r11, r1)
            android.content.Context r11 = r7.getContext()
            r1 = 2131100194(0x7f060222, float:1.7812763E38)
            int r14 = X.070.LIZJ(r11, r1)
            X.44G r11 = new X.44G
            r12 = r4
            r11 = r11
            r15 = r13
            r16 = r14
            r11.<init>(r12, r13, r14, r15, r16)
            X.44H r16 = new X.44H
            r1 = r16
            r21 = r14
            r17 = r12
            r18 = r13
            r19 = r14
            r20 = r15
            r16.<init>(r17, r18, r19, r20, r21)
            int r0 = r0.length()
            int r0 = r0 + r9
            r5.setSpan(r11, r9, r0, r8)
            int r0 = r10.length()
            int r0 = r0 + r2
            r5.setSpan(r1, r2, r0, r8)
            r0 = 2131368824(0x7f0a1b78, float:1.8357609E38)
            android.view.View r1 = r7.findViewById(r0)
            android.widget.TextView r1 = (android.widget.TextView) r1
            kotlin.h.b.n.LIZIZ(r1, r6)
            r1.setText(r5)
            r0 = 0
            r1.setVisibility(r0)
            android.text.method.MovementMethod r0 = X.BLZ.LIZ()
            r1.setMovementMethod(r0)
            goto L_0x003c
        L_0x01c1:
            r1 = 0
            goto L_0x0081
        L_0x01c4:
            r1 = 0
            goto L_0x0021
        L_0x01c7:
            r3 = 0
            goto L_0x0019
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.account.agegate.fragment.OperatorCompleteFragment.onViewCreated(android.view.View, android.os.Bundle):void");
    }

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