package com.ss.android.ugc.aweme.prop.fragment;

import X.0HH;
import X.2uR;
import X.3Ct;
import X.3S8;
import X.3YD;
import X.3cA;
import X.3cC;
import X.3cI;
import X.C3562BPa;
import X.C3569BPh;
import X.C3570BPi;
import X.C3571BPj;
import X.C3572BPk;
import X.M12;
import android.os.Bundle;
import android.util.SparseArray;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import androidx.fragment.app.Fragment;
import com.bytedance.covode.number.Covode;
import com.bytedance.tux.sheet.sheet.TuxSheet;
import kotlin.h.b.n;

public final class MediaFilterFragment extends Fragment implements 3YD {
    public static int LIZIZ;
    public static final C3572BPk LIZJ = new C3572BPk((byte) 0);
    public C3562BPa LIZ;
    public SparseArray LIZLLL;

    static {
        Covode.recordClassIndex(100776);
    }

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

    public final /* synthetic */ void onDestroyView() {
        MediaFilterFragment.super.onDestroyView();
        SparseArray sparseArray = this.LIZLLL;
        if (sparseArray != null) {
            sparseArray.clear();
        }
    }

    public final 2uR ch_() {
        2uR r3 = new 2uR();
        3cC r2 = new 3cC();
        String string = getString(2131825430);
        n.LIZIZ(string, "");
        r2.LIZ(string);
        r3.LIZ(r2);
        3cA r1 = new 3cA();
        r1.LIZ(2131755740);
        r1.LIZ(new C3569BPh(this));
        r3.LIZIZ(new 3cI[]{r1});
        return r3;
    }

    public final void LIZ(int i) {
        int i2;
        LIZIZ = i;
        ImageView imageView = (ImageView) LIZIZ(2131366692);
        int i3 = 2131233874;
        if (i == 0) {
            i2 = 2131233874;
        } else {
            i2 = 2131233876;
        }
        imageView.setImageResource(i2);
        ImageView imageView2 = (ImageView) LIZIZ(2131366693);
        if (i != 3) {
            i3 = 2131233876;
        }
        imageView2.setImageResource(i3);
        C3562BPa bPa = this.LIZ;
        if (bPa != null) {
            bPa.LIZ(LIZIZ);
        }
        3S8.LIZ(TuxSheet.LJIJI, this);
    }

    public final void onViewCreated(View view, Bundle bundle) {
        int i;
        M12.LIZ(view);
        MediaFilterFragment.super.onViewCreated(view, bundle);
        LinearLayout linearLayout = (LinearLayout) LIZIZ(2131366840);
        n.LIZIZ(linearLayout, "");
        linearLayout.setBackground(3Ct.LIZLLL(getContext()));
        LinearLayout linearLayout2 = (LinearLayout) LIZIZ(2131366841);
        n.LIZIZ(linearLayout2, "");
        linearLayout2.setBackground(3Ct.LIZLLL(getContext()));
        ImageView imageView = (ImageView) LIZIZ(2131366692);
        int i2 = 2131233874;
        if (LIZIZ == 0) {
            i = 2131233874;
        } else {
            i = 2131233876;
        }
        imageView.setImageResource(i);
        ImageView imageView2 = (ImageView) LIZIZ(2131366693);
        if (LIZIZ != 3) {
            i2 = 2131233876;
        }
        imageView2.setImageResource(i2);
        ((LinearLayout) LIZIZ(2131366840)).setOnClickListener(new C3570BPi(this));
        ((LinearLayout) LIZIZ(2131366841)).setOnClickListener(new C3571BPj(this));
    }

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