package com.ss.android.ugc.aweme.mix.mixdetail.viewholder;

import X.0CH;
import X.2Pr;
import X.4HR;
import X.4hP;
import X.7he;
import X.AMI;
import X.AMV;
import X.AMW;
import X.ANZ;
import X.AO2;
import X.ARD;
import X.ARE;
import X.AnonymousClass9rF;
import X.C0626AAc;
import X.C0627AAd;
import X.C0628AAe;
import X.C0629AAf;
import X.C0630AAg;
import X.C0631AAh;
import X.C0632AAi;
import X.C0633AAj;
import X.C0634AAk;
import X.C0931ALv;
import X.C0933ALx;
import X.C0959AMx;
import X.C0960AMy;
import X.C0962ANa;
import X.C0963ANb;
import X.C1823AiR;
import X.C2573AuX;
import X.Crj;
import X.Csa;
import X.Csw;
import X.Csy;
import X.Ct1;
import X.Cuh;
import X.Cus;
import X.Cv8;
import X.Cvh;
import X.CwK;
import X.CwU;
import X.Cwc;
import X.Cwf;
import X.D1G;
import X.DaP;
import X.KEM;
import X.LsC;
import X.LsD;
import X.LsE;
import X.LsF;
import X.Lsh;
import X.M12;
import X.OCa;
import X.PHD;
import X.Qeg;
import android.content.res.Resources;
import android.view.View;
import android.view.ViewGroup;
import com.bytedance.assem.arch.viewModel.AssemViewModel;
import com.bytedance.covode.number.Covode;
import com.bytedance.ies.powerlist.PowerCell;
import com.ss.android.ugc.aweme.feed.model.AwemeStatistics;
import com.ss.android.ugc.aweme.mix.mixdetail.viewmodel.MixVideosManageViewModel;
import kotlin.h.b.n;

public final class MixFeedManageCell extends PowerCell<C0933ALx> implements ARE, C1823AiR {
    public final Crj LIZ;
    public boolean LIZIZ;
    public final Csa LJIIIZ;

    static {
        Covode.recordClassIndex(92580);
    }

    public final MixVideosManageViewModel LIZJ() {
        return (MixVideosManageViewModel) this.LJIIIZ.getValue();
    }

    public final void LIZIZ() {
        this.itemView.setBackgroundColor(0);
    }

    public final 0CH getActualLifecycleOwner() {
        ARD.LIZIZ(this);
        return this;
    }

    public final Cv8 getActualLifecycleOwnerHolder() {
        ARD.LIZ(this);
        return this;
    }

    public final 4hP getActualReceiver() {
        ARD.LIZLLL(this);
        return this;
    }

    public final Cuh<4hP> getActualReceiverHolder() {
        ARD.LIZJ(this);
        return this;
    }

    public final 0CH getHostLifecycleOwner() {
        M12.LIZ(this);
        return null;
    }

    public final 0CH getOwnLifecycleOwner() {
        ARD.LJ(this);
        return this;
    }

    public final 4hP getReceiverForHostVM() {
        M12.LIZ(this);
        return null;
    }

    public final boolean getUniqueOnlyDefault() {
        return ARD.LJFF(this);
    }

    public final void LIZ() {
        View view = this.itemView;
        View view2 = this.itemView;
        n.LIZIZ(view2, "");
        view.setBackgroundColor(view2.getResources().getColor(2131099658));
    }

    public final void bD_() {
        MixFeedManageCell.super.bD_();
        Cus.LIZ(this, LIZJ(), C0960AMy.LIZ, C0959AMx.LIZ, (Cvh) null, new C0931ALv(this), 12);
    }

    public MixFeedManageCell() {
        Csa csa;
        Csw csw = Csw.LIZ;
        D1G LIZ2 = KEM.LIZ.LIZ(MixVideosManageViewModel.class);
        C0634AAk aAk = new C0634AAk(LIZ2);
        AMI ami = AMI.INSTANCE;
        if (n.LIZ(csw, Csw.LIZ)) {
            csa = new Csa(LIZ2, aAk, C0962ANa.INSTANCE, new C0627AAd(this), new C0626AAc(this), AMW.INSTANCE, ami);
        } else if (n.LIZ(csw, Csy.LIZ)) {
            csa = new Csa(LIZ2, aAk, C0963ANb.INSTANCE, new C0629AAf(this), new C0628AAe(this), AMV.INSTANCE, ami);
        } else if (csw != null && !n.LIZ(csw, Ct1.LIZ)) {
            throw new IllegalArgumentException("Don't support this VMScope: " + csw + " there");
        } else {
            csa = new Csa(LIZ2, aAk, ANZ.INSTANCE, new C0632AAi(this), new C0630AAg(this), new C0631AAh(this), ami);
        }
        this.LJIIIZ = csa;
        this.LIZ = 7he.LIZ(new C0633AAj(this));
    }

    public final View LIZ(ViewGroup viewGroup) {
        M12.LIZ(viewGroup);
        return LIZ(viewGroup, 2131560635);
    }

