package com.bytedance.android.livesdk.adminsetting;

import X.0HH;
import X.1jk;
import X.2sR;
import X.7vl;
import X.C0989Ftu;
import X.C1002Fu7;
import X.C1006FuB;
import X.C1056Fuz;
import X.C1064Fv7;
import X.C1429G2k;
import X.C1430G2l;
import X.C1781GFy;
import X.C3491GtA;
import X.Crj;
import X.GSF;
import X.M12;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import androidx.fragment.app.Fragment;
import com.bytedance.android.livesdk.model.RoomAuthStatus;
import com.bytedance.android.livesdk.ui.BaseFragment;
import com.bytedance.android.livesdkapi.depend.model.live.Room;
import com.bytedance.covode.number.Covode;
import com.bytedance.ies.sdk.datachannel.DataChannel;
import java.util.HashMap;
import kotlin.h.b.n;

public final class LiveAdminSettingGuideFragment extends BaseFragment implements View.OnClickListener {
    public final Crj LIZ = 7vl.LIZ(new C1002Fu7(this));
    public HashMap LIZIZ;

    static {
        Covode.recordClassIndex(11323);
    }

    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;
    }

    private final boolean LIZ() {
        return ((Boolean) this.LIZ.getValue()).booleanValue();
    }

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

    public final void onClick(View view) {
        C0989Ftu ftu;
        M12.LIZ(view);
        DataChannel LIZ2 = GSF.LIZ((Fragment) this);
        if (LIZ2 != null) {
            Class<C1056Fuz> cls = C1056Fuz.class;
            int id = view.getId();
            if (id == 2131367545) {
                C3491GtA LIZ3 = C3491GtA.LJFF.LIZ("livesdk_anchor_admin_list_click");
                LIZ3.LIZ();
                LIZ3.LIZLLL();
                C1006FuB.LIZ(getContext());
                2sR<Boolean> r1 = C1781GFy.LJJJLZIJ;
                n.LIZIZ(r1, "");
                r1.LIZ(false);
                C1430G2l.LIZ(LIZ(2131367686));
                ftu = C0989Ftu.MODERATOR_LIST;
            } else if (id == 2131367853) {
                C3491GtA LIZ4 = C3491GtA.LJFF.LIZ("livesdk_anchor_mute_list_click");
                LIZ4.LIZ();
                LIZ4.LIZLLL();
                ftu = C0989Ftu.MUTE;
            } else if (id == 2131366755) {
                C3491GtA LIZ5 = C3491GtA.LJFF.LIZ("livesdk_anchor_blocked_list_click");
                LIZ5.LIZ();
                LIZ5.LIZLLL();
                ftu = C0989Ftu.BLOCK;
            } else if (id == 2131363530) {
                C3491GtA LIZ6 = C3491GtA.LJFF.LIZ("livesdk_comment_settings_click");
                LIZ6.LJ("live_detail");
                LIZ6.LIZLLL();
                2sR<Boolean> r12 = C1781GFy.LJJLJLI;
                n.LIZIZ(r12, "");
                r12.LIZ(false);
                C1430G2l.LIZ(LIZ(2131363531));
                ftu = C0989Ftu.COMMENT_SETTING;
            } else if (id == 2131369257) {
                ftu = C0989Ftu.RANKINGS_SWITCH;
            } else {
                return;
            }
            ftu.next();
            LIZ2.LIZIZ(cls, ftu);
        }
    }

    public final void onViewCreated(View view, Bundle bundle) {
        int i;
        Room room;
        boolean z;
        boolean z2;
        boolean z3;
        RoomAuthStatus roomAuthStatus;
        M12.LIZ(view);
        super.onViewCreated(view, bundle);
        C3491GtA LIZ2 = C3491GtA.LJFF.LIZ("livesdk_anchor_set_page_show");
        LIZ2.LIZ();
        LIZ2.LIZLLL();
        1jk LIZ3 = LIZ(2131372426);
        if (LIZ()) {
            i = 2131829187;
        } else {
            i = 2131830136;
        }
        LIZ3.setText(i);
        2sR<Boolean> r0 = C1781GFy.LJJJLZIJ;
        n.LIZIZ(r0, "");
        Object LIZ4 = r0.LIZ();
        n.LIZIZ(LIZ4, "");
        if (((Boolean) LIZ4).booleanValue()) {
            C1430G2l.LIZIZ(LIZ(2131367686));
        }
        2sR<Boolean> r02 = C1781GFy.LJJLJLI;
        n.LIZIZ(r02, "");
        Object LIZ5 = r02.LIZ();
        n.LIZIZ(LIZ5, "");
        if (((Boolean) LIZ5).booleanValue()) {
            C1430G2l.LIZIZ(LIZ(2131363531));
        }
        DataChannel LIZ6 = GSF.LIZ((Fragment) this);
        if (LIZ6 != null) {
            room = (Room) LIZ6.LIZIZ(C1064Fv7.class);
        } else {
            room = null;
        }
        View LIZ7 = LIZ(2131369257);
        boolean z4 = false;
        if (!LIZ() || !(room == null || (roomAuthStatus = room.getRoomAuthStatus()) == null || roomAuthStatus.getRankingsSwitchStatus() != 0)) {
            z = false;
        } else {
            z = true;
        }
        C1430G2l.LIZ(LIZ7, z);
        View LIZ8 = LIZ(2131363530);
        if (LIZ() || C1429G2k.LIZ.LIZ(1)) {
            z2 = true;
        } else {
            z2 = false;
        }
        C1430G2l.LIZ(LIZ8, z2);
        View LIZ9 = LIZ(2131367853);
        if (LIZ() || C1429G2k.LIZ.LIZ(2)) {
            z3 = true;
        } else {
            z3 = false;
        }
        C1430G2l.LIZ(LIZ9, z3);
        View LIZ10 = LIZ(2131366755);
        if (LIZ() || C1429G2k.LIZ.LIZ(3)) {
            z4 = true;
        }
        C1430G2l.LIZ(LIZ10, z4);
        ((LinearLayout) LIZ(2131363530)).setOnClickListener(this);
        ((LinearLayout) LIZ(2131367545)).setOnClickListener(this);
        LIZ(2131369257).setOnClickListener(this);
        LIZ(2131367853).setOnClickListener(this);
        LIZ(2131366755).setOnClickListener(this);
    }

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