package com.ss.android.ugc.aweme.setting.serverpush.ui;

import X.AnonymousClass367;
import X.AnonymousClass43O;
import X.C03012Pr;
import X.C06542dg;
import X.C16832uR;
import X.C29283Yq;
import X.C30053af;
import X.C30953c7;
import X.C38973p3;
import X.C43983x8;
import X.C43993x9;
import X.C44703yI;
import X.C44713yJ;
import X.C44723yK;
import X.C44733yL;
import X.C44773yP;
import X.C45093yv;
import X.C463242e;
import X.C464542r;
import X.CZv;
import X.DZp;
import X.Ls2;
import X.M12;
import android.os.Bundle;
import android.util.SparseArray;
import android.view.View;
import androidx.fragment.app.Fragment;
import com.bytedance.covode.number.Covode;
import com.ss.android.ugc.aweme.setting.page.BasePage;
import kotlin.h.b.n;

@CZv
public final class InnerPushSettingsFragment extends BasePage implements C43983x8 {
    public static String LJIIL = "in_app_digg_push";
    public static String LJIILIIL = "in_app_comment_push";
    public static String LJIILJJIL = "in_app_follow_push";
    public static String LJIILL = "in_app_mention_push";
    public static String LJIILLIIL = "in_app_im_push";
    public static String LJIIZILJ = "live_inner_push";
    public static final C44733yL LJIJ = new C44733yL((byte) 0);
    public C30953c7 LJ;
    public C44773yP LJFF;
    public C44773yP LJI;
    public C44773yP LJII;
    public C44773yP LJIIIIZZ;
    public C44773yP LJIIIZ;
    public C44773yP LJIIJ;
    public C43993x9 LJIIJJI;
    public SparseArray LJIJI;

    public final int LIZ() {
        return 2131561270;
    }

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

    public final void LJI() {
        SparseArray sparseArray = this.LJIJI;
        if (sparseArray != null) {
            sparseArray.clear();
        }
    }

    public final void dz_() {
    }

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

    public final void bp_() {
        C30053af r1 = new C30053af((Fragment) this);
        r1.LJ(2131827469);
        C30053af.LIZ(r1);
    }

    public final void onDestroy() {
        super.onDestroy();
        C43993x9 r0 = this.LJIIJJI;
        if (r0 != null) {
            r0.do_();
        }
    }

    static {
        Covode.recordClassIndex(106185);
    }

    private final void LIZ(C44773yP r2, String str) {
        r2.LIZ((Object) str);
        r2.LIZ((View.OnClickListener) new C44703yI(this, r2, str));
    }

