package com.ss.android.ugc.aweme.sticker.view.internal.pager.pages;

import X.7he;
import X.C1294MnR;
import X.C1524Mr9;
import X.C2228N5z;
import X.C2268N7n;
import X.C2310N9d;
import X.C2336NAd;
import X.C2780NRf;
import X.Crj;
import X.M12;
import X.N6I;
import X.N6J;
import X.N6O;
import X.N6Q;
import X.N6U;
import X.N7A;
import X.N7F;
import X.N7H;
import X.N7O;
import android.os.Bundle;
import android.view.View;
import androidx.recyclerview.widget.RecyclerView;
import com.bytedance.covode.number.Covode;
import com.ss.android.ugc.aweme.sticker.original.OriginalStickerViewModel;
import com.ss.android.ugc.effectmanager.effect.model.Effect;
import kotlin.h.b.n;

public class OriginalFragment extends StickerCategoryFragment {
    public static final N6O LJIILL = new N6O((byte) 0);
    public int LJIIJJI;
    public N6U LJIIL;
    public Effect LJIILIIL;
    public OriginalStickerViewModel LJIILJJIL;
    public final Crj LJIL = 7he.LIZ(new N6J(this));
    public final Crj LJJ = 7he.LIZ(new N6Q(this));

    static {
        Covode.recordClassIndex(116642);
    }

    public void onSaveInstanceState(Bundle bundle) {
        M12.LIZ(bundle);
    }

    public final void LJIIJ() {
        LJIILL().LIZ("mCategoryKey");
    }

    public final C2228N5z<Effect> LJIILIIL() {
        C2310N9d LIZLLL = LIZLLL();
        C2336NAd LJ = LJ();
        C2268N7n LJFF = LJFF();
        N6U n6u = this.LJIIL;
        if (n6u == null) {
            n.LIZ("");
        }
        Effect effect = this.LJIILIIL;
        if (effect == null) {
            n.LIZ("");
        }
        OriginalStickerViewModel originalStickerViewModel = new OriginalStickerViewModel(this, LIZLLL, LJ, LJFF, n6u, effect);
        this.LJIILJJIL = originalStickerViewModel;
        return originalStickerViewModel;
    }

    public final N7A LJIILJJIL() {
        return new N7F(LIZLLL(), LJFF(), LJIILL(), LJIIIIZZ().LJFF, LJI().LIZLLL, LJI().LIZIZ);
    }

    public final C1524Mr9<C1294MnR> LIZIZ(View view) {
        M12.LIZ(view);
        return super.LIZIZ(view);
    }

    public final void LIZ(int i) {
        if (i != this.LJIIJJI) {
            this.LJIIJJI = i;
            N6U n6u = this.LJIIL;
            if (n6u == null) {
                n.LIZ("");
            }
            n6u.LIZ(C2780NRf.LJJJI, C2780NRf.LJJJ, new N6I(this));
        }
    }

    public final void LIZ(N7O n7o, N7H n7h, RecyclerView.RecycledViewPool recycledViewPool, N6U n6u, Effect effect) {
        M12.LIZ(n7o, n7h, n6u, effect);
        LIZ(0, n7o, n7h, recycledViewPool);
        this.LJIIL = n6u;
        this.LJIILIIL = effect;
        this.LJIJI = true;
    }
}
