package com.ss.android.ugc.aweme.filter.view.internal.filterbox;

import X.0CB;
import X.0CH;
import X.1Bn;
import X.2cN;
import X.6Is;
import X.C1084Mk3;
import X.C1183Mle;
import X.C1185Mlg;
import X.C1186Mlh;
import X.C1212Mm7;
import X.C1219MmE;
import X.C1220MmF;
import X.C1221MmG;
import X.C1256Mmp;
import X.CwZ;
import X.Cwu;
import X.M12;
import X.PhE;
import X.PlI;
import androidx.lifecycle.LiveData;
import com.bytedance.covode.number.Covode;
import com.ss.android.ugc.tools.view.base.HumbleViewModel;

public final class FilterBoxViewModel extends HumbleViewModel implements 6Is, C1212Mm7 {
    public final 1Bn<Cwu<C1256Mmp, C1185Mlg>> LIZ = new 1Bn<>();
    public C1221MmG LIZIZ;
    public 2cN LIZJ;
    public final C1183Mle LIZLLL;

    static {
        Covode.recordClassIndex(80381);
    }

    public final void onStateChanged(0CH r1, 0CB r2) {
        super.onStateChanged(r1, r2);
    }

    public final LiveData<Cwu<C1256Mmp, C1185Mlg>> LIZ() {
        return this.LIZ;
    }

    public final void LIZJ() {
        C1221MmG mmG = this.LIZIZ;
        if (mmG != null) {
            mmG.LIZIZ();
        }
    }

    public final void onCleared() {
        2cN r0 = this.LIZJ;
        if (r0 != null) {
            r0.dispose();
        }
        this.LIZJ = null;
    }

    public final void LIZIZ() {
        2cN r0 = this.LIZJ;
        if (r0 != null) {
            r0.dispose();
        }
        this.LIZJ = null;
        this.LIZIZ = null;
        if (!isDestroyed()) {
            this.LIZ.setValue(CwZ.LIZ(C1256Mmp.LOADING, (Object) null));
            this.LIZJ = this.LIZLLL.LIZ().LIZIZ(PhE.LIZIZ(PlI.LIZJ)).LIZ(C1084Mk3.LIZ()).LIZ(new C1219MmE(this), new C1220MmF(this));
        }
    }

    public final void LIZ(C1186Mlh mlh) {
        M12.LIZ(mlh);
        C1221MmG mmG = this.LIZIZ;
        if (mmG != null) {
            mmG.LIZ(mlh);
        }
    }

    public final void LIZIZ(C1186Mlh mlh) {
        M12.LIZ(mlh);
        C1221MmG mmG = this.LIZIZ;
        if (mmG != null) {
            mmG.LIZIZ(mlh);
        }
    }

    /* JADX INFO: super call moved to the top of the method (can break code semantics) */
    public FilterBoxViewModel(0CH r2, C1183Mle mle) {
        super(r2);
        M12.LIZ(r2, mle);
        this.LIZLLL = mle;
    }
}