    public final void onViewCreated(View view, Bundle bundle) {
        boolean z;
        C06542dg r1;
        boolean z2;
        C06542dg r12;
        boolean z3;
        C06542dg r13;
        boolean z4;
        C06542dg r14;
        boolean z5;
        C06542dg r15;
        InnerPushSettingsFragment innerPushSettingsFragment = this;
        View view2 = view;
        M12.LIZ(view2);
        innerPushSettingsFragment.LJ = (C30953c7) view2.findViewById(2131371289);
        DZp findViewById = view2.findViewById(2131369084);
        n.LIZIZ(findViewById, "");
        String string = innerPushSettingsFragment.getString(2131826094);
        n.LIZIZ(string, "");
        C463242e r5 = r6;
        C463242e r6 = new C463242e(false, string, (View.OnClickListener) null, false, (Object) null, (View.OnClickListener) null, (C29283Yq) null, (String) null, false, 8188);
        innerPushSettingsFragment.LJFF = new C44773yP(r5);
        String string2 = innerPushSettingsFragment.getString(2131826091);
        n.LIZIZ(string2, "");
        innerPushSettingsFragment.LJI = new C44773yP(new C463242e(false, string2, (View.OnClickListener) null, false, (Object) null, (View.OnClickListener) null, (C29283Yq) null, (String) null, false, 8188));
        String string3 = innerPushSettingsFragment.getString(2131826096);
        n.LIZIZ(string3, "");
        innerPushSettingsFragment.LJIIIIZZ = new C44773yP(new C463242e(false, string3, (View.OnClickListener) null, false, (Object) null, (View.OnClickListener) null, (C29283Yq) null, (String) null, false, 8188));
        String string4 = innerPushSettingsFragment.getString(2131826092);
        n.LIZIZ(string4, "");
        innerPushSettingsFragment.LJIIJ = new C44773yP(new C463242e(false, string4, (View.OnClickListener) null, false, (Object) null, (View.OnClickListener) null, (C29283Yq) null, (String) null, false, 8188));
        String string5 = innerPushSettingsFragment.getString(2131826093);
        n.LIZIZ(string5, "");
        innerPushSettingsFragment.LJII = new C44773yP(new C463242e(false, string5, (View.OnClickListener) null, false, (Object) null, (View.OnClickListener) null, (C29283Yq) null, (String) null, false, 8188));
        String string6 = innerPushSettingsFragment.getString(2131826095);
        n.LIZIZ(string6, "");
        innerPushSettingsFragment.LJIIIZ = new C44773yP(new C463242e(false, string6, (View.OnClickListener) null, false, (Object) null, (View.OnClickListener) null, (C29283Yq) null, (String) null, false, 8188));
        C464542r r4 = new C464542r(findViewById);
        C44773yP r2 = innerPushSettingsFragment.LJFF;
        if (r2 != null) {
            r4.LIZ((AnonymousClass43O<?>) r2);
        }
        C44773yP r22 = innerPushSettingsFragment.LJI;
        if (r22 != null) {
            r4.LIZ((AnonymousClass43O<?>) r22);
        }
        C44773yP r23 = innerPushSettingsFragment.LJIIIIZZ;
        if (r23 != null) {
            r4.LIZ((AnonymousClass43O<?>) r23);
        }
        C44773yP r24 = innerPushSettingsFragment.LJIIJ;
        if (r24 != null) {
            r4.LIZ((AnonymousClass43O<?>) r24);
        }
        C44773yP r25 = innerPushSettingsFragment.LJII;
        if (r25 != null) {
            r4.LIZ((AnonymousClass43O<?>) r25);
        }
        C44773yP r26 = innerPushSettingsFragment.LJIIIZ;
        if (r26 != null) {
            r4.LIZ((AnonymousClass43O<?>) r26);
        }
        boolean z6 = true;
        if (C44723yK.LIZIZ.LIZ()) {
            C44773yP r27 = innerPushSettingsFragment.LJIIIZ;
            if (r27 != null) {
                r27.LIZ(true);
            }
        } else {
            C44773yP r28 = innerPushSettingsFragment.LJIIIZ;
            if (r28 != null) {
                r28.LIZ(false);
            }
        }
        super.onViewCreated(view2, bundle);
        C30953c7 r62 = innerPushSettingsFragment.LJ;
        if (r62 != null) {
            C16832uR r3 = new C16832uR();
            String string7 = innerPushSettingsFragment.getString(2131826088);
            n.LIZIZ(string7, "");
            AnonymousClass367.LIZ(r3, string7, (Ls2<C03012Pr>) new C44713yJ(innerPushSettingsFragment));
            r62.setNavActions(r3);
        }
        C44773yP r29 = innerPushSettingsFragment.LJFF;
        if (r29 != null) {
            innerPushSettingsFragment.LIZ(r29, LJIIL);
        }
        C44773yP r210 = innerPushSettingsFragment.LJI;
        if (r210 != null) {
            innerPushSettingsFragment.LIZ(r210, LJIILIIL);
        }
        C44773yP r211 = innerPushSettingsFragment.LJIIIIZZ;
        if (r211 != null) {
            innerPushSettingsFragment.LIZ(r211, LJIILL);
        }
        C44773yP r212 = innerPushSettingsFragment.LJIIJ;
        if (r212 != null) {
            innerPushSettingsFragment.LIZ(r212, LJIILLIIL);
        }
        C44773yP r213 = innerPushSettingsFragment.LJII;
        if (r213 != null) {
            innerPushSettingsFragment.LIZ(r213, LJIILJJIL);
        }
        C44773yP r214 = innerPushSettingsFragment.LJIIIZ;
        if (r214 != null) {
            innerPushSettingsFragment.LIZ(r214, LJIIZILJ);
        }
        C38973p3 LIZ = C45093yv.LIZ.LIZ();
        C44773yP r215 = innerPushSettingsFragment.LJFF;
        if (r215 != null) {
            if (LIZ == null || (r15 = LIZ.LJIL) == null || r15.getInAppDiggPush() != 1) {
                z5 = false;
            } else {
                z5 = true;
            }
            r215.LIZIZ(z5);
        }
        C44773yP r216 = innerPushSettingsFragment.LJI;
        if (r216 != null) {
            if (LIZ == null || (r14 = LIZ.LJIL) == null || r14.getInAppCommentPush() != 1) {
                z4 = false;
            } else {
                z4 = true;
            }
            r216.LIZIZ(z4);
        }
        C44773yP r217 = innerPushSettingsFragment.LJIIIIZZ;
        if (r217 != null) {
            if (LIZ == null || (r13 = LIZ.LJIL) == null || r13.getInAppMentionPush() != 1) {
                z3 = false;
            } else {
                z3 = true;
            }
            r217.LIZIZ(z3);
        }
        C44773yP r218 = innerPushSettingsFragment.LJIIJ;
        if (r218 != null) {
            if (LIZ == null || (r12 = LIZ.LJIL) == null || r12.getInAppImPush() != 1) {
                z2 = false;
            } else {
                z2 = true;
            }
            r218.LIZIZ(z2);
        }
        C44773yP r219 = innerPushSettingsFragment.LJII;
        if (r219 != null) {
            if (LIZ == null || (r1 = LIZ.LJIL) == null || r1.getInAppFollowPush() != 1) {
                z = false;
            } else {
                z = true;
            }
            r219.LIZIZ(z);
        }
        C44773yP r220 = innerPushSettingsFragment.LJIIIZ;
        if (r220 != null) {
            if (LIZ == null || LIZ.LJIIL != 1) {
                z6 = false;
            }
            r220.LIZIZ(z6);
        }
        C43993x9 r16 = new C43993x9();
        innerPushSettingsFragment.LJIIJJI = r16;
        r16.a_(innerPushSettingsFragment);
        C43993x9 r0 = innerPushSettingsFragment.LJIIJJI;
        if (r0 != null) {
            r0.LJIIIZ = false;
        }
    }
}
