package com.ss.android.ugc.aweme.ui;

import X.2GH;
import X.4Jn;
import X.A7H;
import X.AgB;
import X.AoK;
import X.AoY;
import X.B9X;
import X.C0312Csa;
import X.C0330Css;
import X.C0334Csw;
import X.C0336Csy;
import X.C0382Cus;
import X.C0397Cvh;
import X.C1756Deq;
import X.C1759Det;
import X.C3648EMi;
import X.Ct1;
import X.D1G;
import X.EMX;
import X.EOO;
import X.EP3;
import X.EP4;
import X.EP5;
import X.EP6;
import X.EP7;
import X.EPA;
import X.EPB;
import X.EPC;
import X.EPD;
import X.EPE;
import X.EPF;
import X.KEM;
import X.M12;
import android.view.View;
import com.bytedance.assem.arch.viewModel.AssemViewModel;
import com.bytedance.covode.number.Covode;
import com.ss.android.ugc.aweme.feed.model.Aweme;
import com.ss.android.ugc.aweme.panel.NearbyFeedFragmentPanel;
import com.ss.android.ugc.aweme.vm.NearbyFeedListViewModel;
import kotlin.h.b.n;

public final class NearbyFeedContentAssem extends AgB implements C3648EMi, INearbyContentAssemAbility {
    public static final EPF LJIIJ = new EPF((byte) 0);
    public NearbyFeedFragmentPanel LJIIIIZZ;
    public boolean LJIIIZ;
    public final 4Jn LJIIJJI = new 4Jn(LJIJ(), AoY.LIZ(this, EOO.class, "NearbyFeedContentHierarchyData"));
    public final C0312Csa LJIIL;

    static {
        Covode.recordClassIndex(121093);
    }

    public final NearbyFeedListViewModel LJIJJLI() {
        return (NearbyFeedListViewModel) this.LJIIL.getValue();
    }

    public final 2GH d_(String str) {
        if (str.hashCode() != 2058607272) {
            return null;
        }
        return this;
    }

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

    public final boolean LIZJ() {
        this.LJIIIZ = true;
        return LIZLLL();
    }

    /* JADX WARNING: type inference failed for: r0v0, types: [com.ss.android.ugc.aweme.ui.NearbyFeedContentAssem, X.CuL] */
    public final void cX_() {
        NearbyFeedContentAssem.super.cX_();
        EMX.LIZIZ(this);
    }

    public final boolean LIZ() {
        NearbyFeedFragmentPanel nearbyFeedFragmentPanel = this.LJIIIIZZ;
        if (nearbyFeedFragmentPanel == null) {
            n.LIZ("");
        }
        nearbyFeedFragmentPanel.LIZIZ(this.LJIIIZ);
        LJIJJLI().manualListRefresh();
        return true;
    }

    /* JADX WARNING: type inference failed for: r2v0, types: [X.Cue, com.ss.android.ugc.aweme.ui.NearbyFeedContentAssem] */
    public final boolean LIZIZ() {
        return ((Boolean) C0382Cus.LIZ(this, LJIJJLI(), EPB.LIZ)).booleanValue();
    }

    public final boolean LIZLLL() {
        NearbyFeedFragmentPanel nearbyFeedFragmentPanel = this.LJIIIIZZ;
        if (nearbyFeedFragmentPanel == null) {
            n.LIZ("");
        }
        nearbyFeedFragmentPanel.LIZIZ(this.LJIIIZ);
        LJIJJLI().manualListLoadMore(0L);
        return true;
    }

    /* JADX WARNING: type inference failed for: r12v0, types: [com.ss.android.ugc.aweme.ui.NearbyFeedContentAssem, X.CuL] */
    public NearbyFeedContentAssem() {
        C0312Csa csa;
        C0336Csy csy = C0336Csy.LIZ;
        D1G LIZ = KEM.LIZ.LIZ(NearbyFeedListViewModel.class);
        EPD epd = new EPD(LIZ);
        EPE epe = EPE.INSTANCE;
        if (n.LIZ(csy, C0334Csw.LIZ)) {
            csa = new C0312Csa(LIZ, epd, C0330Css.LIZ, AoK.LIZIZ(this, true), AoK.LIZJ(this, true), A7H.LIZ, epe, AoK.LIZ(this, true), AoK.LIZLLL(this, true));
        } else if (n.LIZ(csy, C0336Csy.LIZ)) {
            csa = new C0312Csa(LIZ, epd, C0330Css.LIZ, AoK.LIZIZ(this, false), AoK.LIZJ(this, false), A7H.LIZ, epe, AoK.LIZ(this, false), AoK.LIZLLL(this, false));
        } else if (csy != null && !n.LIZ(csy, Ct1.LIZ)) {
            throw new IllegalArgumentException("Don't support this VMScope here.");
        } else {
            csa = new C0312Csa(LIZ, epd, C0330Css.LIZ, AoK.LIZ(this, false), AoK.LIZ(this, false), A7H.LIZ, epe, AoK.LIZIZ(this), AoK.LIZJ(this));
        }
        this.LJIIL = csa;
    }

    public static final /* synthetic */ NearbyFeedFragmentPanel LIZ(NearbyFeedContentAssem nearbyFeedContentAssem) {
        NearbyFeedFragmentPanel nearbyFeedFragmentPanel = nearbyFeedContentAssem.LJIIIIZZ;
        if (nearbyFeedFragmentPanel == null) {
            n.LIZ("");
        }
        return nearbyFeedFragmentPanel;
    }

    /* JADX WARNING: type inference failed for: r2v0, types: [X.Cue, com.ss.android.ugc.aweme.ui.NearbyFeedContentAssem] */
    public final boolean LIZ(Aweme aweme) {
        M12.LIZ(aweme);
        return ((Boolean) C0382Cus.LIZ(this, LJIJJLI(), new EP3(this, aweme))).booleanValue();
    }

    public final void LIZIZ(View view) {
        M12.LIZ(view);
        this.LJIIIIZZ = ((EOO) this.LJIIJJI.getValue()).LIZ;
        AssemViewModel.asyncSubscribe$default(LJIJJLI(), C1759Det.LIZ, (C0397Cvh) null, new EP6(this), new EP4(this), new EP7(this), 2, (Object) null);
        AssemViewModel.asyncSubscribe$default(LJIJJLI(), C1756Deq.LIZ, (C0397Cvh) null, new EPC(this), new EP5(this), new EPA(this), 2, (Object) null);
        if (B9X.LIZIZ.LIZ().LIZIZ) {
            LIZ();
        }
    }
}
