package com.ss.android.ugc.aweme.compliance.privacy.settings.account.pages.commentfilter.subadapters.dislike;

import X.0Bx;
import X.0C0;
import X.6iy;
import X.AnonymousClass2UX;
import X.C12422nK;
import X.C15012rV;
import X.C36033kJ;
import X.C36223kc;
import X.C36303kk;
import X.C36313kl;
import X.C38983p4;
import X.CZv;
import X.Crj;
import X.M12;
import android.os.Bundle;
import android.util.SparseArray;
import android.view.View;
import com.bytedance.covode.number.Covode;
import com.bytedance.keva.Keva;
import com.bytedance.router.arg.RouteArgExtension;
import com.ss.android.ugc.aweme.compliance.privacy.settings.account.base.BasePrivacySettingFragment;
import java.util.List;
import kotlin.h.b.n;

@CZv
public final class CommentFilterDislikeFragment extends BasePrivacySettingFragment {
    public static final C36313kl LJ = new C36313kl((byte) 0);
    public final boolean LIZ;
    public PermissionSettingItemViewModel LIZIZ;
    public PermissionSettingItemViewModel LIZJ;
    public PermissionSettingItemViewModel LIZLLL;
    public C36223kc LJFF;
    public final Crj LJI = RouteArgExtension.INSTANCE.optionalArg(this, C36303kk.LIZ, "enter_from", String.class);
    public SparseArray LJII;

    static {
        Covode.recordClassIndex(61652);
    }

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

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

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

    public final List<C15012rV> LIZJ() {
        C36223kc r1 = this.LJFF;
        if (r1 == null) {
            n.LIZ("");
        }
        return 6iy.LIZ(r1);
    }

    public CommentFilterDislikeFragment() {
        Keva keva = C36033kJ.LIZ;
        this.LIZ = keva.getBoolean("comment_dislike_filter_disable_automatic_level_" + C38983p4.LIZ.LIZ(), false);
    }

    public static final /* synthetic */ PermissionSettingItemViewModel LIZ(CommentFilterDislikeFragment commentFilterDislikeFragment) {
        PermissionSettingItemViewModel permissionSettingItemViewModel = commentFilterDislikeFragment.LIZIZ;
        if (permissionSettingItemViewModel == null) {
            n.LIZ("");
        }
        return permissionSettingItemViewModel;
    }

    public static final /* synthetic */ PermissionSettingItemViewModel LIZIZ(CommentFilterDislikeFragment commentFilterDislikeFragment) {
        PermissionSettingItemViewModel permissionSettingItemViewModel = commentFilterDislikeFragment.LIZLLL;
        if (permissionSettingItemViewModel == null) {
            n.LIZ("");
        }
        return permissionSettingItemViewModel;
    }

    public static final /* synthetic */ PermissionSettingItemViewModel LIZJ(CommentFilterDislikeFragment commentFilterDislikeFragment) {
        PermissionSettingItemViewModel permissionSettingItemViewModel = commentFilterDislikeFragment.LIZJ;
        if (permissionSettingItemViewModel == null) {
            n.LIZ("");
        }
        return permissionSettingItemViewModel;
    }

    public final void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        0C0 activity = getActivity();
        if (activity == null) {
            activity = this;
        }
        PermissionSettingViewModel LIZ2 = new 0Bx(activity).LIZ(PermissionSettingViewModel.class);
        String str = "";
        n.LIZIZ(LIZ2, str);
        PermissionSettingViewModel permissionSettingViewModel = LIZ2;
        this.LIZIZ = permissionSettingViewModel.LIZ;
        this.LIZJ = permissionSettingViewModel.LIZIZ;
        this.LIZLLL = permissionSettingViewModel.LIZJ;
        this.LJFF = new C36223kc(this);
        String str2 = (String) this.LJI.getValue();
        AnonymousClass2UX r1 = new AnonymousClass2UX();
        if (str2 != null) {
            str = str2;
        }
        r1.LIZ("enter_from", str);
        C12422nK.LIZ("filter_selected_comment_types_load", r1.LIZ);
    }

    public final void onViewCreated(View view, Bundle bundle) {
        M12.LIZ(view);
        super.onViewCreated(view, bundle);
        LIZIZ(2131822798);
    }
}