    public final /* synthetic */ void LIZ(DaP daP) {
        C0933ALx aLx = (C0933ALx) daP;
        M12.LIZ(aLx);
        View view = this.itemView;
        n.LIZIZ(view, "");
        OCa.LIZ(view.findViewById(2131363818), aLx.LIZIZ);
        String str = aLx.LIZJ;
        if (str == null || str.length() <= 0) {
            View view2 = this.itemView;
            n.LIZIZ(view2, "");
            Qeg findViewById = view2.findViewById(2131367671);
            n.LIZIZ(findViewById, "");
            findViewById.setVisibility(8);
        } else {
            View view3 = this.itemView;
            n.LIZIZ(view3, "");
            Qeg findViewById2 = view3.findViewById(2131367671);
            n.LIZIZ(findViewById2, "");
            findViewById2.setVisibility(0);
            View view4 = this.itemView;
            n.LIZIZ(view4, "");
            Qeg findViewById3 = view4.findViewById(2131367671);
            n.LIZIZ(findViewById3, "");
            C2573AuX auX = new C2573AuX();
            String str2 = aLx.LIZJ;
            if (str2 == null) {
                str2 = "";
            }
            auX.LIZ(str2);
            findViewById3.setText(auX.LIZ);
        }
        View view5 = this.itemView;
        n.LIZIZ(view5, "");
        Qeg findViewById4 = view5.findViewById(2131367672);
        n.LIZIZ(findViewById4, "");
        Resources LIZ2 = AnonymousClass9rF.LIZ();
        AwemeStatistics statistics = aLx.LJ.getStatistics();
        n.LIZIZ(statistics, "");
        findViewById4.setText(LIZ2.getQuantityString(2131689726, (int) statistics.getPlayCount(), new Object[]{aLx.LIZLLL}));
        LIZ(LIZJ(), new AO2(this));
    }

    public final <VM1 extends AssemViewModel<S1>, S1 extends 4HR, R> R LIZ(VM1 vm1, LsC<? super S1, ? extends R> lsC) {
        M12.LIZ(vm1, lsC);
        return ARD.LIZ(this, vm1, lsC);
    }

    public final <S extends 4HR> void subscribe(AssemViewModel<S> assemViewModel, Cvh<S> cvh, LsC<? super Throwable, 2Pr> lsC, LsD<? super 4hP, ? super S, 2Pr> lsD) {
        M12.LIZ(assemViewModel, cvh, lsD);
        ARD.LIZ(this, assemViewModel, cvh, lsC, lsD);
    }

    public final <S extends 4HR, A> void selectSubscribe(AssemViewModel<S> assemViewModel, PHD<S, ? extends A> phd, Cvh<CwK<A>> cvh, LsC<? super Throwable, 2Pr> lsC, LsD<? super 4hP, ? super A, 2Pr> lsD) {
        M12.LIZ(assemViewModel, phd, cvh, lsD);
        ARD.LIZ(this, assemViewModel, phd, cvh, lsC, lsD);
    }

    public final <S extends 4HR, A> void selectSubscribeOnAsync(AssemViewModel<S> assemViewModel, PHD<S, ? extends A> phd, Cvh<CwK<A>> cvh, LsC<? super Throwable, 2Pr> lsC, LsD<? super 4hP, ? super A, 2Pr> lsD) {
        M12.LIZ(assemViewModel, phd, cvh, lsD);
        ARD.LIZIZ(this, assemViewModel, phd, cvh, lsC, lsD);
    }

    public final <S extends 4HR, A, B> void selectSubscribe(AssemViewModel<S> assemViewModel, PHD<S, ? extends A> phd, PHD<S, ? extends B> phd2, Cvh<CwU<A, B>> cvh, LsC<? super Throwable, 2Pr> lsC, LsE<? super 4hP, ? super A, ? super B, 2Pr> lsE) {
        M12.LIZ(assemViewModel, phd, phd2, cvh, lsE);
        ARD.LIZ(this, assemViewModel, phd, phd2, cvh, lsC, lsE);
    }

    public final <S extends 4HR, A, B, C> void selectSubscribe(AssemViewModel<S> assemViewModel, PHD<S, ? extends A> phd, PHD<S, ? extends B> phd2, PHD<S, ? extends C> phd3, Cvh<Cwc<A, B, C>> cvh, LsC<? super Throwable, 2Pr> lsC, LsF<? super 4hP, ? super A, ? super B, ? super C, 2Pr> lsF) {
        LsF<? super 4hP, ? super A, ? super B, ? super C, 2Pr> lsF2 = lsF;
        AssemViewModel<S> assemViewModel2 = assemViewModel;
        PHD<S, ? extends A> phd4 = phd;
        PHD<S, ? extends B> phd5 = phd2;
        PHD<S, ? extends C> phd6 = phd3;
        Cvh<Cwc<A, B, C>> cvh2 = cvh;
        M12.LIZ(assemViewModel2, phd4, phd5, phd6, cvh2, lsF2);
        ARD.LIZ(this, assemViewModel2, phd4, phd5, phd6, cvh2, lsC, lsF2);
    }

    public final <S extends 4HR, A, B, C, D> void selectSubscribe(AssemViewModel<S> assemViewModel, PHD<S, ? extends A> phd, PHD<S, ? extends B> phd2, PHD<S, ? extends C> phd3, PHD<S, ? extends D> phd4, Cvh<Cwf<A, B, C, D>> cvh, LsC<? super Throwable, 2Pr> lsC, Lsh<? super 4hP, ? super A, ? super B, ? super C, ? super D, 2Pr> lsh) {
        Lsh<? super 4hP, ? super A, ? super B, ? super C, ? super D, 2Pr> lsh2 = lsh;
        AssemViewModel<S> assemViewModel2 = assemViewModel;
        PHD<S, ? extends A> phd5 = phd;
        PHD<S, ? extends B> phd6 = phd2;
        PHD<S, ? extends C> phd7 = phd3;
        PHD<S, ? extends D> phd8 = phd4;
        Cvh<Cwf<A, B, C, D>> cvh2 = cvh;
        M12.LIZ(assemViewModel2, phd5, phd6, phd7, phd8, cvh2, lsh2);
        ARD.LIZ(this, assemViewModel2, phd5, phd6, phd7, phd8, cvh2, lsC, lsh2);
    }
}
