package ao; import android.content.Context; import android.net.Uri; import android.view.View; import android.view.ViewGroup; import android.widget.FrameLayout; import android.widget.ImageView; import bj2.l; import com.xingin.alpha.R$id; import com.xingin.alpha.end.endpage.EmceeEndLiveV2View; import com.xingin.alpha.end.endpage.card.EmceeEndPageBaseInfoCardView; import com.xingin.alpha.end.endpage.card.EmceeEndPageCollectCardView; import com.xingin.alpha.end.endpage.card.EmceeEndPageEvaluateView; import com.xingin.alpha.end.endpage.card.EmceeEndPageGoodsInfoCardView; import com.xingin.alpha.end.endpage.card.EmceeEndPageStrategyCardView; import com.xingin.alpha.end.endpage.card.EmceeEndPageWarningCardView; import com.xingin.alpha.end.endpage.model.EmceeEndPageFeedbackModel; import com.xingin.alpha.end.endpage.model.EmceeEndPageStrategyModel; import com.xingin.alpha.end.endpage.model.EmceeEndPageWarningModel; import com.xingin.alpha.goods.ranking.AlphaEmceeLiveEndTipsDialog; import com.xingin.android.xhscomm.router.Routers; import com.xingin.ui.textview.XYTextView; import com.xingin.widgets.XYImageView; import el.g0; import java.util.Iterator; import java.util.List; import kotlin.Metadata; import kotlin.Unit; import kotlin.jvm.functions.Function0; import kotlin.jvm.internal.Intrinsics; import kotlin.jvm.internal.Lambda; import sy.q1; import sy.u; import tu0.s; @Metadata(bv = {}, d1 = {"\u0000Z\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\t\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000b\n\u0002\b\u000b\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001B\u000f\u0012\u0006\u0010'\u001a\u00020\u0002¢\u0006\u0004\b(\u0010)J\b\u0010\u0004\u001a\u00020\u0003H\u0014J\u0006\u0010\u0005\u001a\u00020\u0003J$\u0010\r\u001a\u00020\u00032\f\u0010\b\u001a\b\u0012\u0004\u0012\u00020\u00070\u00062\u0006\u0010\n\u001a\u00020\t2\u0006\u0010\f\u001a\u00020\u000bJ\u0006\u0010\u000e\u001a\u00020\u0003J\u0016\u0010\u0013\u001a\u00020\u00032\u0006\u0010\u0010\u001a\u00020\u000f2\u0006\u0010\u0012\u001a\u00020\u0011J\u0006\u0010\u0014\u001a\u00020\u0003J\u0010\u0010\u0016\u001a\u00020\u00032\u0006\u0010\u0015\u001a\u00020\u0007H\u0002J\u0012\u0010\u0018\u001a\u0004\u0018\u00010\u00172\u0006\u0010\u0015\u001a\u00020\u0007H\u0002J \u0010\u001d\u001a\u0004\u0018\u00010\u00172\u0006\u0010\u001a\u001a\u00020\u00192\f\u0010\u001c\u001a\b\u0012\u0004\u0012\u00020\u00170\u001bH\u0002R%\u0010!\u001a\u0010\u0012\f\u0012\n *\u0004\u0018\u00010\u001f0\u001f0\u001e8\u0006¢\u0006\f\n\u0004\b!\u0010\"\u001a\u0004\b#\u0010$R%\u0010%\u001a\u0010\u0012\f\u0012\n *\u0004\u0018\u00010\u001f0\u001f0\u001e8\u0006¢\u0006\f\n\u0004\b%\u0010\"\u001a\u0004\b&\u0010$¨\u0006*"}, d2 = {"Lao/n;", "Ltu0/s;", "Lcom/xingin/alpha/end/endpage/EmceeEndLiveV2View;", "", "didLoad", "j", "", "Lco/g;", "listData", "", "roomId", "", "emceeId", "d", "k", "Landroid/content/Context;", "context", "Llr/b;", "data", "l", "i", "model", "m", "Lbo/e;", y7.f.f156778k, "Landroid/view/ViewGroup;", "container", "Lkotlin/Function0;", "constructFun", "e", "Ldx2/d;", "", "kotlin.jvm.PlatformType", "finishPublishSubject", "Ldx2/d;", z60.h.f160753a, "()Ldx2/d;", "emceeCenterSubject", "g", qo2.a.COPY_LINK_TYPE_VIEW, "<init>", "(Lcom/xingin/alpha/end/endpage/EmceeEndLiveV2View;)V", "alpha_library_release"}, k = 1, mv = {1, 6, 0}) /* compiled from: EmceeEndLiveV2Presenter.kt */ public final class n extends s<EmceeEndLiveV2View> { /* renamed from: a reason: collision with root package name */ public long f4377a; /* renamed from: b reason: collision with root package name */ public String f4378b = ""; /* renamed from: c reason: collision with root package name */ public final dx2.d<Boolean> f4379c; /* renamed from: d reason: collision with root package name */ public final dx2.d<Boolean> f4380d; @Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0010\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "", "invoke"}, k = 3, mv = {1, 6, 0}, xi = 48) /* compiled from: EmceeEndLiveV2Presenter.kt */ public static final class a extends Lambda implements Function0<Unit> { /* renamed from: a reason: collision with root package name */ public final /* synthetic */ n f4381a; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public a(n nVar) { super(0); this.f4381a = nVar; } @Override // kotlin.jvm.functions.Function0 public final void invoke() { this.f4381a.h().a(Boolean.TRUE); } } @Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0010\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "", "invoke"}, k = 3, mv = {1, 6, 0}, xi = 48) /* compiled from: EmceeEndLiveV2Presenter.kt */ public static final class b extends Lambda implements Function0<Unit> { /* renamed from: a reason: collision with root package name */ public final /* synthetic */ n f4382a; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public b(n nVar) { super(0); this.f4382a = nVar; } @Override // kotlin.jvm.functions.Function0 public final void invoke() { this.f4382a.g().a(Boolean.TRUE); } } @Metadata(bv = {}, d1 = {"\u0000\b\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0001\u001a\u00020\u0000H\n¢\u0006\u0004\b\u0001\u0010\u0002"}, d2 = {"Lbo/e;", "a", "()Lbo/e;"}, k = 3, mv = {1, 6, 0}) /* compiled from: EmceeEndLiveV2Presenter.kt */ public static final class c extends Lambda implements Function0<bo.e> { /* renamed from: a reason: collision with root package name */ public final /* synthetic */ n f4383a; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public c(n nVar) { super(0); this.f4383a = nVar; } /* renamed from: a */ public final bo.e invoke() { Context context = n.b(this.f4383a).getContext(); Intrinsics.checkNotNullExpressionValue(context, "view.context"); return new EmceeEndPageBaseInfoCardView(context, null, 0, 6, null); } } @Metadata(bv = {}, d1 = {"\u0000\b\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0001\u001a\u00020\u0000H\n¢\u0006\u0004\b\u0001\u0010\u0002"}, d2 = {"Lbo/e;", "a", "()Lbo/e;"}, k = 3, mv = {1, 6, 0}) /* compiled from: EmceeEndLiveV2Presenter.kt */ public static final class d extends Lambda implements Function0<bo.e> { /* renamed from: a reason: collision with root package name */ public final /* synthetic */ n f4384a; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public d(n nVar) { super(0); this.f4384a = nVar; } /* renamed from: a */ public final bo.e invoke() { Context context = n.b(this.f4384a).getContext(); Intrinsics.checkNotNullExpressionValue(context, "view.context"); return new bo.d(context, null, 0, 6, null); } } @Metadata(bv = {}, d1 = {"\u0000\b\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0001\u001a\u00020\u0000H\n¢\u0006\u0004\b\u0001\u0010\u0002"}, d2 = {"Lbo/e;", "a", "()Lbo/e;"}, k = 3, mv = {1, 6, 0}) /* compiled from: EmceeEndLiveV2Presenter.kt */ public static final class e extends Lambda implements Function0<bo.e> { /* renamed from: a reason: collision with root package name */ public final /* synthetic */ n f4385a; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public e(n nVar) { super(0); this.f4385a = nVar; } /* renamed from: a */ public final bo.e invoke() { Context context = n.b(this.f4385a).getContext(); Intrinsics.checkNotNullExpressionValue(context, "view.context"); return new EmceeEndPageGoodsInfoCardView(context, null, 0, 6, null); } } @Metadata(bv = {}, d1 = {"\u0000\b\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0001\u001a\u00020\u0000H\n¢\u0006\u0004\b\u0001\u0010\u0002"}, d2 = {"Lbo/e;", "a", "()Lbo/e;"}, k = 3, mv = {1, 6, 0}) /* compiled from: EmceeEndLiveV2Presenter.kt */ public static final class f extends Lambda implements Function0<bo.e> { /* renamed from: a reason: collision with root package name */ public final /* synthetic */ n f4386a; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public f(n nVar) { super(0); this.f4386a = nVar; } /* renamed from: a */ public final bo.e invoke() { Context context = n.b(this.f4386a).getContext(); Intrinsics.checkNotNullExpressionValue(context, "view.context"); return new EmceeEndPageCollectCardView(context, null, 0, 6, null); } } @Metadata(bv = {}, d1 = {"\u0000\b\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0001\u001a\u00020\u0000H\n¢\u0006\u0004\b\u0001\u0010\u0002"}, d2 = {"Lbo/e;", "a", "()Lbo/e;"}, k = 3, mv = {1, 6, 0}) /* compiled from: EmceeEndLiveV2Presenter.kt */ public static final class g extends Lambda implements Function0<bo.e> { /* renamed from: a reason: collision with root package name */ public final /* synthetic */ n f4387a; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public g(n nVar) { super(0); this.f4387a = nVar; } /* renamed from: a */ public final bo.e invoke() { Context context = n.b(this.f4387a).getContext(); Intrinsics.checkNotNullExpressionValue(context, "view.context"); return new bo.c(context, null, 0, 6, null); } } @Metadata(bv = {}, d1 = {"\u0000\b\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0001\u001a\u00020\u0000H\n¢\u0006\u0004\b\u0001\u0010\u0002"}, d2 = {"Lbo/e;", "a", "()Lbo/e;"}, k = 3, mv = {1, 6, 0}) /* compiled from: EmceeEndLiveV2Presenter.kt */ public static final class h extends Lambda implements Function0<bo.e> { /* renamed from: a reason: collision with root package name */ public final /* synthetic */ n f4388a; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public h(n nVar) { super(0); this.f4388a = nVar; } /* renamed from: a */ public final bo.e invoke() { Context context = n.b(this.f4388a).getContext(); Intrinsics.checkNotNullExpressionValue(context, "view.context"); return new EmceeEndPageStrategyCardView(context, null, 0, 6, null); } } @Metadata(bv = {}, d1 = {"\u0000\b\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0001\u001a\u00020\u0000H\n¢\u0006\u0004\b\u0001\u0010\u0002"}, d2 = {"Lbo/e;", "a", "()Lbo/e;"}, k = 3, mv = {1, 6, 0}) /* compiled from: EmceeEndLiveV2Presenter.kt */ public static final class i extends Lambda implements Function0<bo.e> { /* renamed from: a reason: collision with root package name */ public final /* synthetic */ n f4389a; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public i(n nVar) { super(0); this.f4389a = nVar; } /* renamed from: a */ public final bo.e invoke() { Context context = n.b(this.f4389a).getContext(); Intrinsics.checkNotNullExpressionValue(context, "view.context"); return new EmceeEndPageWarningCardView(context, null, 0, 6, null); } } @Metadata(bv = {}, d1 = {"\u0000\b\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0001\u001a\u00020\u0000H\n¢\u0006\u0004\b\u0001\u0010\u0002"}, d2 = {"Lbo/e;", "a", "()Lbo/e;"}, k = 3, mv = {1, 6, 0}) /* compiled from: EmceeEndLiveV2Presenter.kt */ public static final class j extends Lambda implements Function0<bo.e> { /* renamed from: a reason: collision with root package name */ public final /* synthetic */ n f4390a; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public j(n nVar) { super(0); this.f4390a = nVar; } /* renamed from: a */ public final bo.e invoke() { Context context = n.b(this.f4390a).getContext(); Intrinsics.checkNotNullExpressionValue(context, "view.context"); return new EmceeEndPageEvaluateView(context, null, 0, 6, null); } } @Metadata(bv = {}, d1 = {"\u0000\b\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0001\u001a\u00020\u0000H\n¢\u0006\u0004\b\u0001\u0010\u0002"}, d2 = {"Lbo/e;", "a", "()Lbo/e;"}, k = 3, mv = {1, 6, 0}) /* compiled from: EmceeEndLiveV2Presenter.kt */ public static final class k extends Lambda implements Function0<bo.e> { /* renamed from: a reason: collision with root package name */ public final /* synthetic */ n f4391a; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public k(n nVar) { super(0); this.f4391a = nVar; } /* renamed from: a */ public final bo.e invoke() { Context context = n.b(this.f4391a).getContext(); Intrinsics.checkNotNullExpressionValue(context, "view.context"); return new bo.b(context, null, 0, 6, null); } } /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public n(EmceeEndLiveV2View emceeEndLiveV2View) { super(emceeEndLiveV2View); Intrinsics.checkNotNullParameter(emceeEndLiveV2View, qo2.a.COPY_LINK_TYPE_VIEW); dx2.d<Boolean> b24 = dx2.d.b2(); Intrinsics.checkNotNullExpressionValue(b24, "create<Boolean>()"); this.f4379c = b24; dx2.d<Boolean> b25 = dx2.d.b2(); Intrinsics.checkNotNullExpressionValue(b25, "create<Boolean>()"); this.f4380d = b25; } public static final /* synthetic */ EmceeEndLiveV2View b(n nVar) { return (EmceeEndLiveV2View) nVar.getView(); } public final void d(List<? extends co.g> list, long j14, String str) { Intrinsics.checkNotNullParameter(list, "listData"); Intrinsics.checkNotNullParameter(str, "emceeId"); this.f4377a = j14; this.f4378b = str; Iterator<T> it3 = list.iterator(); while (it3.hasNext()) { m(it3.next()); } } @Override // tu0.n public void didLoad() { super.didLoad(); ImageView imageView = (ImageView) ((EmceeEndLiveV2View) getView())._$_findCachedViewById(R$id.cdu); Intrinsics.checkNotNullExpressionValue(imageView, "view.ivReturn"); q1.S(imageView, 0, new a(this), 1, null); XYTextView xYTextView = (XYTextView) ((EmceeEndLiveV2View) getView())._$_findCachedViewById(R$id.aza); Intrinsics.checkNotNullExpressionValue(xYTextView, "view.emceeCenterView"); q1.S(xYTextView, 0, new b(this), 1, null); } public final bo.e e(ViewGroup viewGroup, Function0<? extends bo.e> function0) { View view = null; if (viewGroup.getChildCount() == 0) { bo.e eVar = (bo.e) function0.invoke(); if (eVar instanceof View) { view = (View) eVar; } if (view != null) { viewGroup.addView(view); l.q(viewGroup); } return eVar; } View childAt = viewGroup.getChildAt(0); if (childAt instanceof bo.e) { return (bo.e) childAt; } return null; } public final bo.e f(co.g gVar) { if (gVar instanceof co.a) { FrameLayout frameLayout = (FrameLayout) ((EmceeEndLiveV2View) getView())._$_findCachedViewById(R$id.f39748baseInfoContainer); Intrinsics.checkNotNullExpressionValue(frameLayout, "view.baseInfoContainer"); return e(frameLayout, new c(this)); } else if (gVar instanceof co.f) { FrameLayout frameLayout2 = (FrameLayout) ((EmceeEndLiveV2View) getView())._$_findCachedViewById(R$id.frj); Intrinsics.checkNotNullExpressionValue(frameLayout2, "view.topInfoContainer"); return e(frameLayout2, new d(this)); } else if (gVar instanceof co.d) { FrameLayout frameLayout3 = (FrameLayout) ((EmceeEndLiveV2View) getView())._$_findCachedViewById(R$id.bfr); Intrinsics.checkNotNullExpressionValue(frameLayout3, "view.goodsInfoContainer"); return e(frameLayout3, new e(this)); } else if (gVar instanceof co.b) { FrameLayout frameLayout4 = (FrameLayout) ((EmceeEndLiveV2View) getView())._$_findCachedViewById(R$id.aez); Intrinsics.checkNotNullExpressionValue(frameLayout4, "view.collectInfoContainer"); return e(frameLayout4, new f(this)); } else if (gVar instanceof co.e) { FrameLayout frameLayout5 = (FrameLayout) ((EmceeEndLiveV2View) getView())._$_findCachedViewById(R$id.e8s); Intrinsics.checkNotNullExpressionValue(frameLayout5, "view.previewInfoContainer"); return e(frameLayout5, new g(this)); } else if (gVar instanceof EmceeEndPageStrategyModel) { FrameLayout frameLayout6 = (FrameLayout) ((EmceeEndLiveV2View) getView())._$_findCachedViewById(R$id.f39914strategyInfoContainer); Intrinsics.checkNotNullExpressionValue(frameLayout6, "view.strategyInfoContainer"); return e(frameLayout6, new h(this)); } else if (gVar instanceof EmceeEndPageWarningModel) { FrameLayout frameLayout7 = (FrameLayout) ((EmceeEndLiveV2View) getView())._$_findCachedViewById(R$id.ghs); Intrinsics.checkNotNullExpressionValue(frameLayout7, "view.warningContainer"); return e(frameLayout7, new i(this)); } else if (gVar instanceof co.c) { FrameLayout frameLayout8 = (FrameLayout) ((EmceeEndLiveV2View) getView())._$_findCachedViewById(R$id.b3r); Intrinsics.checkNotNullExpressionValue(frameLayout8, "view.evaluateContainer"); return e(frameLayout8, new j(this)); } else if (!(gVar instanceof EmceeEndPageFeedbackModel)) { return null; } else { FrameLayout frameLayout9 = (FrameLayout) ((EmceeEndLiveV2View) getView())._$_findCachedViewById(R$id.b6n); Intrinsics.checkNotNullExpressionValue(frameLayout9, "view.feedbackInfoContainer"); return e(frameLayout9, new k(this)); } } public final dx2.d<Boolean> g() { return this.f4380d; } public final dx2.d<Boolean> h() { return this.f4379c; } public final void i() { FrameLayout frameLayout = (FrameLayout) ((EmceeEndLiveV2View) getView())._$_findCachedViewById(R$id.b3r); Intrinsics.checkNotNullExpressionValue(frameLayout, "view.evaluateContainer"); q1.r(frameLayout, false, 0, null, 7, null); } public final void j() { ((XYImageView) ((EmceeEndLiveV2View) getView())._$_findCachedViewById(R$id.bgImage)).o("https://fe-video-qc.xhscdn.com/fe-platform/230e5269ec69e62862421d9a18579ea42a9ac850.png?attname=fe-platform/230e5269ec69e62862421d9a18579ea42a9ac850.png", g0.f72750a.l()); } public final void k() { Uri.Builder buildUpon = Uri.parse(u.f131753a.g()).buildUpon(); buildUpon.appendQueryParameter("fullscreen", "true"); Routers.build(buildUpon.toString()).open(((EmceeEndLiveV2View) getView()).getContext()); fy.d.f78950a.i(String.valueOf(this.f4377a), this.f4378b, "live_center"); } public final void l(Context context, lr.b bVar) { Intrinsics.checkNotNullParameter(context, "context"); Intrinsics.checkNotNullParameter(bVar, "data"); new AlphaEmceeLiveEndTipsDialog(context, bVar).show(); } public final void m(co.g gVar) { bo.e f14 = f(gVar); if (f14 != null) { f14.k(gVar); } } }