小红书.apk(点击下载) / AlphaSingleThemeGoodsDialog.java


package com.xingin.alpha.goods.theme;

import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.recyclerview.widget.RecyclerView;
import com.alibaba.baichuan.trade.biz.core.usertracker.UserTrackerConstants;
import com.meizu.cloud.pushsdk.notification.model.AdvanceSetting;
import com.uber.autodispose.y;
import com.xingin.alpha.R$color;
import com.xingin.alpha.R$drawable;
import com.xingin.alpha.R$id;
import com.xingin.alpha.R$layout;
import com.xingin.alpha.R$string;
import com.xingin.alpha.api.service.AlphaGoodsService;
import com.xingin.alpha.base.AlphaBaseCustomBottomDialog;
import com.xingin.alpha.bean.CombinationDataBean;
import com.xingin.alpha.bean.SelectThemeGoodsBean;
import com.xingin.alpha.bean.SelectedGoodsBean;
import com.xingin.alpha.goods.theme.adapter.AlphaSingleThemeAdapter;
import com.xingin.alpha.goods.theme.bean.SelectGoodsThemeBean;
import com.xingin.alpha.goods.theme.view.AlphaEmceeThemeGoodsSaleDataView;
import com.xingin.alpha.ui.FixLinearLayoutManager;
import com.xingin.alpha.ui.events.AlphaEventsWebActivity;
import com.xingin.android.mixim.msg.bean.common.GoodsExplainCardInfo;
import com.xingin.android.mixim.msg.bean.common.PlayBackGoodsCardInfo;
import com.xingin.android.xhscomm.event.Event;
import com.xingin.skynet.utils.ServerError;
import com.xingin.ui.round.SelectRoundConstraintLayout;
import com.xingin.utils.core.d1;
import com.xingin.widgets.XYImageView;
import dw2.r;
import el.e0;
import el.g0;
import fy.l0;
import java.util.ArrayList;
import java.util.Collection;
import kotlin.Lazy;
import kotlin.LazyKt__LazyJVMKt;
import kotlin.Metadata;
import kotlin.Triple;
import kotlin.TypeCastException;
import kotlin.Unit;
import kotlin.collections.CollectionsKt___CollectionsKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.functions.Function3;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Lambda;
import ln.d2;
import retrofit2.HttpException;
import sy.f0;
import sy.g1;
import sy.q1;
import sy.v0;

@Metadata(bv = {}, d1 = {"\u0000\u0001\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u000e\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\r\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0004\u0018\u00002\u00020\u0001B\u000f\u0012\u0006\u0010Y\u001a\u00020X¢\u0006\u0004\bZ\u0010[J\b\u0010\u0003\u001a\u00020\u0002H\u0002J\b\u0010\u0004\u001a\u00020\u0002H\u0002J\b\u0010\u0005\u001a\u00020\u0002H\u0002J\b\u0010\u0006\u001a\u00020\u0002H\u0002J\b\u0010\u0007\u001a\u00020\u0002H\u0002J.\u0010\u000e\u001a\u00020\u00022\u001a\u0010\u000b\u001a\u0016\u0012\u0004\u0012\u00020\t\u0018\u00010\bj\n\u0012\u0004\u0012\u00020\t\u0018\u0001`\n2\b\u0010\r\u001a\u0004\u0018\u00010\fH\u0002J\"\u0010\u0014\u001a\u00020\u00022\u0006\u0010\u000f\u001a\u00020\t2\u0006\u0010\u0011\u001a\u00020\u00102\b\b\u0002\u0010\u0013\u001a\u00020\u0012H\u0002J\u0010\u0010\u0016\u001a\u00020\u00022\u0006\u0010\u0015\u001a\u00020\tH\u0002J\u0012\u0010\u0019\u001a\u00020\u00022\b\u0010\u0018\u001a\u0004\u0018\u00010\u0017H\u0002J\b\u0010\u001a\u001a\u00020\u0010H\u0014J\u0012\u0010\u001d\u001a\u00020\u00022\b\u0010\u001c\u001a\u0004\u0018\u00010\u001bH\u0014J\b\u0010\u001e\u001a\u00020\u0002H\u0014J\b\u0010\u001f\u001a\u00020\u0002H\u0016J\b\u0010 \u001a\u00020\u0002H\u0016RT\u0010,\u001a4\u0012\u0013\u0012\u00110\u0010¢\u0006\f\b\"\u0012\b\b#\u0012\u0004\b\b($\u0012\u0013\u0012\u00110\t¢\u0006\f\b\"\u0012\b\b#\u0012\u0004\b\b(%\u0012\u0004\u0012\u00020\u0002\u0018\u00010!8\u0006@\u0006X†\u000e¢\u0006\u0012\n\u0004\b&\u0010'\u001a\u0004\b(\u0010)\"\u0004\b*\u0010+RT\u00100\u001a4\u0012\u0013\u0012\u00110\u0010¢\u0006\f\b\"\u0012\b\b#\u0012\u0004\b\b($\u0012\u0013\u0012\u00110\t¢\u0006\f\b\"\u0012\b\b#\u0012\u0004\b\b(%\u0012\u0004\u0012\u00020\u0002\u0018\u00010!8\u0006@\u0006X†\u000e¢\u0006\u0012\n\u0004\b-\u0010'\u001a\u0004\b.\u0010)\"\u0004\b/\u0010+Rk\u0010<\u001aK\u0012\u0015\u0012\u0013\u0018\u000102¢\u0006\f\b\"\u0012\b\b#\u0012\u0004\b\b(3\u0012\u0013\u0012\u00110\u0010¢\u0006\f\b\"\u0012\b\b#\u0012\u0004\b\b(4\u0012\u0013\u0012\u00110\u0010¢\u0006\f\b\"\u0012\b\b#\u0012\u0004\b\b(5\u0012\u0004\u0012\u00020\u0002\u0018\u0001018\u0006@\u0006X†\u000e¢\u0006\u0012\n\u0004\b6\u00107\u001a\u0004\b8\u00109\"\u0004\b:\u0010;R$\u0010?\u001a\u0012\u0012\u0004\u0012\u00020\t0\bj\b\u0012\u0004\u0012\u00020\t`\n8\u0002X‚\u0004¢\u0006\u0006\n\u0004\b=\u0010>R\u0014\u0010C\u001a\u00020@8\u0002X‚\u0004¢\u0006\u0006\n\u0004\bA\u0010BR\u0018\u0010G\u001a\u0004\u0018\u00010D8\u0002@\u0002X‚\u000e¢\u0006\u0006\n\u0004\bE\u0010FR!\u0010N\u001a\b\u0012\u0004\u0012\u00020I0H8BX‚„\u0002¢\u0006\f\n\u0004\bJ\u0010K\u001a\u0004\bL\u0010MR\u001b\u0010S\u001a\u00020O8BX‚„\u0002¢\u0006\f\n\u0004\bP\u0010K\u001a\u0004\bQ\u0010RR\u0014\u0010W\u001a\u00020T8\u0002X‚\u0004¢\u0006\u0006\n\u0004\bU\u0010V¨\u0006\\"}, d2 = {"Lcom/xingin/alpha/goods/theme/AlphaSingleThemeGoodsDialog;", "Lcom/xingin/alpha/base/AlphaBaseCustomBottomDialog;", "", "Z0", "W0", "u0", "x0", "D0", "Ljava/util/ArrayList;", "Lcom/xingin/alpha/goods/theme/bean/SelectGoodsThemeBean;", "Lkotlin/collections/ArrayList;", "result", "Lcom/xingin/alpha/bean/CombinationDataBean;", "combinationData", "v0", "themeGoodsBean", "", "index", "", "save", "r0", "goods", "d1", "Lcom/xingin/android/mixim/msg/bean/common/GoodsExplainCardInfo;", "cardInfo", "c1", "m", "Landroid/os/Bundle;", "savedInstanceState", "onCreate", "onStart", "onDetachedFromWindow", "show", "Lkotlin/Function2;", "Lkotlin/ParameterName;", "name", "position", "goodsBean", "v", "Lkotlin/jvm/functions/Function2;", "T0", "()Lkotlin/jvm/functions/Function2;", "g1", "(Lkotlin/jvm/functions/Function2;)V", "onItemClickCallback", "w", "S0", "f1", "onBuyClickCallback", "Lkotlin/Function3;", "Lcom/xingin/android/mixim/msg/bean/common/PlayBackGoodsCardInfo;", "goodsCard", "playBackStartTime", "playBackTotalTime", "x", "Lkotlin/jvm/functions/Function3;", "U0", "()Lkotlin/jvm/functions/Function3;", "h1", "(Lkotlin/jvm/functions/Function3;)V", "onPlayBackInvokeCallback", "y", "Ljava/util/ArrayList;", "dataList", "Lcom/xingin/alpha/goods/theme/adapter/AlphaSingleThemeAdapter;", "z", "Lcom/xingin/alpha/goods/theme/adapter/AlphaSingleThemeAdapter;", "goodsAdapter", "", "B", "Ljava/lang/String;", "moreCombinationUrl", "Lp00/b;", "", "C", "Lkotlin/Lazy;", "R0", "()Lp00/b;", "impressionHelper", "Lmr/p;", "J", "V0", "()Lmr/p;", "requestExplainRepository", "Lcom/xingin/alpha/goods/theme/EmceeManagerGoodsThemeDialog;", "K", "Lcom/xingin/alpha/goods/theme/EmceeManagerGoodsThemeDialog;", "manageGoodsThemeDialog", "Landroid/content/Context;", "context", "<init>", "(Landroid/content/Context;)V", "alpha_library_release"}, k = 1, mv = {1, 6, 0})
/* compiled from: AlphaSingleThemeGoodsDialog.kt */
public final class AlphaSingleThemeGoodsDialog extends AlphaBaseCustomBottomDialog {
    public final mr.m A = new mr.m();
    public String B;
    public final Lazy C = LazyKt__LazyJVMKt.lazy(new c(this));

    /* renamed from: J  reason: collision with root package name */
    public final Lazy f43399J = LazyKt__LazyJVMKt.lazy(p.f43433a);
    public final EmceeManagerGoodsThemeDialog K;

    /* renamed from: v  reason: collision with root package name */
    public Function2<? super Integer, ? super SelectGoodsThemeBean, Unit> f43400v;

    /* renamed from: w  reason: collision with root package name */
    public Function2<? super Integer, ? super SelectGoodsThemeBean, Unit> f43401w;

    /* renamed from: x  reason: collision with root package name */
    public Function3<? super PlayBackGoodsCardInfo, ? super Integer, ? super Integer, Unit> f43402x;

    /* renamed from: y  reason: collision with root package name */
    public final ArrayList<SelectGoodsThemeBean> f43403y;

    /* renamed from: z  reason: collision with root package name */
    public final AlphaSingleThemeAdapter f43404z;

    @Metadata(d1 = {"\u0000\u0014\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0003\n\u0000\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u00032\b\u0010\u0004\u001a\u0004\u0018\u00010\u0005H\n¢\u0006\u0002\b\u0006"}, d2 = {"<anonymous>", "", UserTrackerConstants.IS_SUCCESS, "", "error", "", "invoke"}, k = 3, mv = {1, 6, 0}, xi = 48)
    /* compiled from: AlphaSingleThemeGoodsDialog.kt */
    public static final class a extends Lambda implements Function2<Boolean, Throwable, Unit> {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ SelectGoodsThemeBean f43405a;

        /* renamed from: b  reason: collision with root package name */
        public final /* synthetic */ AlphaSingleThemeGoodsDialog f43406b;

        /* renamed from: c  reason: collision with root package name */
        public final /* synthetic */ boolean f43407c;

        /* renamed from: d  reason: collision with root package name */
        public final /* synthetic */ int f43408d;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public a(SelectGoodsThemeBean selectGoodsThemeBean, AlphaSingleThemeGoodsDialog alphaSingleThemeGoodsDialog, boolean z14, int i10) {
            super(2);
            this.f43405a = selectGoodsThemeBean;
            this.f43406b = alphaSingleThemeGoodsDialog;
            this.f43407c = z14;
            this.f43408d = i10;
        }

        /* Return type fixed from 'java.lang.Object' to match base method */
        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
        @Override // kotlin.jvm.functions.Function2
        public /* bridge */ /* synthetic */ Unit invoke(Boolean bool, Throwable th3) {
            invoke(bool.booleanValue(), th3);
            return Unit.INSTANCE;
        }

        public final void invoke(boolean z14, Throwable th3) {
            if (z14) {
                if (!this.f43405a.isExplaining()) {
                    this.f43405a.setExplain(1);
                    this.f43406b.c1(ks.e.i(this.f43405a));
                } else {
                    this.f43405a.setExplain(0);
                    this.f43406b.d1(this.f43405a);
                    this.f43406b.c1(null);
                    if (this.f43407c) {
                        f0.c(f0.f131631a, R$string.a1z, 0, 2, null);
                    }
                }
                this.f43406b.f43404z.u(this.f43408d, this.f43405a.isExplain());
            } else if (th3 instanceof ServerError) {
                f0.d(f0.f131631a, ((ServerError) th3).getMsg(), 0, 2, null);
            } else {
                f0.c(f0.f131631a, R$string.ati, 0, 2, null);
            }
        }
    }

    @Metadata(bv = {}, d1 = {"\u0000\u0012\n\u0002\u0010\u001e\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0004\u001a\u00020\u00032\f\u0010\u0002\u001a\b\u0012\u0004\u0012\u00020\u00010\u0000H\n¢\u0006\u0004\b\u0004\u0010\u0005"}, d2 = {"", "Lcom/xingin/alpha/goods/theme/bean/SelectGoodsThemeBean;", AdvanceSetting.NETWORK_TYPE, "", "a", "(Ljava/util/Collection;)V"}, k = 3, mv = {1, 6, 0})
    /* compiled from: AlphaSingleThemeGoodsDialog.kt */
    public static final class b extends Lambda implements Function1<Collection<? extends SelectGoodsThemeBean>, Unit> {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ AlphaSingleThemeGoodsDialog f43409a;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public b(AlphaSingleThemeGoodsDialog alphaSingleThemeGoodsDialog) {
            super(1);
            this.f43409a = alphaSingleThemeGoodsDialog;
        }

        public final void a(Collection<SelectGoodsThemeBean> collection) {
            Intrinsics.checkNotNullParameter(collection, AdvanceSetting.NETWORK_TYPE);
            this.f43409a.f43403y.addAll(collection);
        }

        /* Return type fixed from 'java.lang.Object' to match base method */
        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
        @Override // kotlin.jvm.functions.Function1
        public /* bridge */ /* synthetic */ Unit invoke(Collection<? extends SelectGoodsThemeBean> collection) {
            a(collection);
            return Unit.INSTANCE;
        }
    }

    @Metadata(bv = {}, d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\u0010\u0002\u001a\b\u0012\u0004\u0012\u00020\u00010\u0000H\n¢\u0006\u0004\b\u0002\u0010\u0003"}, d2 = {"Lp00/b;", "", "a", "()Lp00/b;"}, k = 3, mv = {1, 6, 0})
    /* compiled from: AlphaSingleThemeGoodsDialog.kt */
    public static final class c extends Lambda implements Function0<p00.b<Object>> {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ AlphaSingleThemeGoodsDialog f43410a;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public c(AlphaSingleThemeGoodsDialog alphaSingleThemeGoodsDialog) {
            super(0);
            this.f43410a = alphaSingleThemeGoodsDialog;
        }

        /* renamed from: a */
        public final p00.b<Object> invoke() {
            return new p00.b<>((RecyclerView) this.f43410a.findViewById(R$id.bgj));
        }
    }

    @Metadata(bv = {}, d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0001\u001a\u00020\u00002\u0006\u0010\u0003\u001a\u00020\u0002H\n¢\u0006\u0004\b\u0005\u0010\u0006"}, d2 = {"Landroid/view/View;", "<anonymous parameter 0>", "", "position", "", "a", "(Landroid/view/View;I)V"}, k = 3, mv = {1, 6, 0})
    /* compiled from: AlphaSingleThemeGoodsDialog.kt */
    public static final class d extends Lambda implements Function2<View, Integer, Unit> {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ AlphaSingleThemeGoodsDialog f43411a;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public d(AlphaSingleThemeGoodsDialog alphaSingleThemeGoodsDialog) {
            super(2);
            this.f43411a = alphaSingleThemeGoodsDialog;
        }

        /* JADX WARN: Type inference failed for: r4v1, types: [java.lang.Object] */
        /* JADX WARNING: Unknown variable types count: 1 */
        public final void a(View view, int i10) {
            Function2<Integer, SelectGoodsThemeBean, Unit> T0;
            Intrinsics.checkNotNullParameter(view, "<anonymous parameter 0>");
            if (d2.f102239a.y0().isNotEmcee() && (T0 = this.f43411a.T0()) != null) {
                Integer valueOf = Integer.valueOf(i10);
                ?? r43 = this.f43411a.f43403y.get(i10);
                Intrinsics.checkNotNullExpressionValue(r43, "dataList[position]");
                T0.invoke(valueOf, r43);
            }
        }

        /* Return type fixed from 'java.lang.Object' to match base method */
        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
        @Override // kotlin.jvm.functions.Function2
        public /* bridge */ /* synthetic */ Unit invoke(View view, Integer num) {
            a(view, num.intValue());
            return Unit.INSTANCE;
        }
    }

    @Metadata(bv = {}, d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0001\u001a\u00020\u00002\u0006\u0010\u0003\u001a\u00020\u0002H\n¢\u0006\u0004\b\u0005\u0010\u0006"}, d2 = {"Landroid/view/View;", "<anonymous parameter 0>", "", "position", "", "a", "(Landroid/view/View;I)V"}, k = 3, mv = {1, 6, 0})
    /* compiled from: AlphaSingleThemeGoodsDialog.kt */
    public static final class e extends Lambda implements Function2<View, Integer, Unit> {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ AlphaSingleThemeGoodsDialog f43412a;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public e(AlphaSingleThemeGoodsDialog alphaSingleThemeGoodsDialog) {
            super(2);
            this.f43412a = alphaSingleThemeGoodsDialog;
        }

        /* JADX WARN: Type inference failed for: r4v1, types: [java.lang.Object] */
        /* JADX WARNING: Unknown variable types count: 1 */
        public final void a(View view, int i10) {
            Function2<Integer, SelectGoodsThemeBean, Unit> S0;
            Intrinsics.checkNotNullParameter(view, "<anonymous parameter 0>");
            if (d2.f102239a.y0().isNotEmcee() && (S0 = this.f43412a.S0()) != null) {
                Integer valueOf = Integer.valueOf(i10);
                ?? r43 = this.f43412a.f43403y.get(i10);
                Intrinsics.checkNotNullExpressionValue(r43, "dataList[position]");
                S0.invoke(valueOf, r43);
            }
        }

        /* Return type fixed from 'java.lang.Object' to match base method */
        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
        @Override // kotlin.jvm.functions.Function2
        public /* bridge */ /* synthetic */ Unit invoke(View view, Integer num) {
            a(view, num.intValue());
            return Unit.INSTANCE;
        }
    }

    @Metadata(bv = {}, d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0001\u001a\u00020\u00002\u0006\u0010\u0003\u001a\u00020\u0002H\n¢\u0006\u0004\b\u0005\u0010\u0006"}, d2 = {"Landroid/view/View;", "<anonymous parameter 0>", "", "position", "", "a", "(Landroid/view/View;I)V"}, k = 3, mv = {1, 6, 0})
    /* compiled from: AlphaSingleThemeGoodsDialog.kt */
    public static final class f extends Lambda implements Function2<View, Integer, Unit> {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ AlphaSingleThemeGoodsDialog f43413a;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public f(AlphaSingleThemeGoodsDialog alphaSingleThemeGoodsDialog) {
            super(2);
            this.f43413a = alphaSingleThemeGoodsDialog;
        }

        public final void a(View view, int i10) {
            Intrinsics.checkNotNullParameter(view, "<anonymous parameter 0>");
            Object obj = this.f43413a.f43403y.get(i10);
            Intrinsics.checkNotNullExpressionValue(obj, "dataList[position]");
            SelectGoodsThemeBean selectGoodsThemeBean = (SelectGoodsThemeBean) obj;
            Triple<PlayBackGoodsCardInfo, Integer, Integer> z14 = ks.e.z(selectGoodsThemeBean);
            PlayBackGoodsCardInfo first = z14.getFirst();
            int intValue = z14.getSecond().intValue();
            int intValue2 = z14.getThird().intValue();
            String playBackUrl = selectGoodsThemeBean.getPlayBackUrl();
            if (playBackUrl == null) {
                playBackUrl = "";
            }
            first.setPlayBackUrl(playBackUrl);
            v0 v0Var = v0.f131783a;
            v0Var.c("alpha-log", null, "startTime=" + intValue + " totalTime=" + intValue2);
            Function3<PlayBackGoodsCardInfo, Integer, Integer, Unit> U0 = this.f43413a.U0();
            if (U0 != null) {
                U0.invoke(first, Integer.valueOf(intValue), Integer.valueOf(intValue2));
            }
            this.f43413a.dismiss();
        }

        /* Return type fixed from 'java.lang.Object' to match base method */
        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
        @Override // kotlin.jvm.functions.Function2
        public /* bridge */ /* synthetic */ Unit invoke(View view, Integer num) {
            a(view, num.intValue());
            return Unit.INSTANCE;
        }
    }

    @Metadata(bv = {}, d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0001\u001a\u00020\u00002\u0006\u0010\u0003\u001a\u00020\u0002H\n¢\u0006\u0004\b\u0005\u0010\u0006"}, d2 = {"Lcom/xingin/alpha/goods/theme/bean/SelectGoodsThemeBean;", "goodsItem", "", "index", "", "a", "(Lcom/xingin/alpha/goods/theme/bean/SelectGoodsThemeBean;I)V"}, k = 3, mv = {1, 6, 0})
    /* compiled from: AlphaSingleThemeGoodsDialog.kt */
    public static final class g extends Lambda implements Function2<SelectGoodsThemeBean, Integer, Unit> {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ AlphaSingleThemeAdapter f43414a;

        /* renamed from: b  reason: collision with root package name */
        public final /* synthetic */ AlphaSingleThemeGoodsDialog f43415b;

        @Metadata(d1 = {"\u0000\u0010\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0002\u0010\u0000\u001a\u00020\u00012\b\u0010\u0002\u001a\u0004\u0018\u00010\u0003H\n¢\u0006\u0004\b\u0004\u0010\u0005"}, d2 = {"<anonymous>", "", "saveExplain", "", "invoke", "(Ljava/lang/Boolean;)V"}, k = 3, mv = {1, 6, 0}, xi = 48)
        /* compiled from: AlphaSingleThemeGoodsDialog.kt */
        public static final class a extends Lambda implements Function1<Boolean, Unit> {

            /* renamed from: a  reason: collision with root package name */
            public final /* synthetic */ AlphaSingleThemeGoodsDialog f43416a;

            /* renamed from: b  reason: collision with root package name */
            public final /* synthetic */ SelectGoodsThemeBean f43417b;

            /* renamed from: c  reason: collision with root package name */
            public final /* synthetic */ int f43418c;

            /* JADX INFO: super call moved to the top of the method (can break code semantics) */
            public a(AlphaSingleThemeGoodsDialog alphaSingleThemeGoodsDialog, SelectGoodsThemeBean selectGoodsThemeBean, int i10) {
                super(1);
                this.f43416a = alphaSingleThemeGoodsDialog;
                this.f43417b = selectGoodsThemeBean;
                this.f43418c = i10;
            }

            /* Return type fixed from 'java.lang.Object' to match base method */
            /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
            @Override // kotlin.jvm.functions.Function1
            public /* bridge */ /* synthetic */ Unit invoke(Boolean bool) {
                invoke(bool);
                return Unit.INSTANCE;
            }

            public final void invoke(Boolean bool) {
                if (bool != null) {
                    AlphaSingleThemeGoodsDialog alphaSingleThemeGoodsDialog = this.f43416a;
                    SelectGoodsThemeBean selectGoodsThemeBean = this.f43417b;
                    int i10 = this.f43418c;
                    bool.booleanValue();
                    alphaSingleThemeGoodsDialog.r0(selectGoodsThemeBean, i10, bool.booleanValue());
                }
            }
        }

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public g(AlphaSingleThemeAdapter alphaSingleThemeAdapter, AlphaSingleThemeGoodsDialog alphaSingleThemeGoodsDialog) {
            super(2);
            this.f43414a = alphaSingleThemeAdapter;
            this.f43415b = alphaSingleThemeGoodsDialog;
        }

        public final void a(SelectGoodsThemeBean selectGoodsThemeBean, int i10) {
            Intrinsics.checkNotNullParameter(selectGoodsThemeBean, "goodsItem");
            int f14 = this.f43414a.f();
            if (f14 == -1 || f14 == i10) {
                AlphaSingleThemeAdapter alphaSingleThemeAdapter = this.f43414a;
                AlphaSingleThemeGoodsDialog alphaSingleThemeGoodsDialog = this.f43415b;
                if (selectGoodsThemeBean.isExplaining()) {
                    ks.m.h(alphaSingleThemeAdapter.e(), selectGoodsThemeBean.getHasPlayBack(), true, new a(alphaSingleThemeGoodsDialog, selectGoodsThemeBean, i10));
                } else {
                    AlphaSingleThemeGoodsDialog.s0(alphaSingleThemeGoodsDialog, selectGoodsThemeBean, i10, false, 4, null);
                }
            } else if (selectGoodsThemeBean.isExplaining()) {
                f0.c(f0.f131631a, R$string.a3r, 0, 2, null);
            }
        }

        /* Return type fixed from 'java.lang.Object' to match base method */
        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
        @Override // kotlin.jvm.functions.Function2
        public /* bridge */ /* synthetic */ Unit invoke(SelectGoodsThemeBean selectGoodsThemeBean, Integer num) {
            a(selectGoodsThemeBean, num.intValue());
            return Unit.INSTANCE;
        }
    }

    @Metadata(bv = {}, d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0001\u001a\u00020\u00002\u0006\u0010\u0003\u001a\u00020\u0002H\n¢\u0006\u0004\b\u0005\u0010\u0006"}, d2 = {"Landroid/view/View;", "<anonymous parameter 0>", "", "position", "", "a", "(Landroid/view/View;I)V"}, k = 3, mv = {1, 6, 0})
    /* compiled from: AlphaSingleThemeGoodsDialog.kt */
    public static final class h extends Lambda implements Function2<View, Integer, Unit> {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ AlphaSingleThemeGoodsDialog f43419a;

        /* renamed from: b  reason: collision with root package name */
        public final /* synthetic */ AlphaSingleThemeAdapter f43420b;

        @Metadata(bv = {}, d1 = {"\u0000\u0014\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0001\u001a\u00020\u00002\b\u0010\u0003\u001a\u0004\u0018\u00010\u0002H\n¢\u0006\u0004\b\u0005\u0010\u0006"}, d2 = {"", UserTrackerConstants.IS_SUCCESS, "Lgs/a;", "detail", "", "a", "(ZLgs/a;)V"}, k = 3, mv = {1, 6, 0})
        /* compiled from: AlphaSingleThemeGoodsDialog.kt */
        public static final class a extends Lambda implements Function2<Boolean, gs.a, Unit> {

            /* renamed from: a  reason: collision with root package name */
            public final /* synthetic */ SelectGoodsThemeBean f43421a;

            /* renamed from: b  reason: collision with root package name */
            public final /* synthetic */ AlphaSingleThemeAdapter f43422b;

            /* renamed from: c  reason: collision with root package name */
            public final /* synthetic */ SelectGoodsThemeBean f43423c;

            /* renamed from: d  reason: collision with root package name */
            public final /* synthetic */ AlphaSingleThemeGoodsDialog f43424d;

            /* renamed from: e  reason: collision with root package name */
            public final /* synthetic */ int f43425e;

            /* JADX INFO: super call moved to the top of the method (can break code semantics) */
            public a(SelectGoodsThemeBean selectGoodsThemeBean, AlphaSingleThemeAdapter alphaSingleThemeAdapter, SelectGoodsThemeBean selectGoodsThemeBean2, AlphaSingleThemeGoodsDialog alphaSingleThemeGoodsDialog, int i10) {
                super(2);
                this.f43421a = selectGoodsThemeBean;
                this.f43422b = alphaSingleThemeAdapter;
                this.f43423c = selectGoodsThemeBean2;
                this.f43424d = alphaSingleThemeGoodsDialog;
                this.f43425e = i10;
            }

            public final void a(boolean z14, gs.a aVar) {
                SelectGoodsThemeBean a14;
                if (!(aVar == null || (a14 = aVar.a()) == null)) {
                    SelectGoodsThemeBean selectGoodsThemeBean = this.f43421a;
                    AlphaSingleThemeAdapter alphaSingleThemeAdapter = this.f43422b;
                    SelectGoodsThemeBean selectGoodsThemeBean2 = this.f43423c;
                    AlphaSingleThemeGoodsDialog alphaSingleThemeGoodsDialog = this.f43424d;
                    int i10 = this.f43425e;
                    if (a14.checkStock()) {
                        is.a.f92323a.g(selectGoodsThemeBean, alphaSingleThemeAdapter.e(), 2);
                    } else {
                        selectGoodsThemeBean2.setItemGoods(a14.getItemGoods());
                        f0.c(f0.f131631a, R$string.f40699alpha_explain_goods_sell_out, 0, 2, null);
                    }
                    alphaSingleThemeGoodsDialog.f43404z.notifyItemChanged(i10);
                }
                if (!z14) {
                    f0.c(f0.f131631a, R$string.wt, 0, 2, null);
                }
            }

            /* Return type fixed from 'java.lang.Object' to match base method */
            /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
            @Override // kotlin.jvm.functions.Function2
            public /* bridge */ /* synthetic */ Unit invoke(Boolean bool, gs.a aVar) {
                a(bool.booleanValue(), aVar);
                return Unit.INSTANCE;
            }
        }

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public h(AlphaSingleThemeGoodsDialog alphaSingleThemeGoodsDialog, AlphaSingleThemeAdapter alphaSingleThemeAdapter) {
            super(2);
            this.f43419a = alphaSingleThemeGoodsDialog;
            this.f43420b = alphaSingleThemeAdapter;
        }

        public final void a(View view, int i10) {
            Intrinsics.checkNotNullParameter(view, "<anonymous parameter 0>");
            SelectGoodsThemeBean selectGoodsThemeBean = (SelectGoodsThemeBean) CollectionsKt___CollectionsKt.getOrNull(this.f43419a.f43403y, i10);
            if (selectGoodsThemeBean != null) {
                AlphaSingleThemeGoodsDialog alphaSingleThemeGoodsDialog = this.f43419a;
                alphaSingleThemeGoodsDialog.V0().c(selectGoodsThemeBean.getCombinationId(), d2.f102239a.z0(), alphaSingleThemeGoodsDialog, new a(selectGoodsThemeBean, this.f43420b, selectGoodsThemeBean, alphaSingleThemeGoodsDialog, i10));
            }
        }

        /* Return type fixed from 'java.lang.Object' to match base method */
        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
        @Override // kotlin.jvm.functions.Function2
        public /* bridge */ /* synthetic */ Unit invoke(View view, Integer num) {
            a(view, num.intValue());
            return Unit.INSTANCE;
        }
    }

    @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: AlphaSingleThemeGoodsDialog.kt */
    public static final class i extends Lambda implements Function0<Unit> {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ AlphaSingleThemeGoodsDialog f43426a;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public i(AlphaSingleThemeGoodsDialog alphaSingleThemeGoodsDialog) {
            super(0);
            this.f43426a = alphaSingleThemeGoodsDialog;
        }

        @Override // kotlin.jvm.functions.Function0
        public final void invoke() {
            this.f43426a.dismiss();
        }
    }

    @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: AlphaSingleThemeGoodsDialog.kt */
    public static final class j extends Lambda implements Function0<Unit> {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ AlphaSingleThemeGoodsDialog f43427a;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public j(AlphaSingleThemeGoodsDialog alphaSingleThemeGoodsDialog) {
            super(0);
            this.f43427a = alphaSingleThemeGoodsDialog;
        }

        @Override // kotlin.jvm.functions.Function0
        public final void invoke() {
            this.f43427a.K.B0(d2.f102239a.z0());
        }
    }

    @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: AlphaSingleThemeGoodsDialog.kt */
    public static final class k extends Lambda implements Function0<Unit> {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ AlphaSingleThemeGoodsDialog f43428a;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public k(AlphaSingleThemeGoodsDialog alphaSingleThemeGoodsDialog) {
            super(0);
            this.f43428a = alphaSingleThemeGoodsDialog;
        }

        @Override // kotlin.jvm.functions.Function0
        public final void invoke() {
            this.f43428a.u0();
        }
    }

    @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: AlphaSingleThemeGoodsDialog.kt */
    public static final class l extends Lambda implements Function0<Unit> {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ AlphaSingleThemeGoodsDialog f43429a;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public l(AlphaSingleThemeGoodsDialog alphaSingleThemeGoodsDialog) {
            super(0);
            this.f43429a = alphaSingleThemeGoodsDialog;
        }

        @Override // kotlin.jvm.functions.Function0
        public final void invoke() {
            String str = this.f43429a.B;
            if (str != null) {
                AlphaSingleThemeGoodsDialog alphaSingleThemeGoodsDialog = this.f43429a;
                AlphaEventsWebActivity.a aVar = AlphaEventsWebActivity.f45671n;
                Context context = alphaSingleThemeGoodsDialog.getContext();
                Intrinsics.checkNotNullExpressionValue(context, "context");
                AlphaEventsWebActivity.a.c(aVar, context, str, null, false, ((SelectRoundConstraintLayout) alphaSingleThemeGoodsDialog.findViewById(R$id.rootLayout)).getHeight(), false, 44, null);
                l0 l0Var = l0.f79618a;
                d2 d2Var = d2.f102239a;
                l0Var.t(d2Var.T(), d2Var.A0());
            }
        }
    }

    @Metadata(d1 = {"\u0000\u0014\n\u0000\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u00032\u0006\u0010\u0004\u001a\u00020\u0005H\n¢\u0006\u0002\b\u0006"}, d2 = {"<anonymous>", "", "position", "", "<anonymous parameter 1>", "Landroid/view/View;", "invoke"}, k = 3, mv = {1, 6, 0}, xi = 48)
    /* compiled from: AlphaSingleThemeGoodsDialog.kt */
    public static final class m extends Lambda implements Function2<Integer, View, Object> {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ AlphaSingleThemeGoodsDialog f43430a;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public m(AlphaSingleThemeGoodsDialog alphaSingleThemeGoodsDialog) {
            super(2);
            this.f43430a = alphaSingleThemeGoodsDialog;
        }

        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
        @Override // kotlin.jvm.functions.Function2
        public /* bridge */ /* synthetic */ Object invoke(Integer num, View view) {
            return invoke(num.intValue(), view);
        }

        public final Object invoke(int i10, View view) {
            String combinationId;
            Intrinsics.checkNotNullParameter(view, "<anonymous parameter 1>");
            boolean z14 = false;
            if (i10 >= 0 && i10 < this.f43430a.f43403y.size()) {
                z14 = true;
            }
            if (!z14 || (combinationId = ((SelectGoodsThemeBean) this.f43430a.f43403y.get(i10)).getCombinationId()) == null) {
                return "invalid_item";
            }
            return combinationId;
        }
    }

    @Metadata(d1 = {"\u0000\u0014\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u00032\u0006\u0010\u0004\u001a\u00020\u0005H\n¢\u0006\u0002\b\u0006"}, d2 = {"<anonymous>", "", "position", "", "<anonymous parameter 1>", "Landroid/view/View;", "invoke"}, k = 3, mv = {1, 6, 0}, xi = 48)
    /* compiled from: AlphaSingleThemeGoodsDialog.kt */
    public static final class n extends Lambda implements Function2<Integer, View, Unit> {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ AlphaSingleThemeGoodsDialog f43431a;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public n(AlphaSingleThemeGoodsDialog alphaSingleThemeGoodsDialog) {
            super(2);
            this.f43431a = alphaSingleThemeGoodsDialog;
        }

        /* Return type fixed from 'java.lang.Object' to match base method */
        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
        @Override // kotlin.jvm.functions.Function2
        public /* bridge */ /* synthetic */ Unit invoke(Integer num, View view) {
            invoke(num.intValue(), view);
            return Unit.INSTANCE;
        }

        public final void invoke(int i10, View view) {
            Intrinsics.checkNotNullParameter(view, "<anonymous parameter 1>");
            boolean z14 = true;
            if (i10 >= 0 && i10 < this.f43431a.f43403y.size()) {
                d2 d2Var = d2.f102239a;
                if (d2Var.y0().isNormalUser()) {
                    Object obj = this.f43431a.f43403y.get(i10);
                    Intrinsics.checkNotNullExpressionValue(obj, "dataList[position]");
                    SelectGoodsThemeBean selectGoodsThemeBean = (SelectGoodsThemeBean) obj;
                    l0 l0Var = l0.f79618a;
                    is.a aVar = is.a.f92323a;
                    l0Var.f(aVar.a(selectGoodsThemeBean), selectGoodsThemeBean.getCombinationId(), d2Var.T(), d2Var.z0(), i10);
                    String picUrl = selectGoodsThemeBean.getPicUrl();
                    if (picUrl == null || picUrl.length() <= 0) {
                        z14 = false;
                    }
                    if (z14) {
                        l0Var.v(d2Var.T(), d2Var.A0(), aVar.a(selectGoodsThemeBean), selectGoodsThemeBean.getCombinationId());
                    }
                }
            }
        }
    }

    @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: AlphaSingleThemeGoodsDialog.kt */
    public static final class o extends Lambda implements Function0<Unit> {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ AlphaSingleThemeGoodsDialog f43432a;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public o(AlphaSingleThemeGoodsDialog alphaSingleThemeGoodsDialog) {
            super(0);
            this.f43432a = alphaSingleThemeGoodsDialog;
        }

        @Override // kotlin.jvm.functions.Function0
        public final void invoke() {
            this.f43432a.x0();
        }
    }

    @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 = {"Lmr/p;", "a", "()Lmr/p;"}, k = 3, mv = {1, 6, 0})
    /* compiled from: AlphaSingleThemeGoodsDialog.kt */
    public static final class p extends Lambda implements Function0<mr.p> {

        /* renamed from: a  reason: collision with root package name */
        public static final p f43433a = new p();

        public p() {
            super(0);
        }

        /* renamed from: a */
        public final mr.p invoke() {
            return new mr.p();
        }
    }

    /* JADX INFO: super call moved to the top of the method (can break code semantics) */
    public AlphaSingleThemeGoodsDialog(Context context) {
        super(context, true, false, false, null, 28, null);
        Intrinsics.checkNotNullParameter(context, "context");
        ArrayList<SelectGoodsThemeBean> arrayList = new ArrayList<>();
        this.f43403y = arrayList;
        this.f43404z = new AlphaSingleThemeAdapter(context, arrayList);
        EmceeManagerGoodsThemeDialog emceeManagerGoodsThemeDialog = new EmceeManagerGoodsThemeDialog(context, d2.f102239a.T(), false);
        emceeManagerGoodsThemeDialog.y0(new o(this));
        this.K = emceeManagerGoodsThemeDialog;
    }

    public static final void B0(AlphaSingleThemeGoodsDialog alphaSingleThemeGoodsDialog, Throwable th3) {
        Intrinsics.checkNotNullParameter(alphaSingleThemeGoodsDialog, "this$0");
        if (th3 instanceof ServerError) {
            f0.d(f0.f131631a, ((ServerError) th3).getMsg(), 0, 2, null);
        }
        if (th3 instanceof HttpException) {
            f0.c(f0.f131631a, R$string.at9, 0, 2, null);
        }
        alphaSingleThemeGoodsDialog.D(false);
        e0.f72733a.k(0, th3.toString());
    }

    public static final void H0(AlphaSingleThemeGoodsDialog alphaSingleThemeGoodsDialog, SelectThemeGoodsBean selectThemeGoodsBean) {
        Intrinsics.checkNotNullParameter(alphaSingleThemeGoodsDialog, "this$0");
        alphaSingleThemeGoodsDialog.v0(selectThemeGoodsBean.getThemeList(), selectThemeGoodsBean.getCombinationData());
        alphaSingleThemeGoodsDialog.B = selectThemeGoodsBean.getMoreCombinationUrl();
        TextView textView = (TextView) alphaSingleThemeGoodsDialog.findViewById(R$id.f39814btnMoreTheme);
        Intrinsics.checkNotNullExpressionValue(textView, "btnMoreTheme");
        String moreCombinationUrl = selectThemeGoodsBean.getMoreCombinationUrl();
        if ((moreCombinationUrl == null || moreCombinationUrl.length() == 0) || d2.f102239a.y0().isSuperUser()) {
            bj2.l.b(textView);
        } else {
            bj2.l.q(textView);
        }
        e0.l(e0.f72733a, 1, null, 2, null);
        alphaSingleThemeGoodsDialog.D(false);
    }

    public static final void M0(AlphaSingleThemeGoodsDialog alphaSingleThemeGoodsDialog, Throwable th3) {
        Intrinsics.checkNotNullParameter(alphaSingleThemeGoodsDialog, "this$0");
        if (th3 instanceof ServerError) {
            f0.d(f0.f131631a, ((ServerError) th3).getMsg(), 0, 2, null);
        }
        if (th3 instanceof HttpException) {
            f0.c(f0.f131631a, R$string.at9, 0, 2, null);
        }
        alphaSingleThemeGoodsDialog.D(false);
        e0.f72733a.k(0, th3.toString());
    }

    public static /* synthetic */ void s0(AlphaSingleThemeGoodsDialog alphaSingleThemeGoodsDialog, SelectGoodsThemeBean selectGoodsThemeBean, int i10, boolean z14, int i14, Object obj) {
        if ((i14 & 4) != 0) {
            z14 = false;
        }
        alphaSingleThemeGoodsDialog.r0(selectGoodsThemeBean, i10, z14);
    }

    public static final void y0(AlphaSingleThemeGoodsDialog alphaSingleThemeGoodsDialog, SelectedGoodsBean selectedGoodsBean) {
        Intrinsics.checkNotNullParameter(alphaSingleThemeGoodsDialog, "this$0");
        alphaSingleThemeGoodsDialog.v0(selectedGoodsBean.getThemeList(), selectedGoodsBean.getCombinationData());
        alphaSingleThemeGoodsDialog.B = selectedGoodsBean.getMoreCombinationUrl();
        TextView textView = (TextView) alphaSingleThemeGoodsDialog.findViewById(R$id.f39814btnMoreTheme);
        Intrinsics.checkNotNullExpressionValue(textView, "btnMoreTheme");
        String moreCombinationUrl = selectedGoodsBean.getMoreCombinationUrl();
        if ((moreCombinationUrl == null || moreCombinationUrl.length() == 0) || d2.f102239a.y0().isSuperUser()) {
            bj2.l.b(textView);
        } else {
            bj2.l.q(textView);
        }
        e0.l(e0.f72733a, 1, null, 2, null);
        alphaSingleThemeGoodsDialog.D(false);
    }

    public final void D0() {
        D(true);
        d2 d2Var = d2.f102239a;
        if (!d2Var.y0().isEmcee()) {
            d2Var.y0().isSuperAdmin();
        }
        r<SelectThemeGoodsBean> W0 = cl.a.f12786a.s().getThemeChooseList(d2Var.z0()).x1(mi2.a.P()).W0(gw2.a.a());
        Intrinsics.checkNotNullExpressionValue(W0, "AlphaApiManager\n        …dSchedulers.mainThread())");
        Object n14 = W0.n(com.uber.autodispose.d.b(this));
        Intrinsics.checkExpressionValueIsNotNull(n14, "this.`as`(AutoDispose.autoDisposable(provider))");
        ((y) n14).a(new es.d(this), new es.f(this));
    }

    public final p00.b<Object> R0() {
        return (p00.b) this.C.getValue();
    }

    /* JADX DEBUG: Type inference failed for r0v0. Raw type applied. Possible types: kotlin.jvm.functions.Function2<? super java.lang.Integer, ? super com.xingin.alpha.goods.theme.bean.SelectGoodsThemeBean, kotlin.Unit>, kotlin.jvm.functions.Function2<java.lang.Integer, com.xingin.alpha.goods.theme.bean.SelectGoodsThemeBean, kotlin.Unit> */
    public final Function2<Integer, SelectGoodsThemeBean, Unit> S0() {
        return this.f43401w;
    }

    /* JADX DEBUG: Type inference failed for r0v0. Raw type applied. Possible types: kotlin.jvm.functions.Function2<? super java.lang.Integer, ? super com.xingin.alpha.goods.theme.bean.SelectGoodsThemeBean, kotlin.Unit>, kotlin.jvm.functions.Function2<java.lang.Integer, com.xingin.alpha.goods.theme.bean.SelectGoodsThemeBean, kotlin.Unit> */
    public final Function2<Integer, SelectGoodsThemeBean, Unit> T0() {
        return this.f43400v;
    }

    /* JADX DEBUG: Type inference failed for r0v0. Raw type applied. Possible types: kotlin.jvm.functions.Function3<? super com.xingin.android.mixim.msg.bean.common.PlayBackGoodsCardInfo, ? super java.lang.Integer, ? super java.lang.Integer, kotlin.Unit>, kotlin.jvm.functions.Function3<com.xingin.android.mixim.msg.bean.common.PlayBackGoodsCardInfo, java.lang.Integer, java.lang.Integer, kotlin.Unit> */
    public final Function3<PlayBackGoodsCardInfo, Integer, Integer, Unit> U0() {
        return this.f43402x;
    }

    public final mr.p V0() {
        return (mr.p) this.f43399J.getValue();
    }

    public final void W0() {
        AlphaSingleThemeAdapter alphaSingleThemeAdapter = this.f43404z;
        alphaSingleThemeAdapter.r(new d(this));
        alphaSingleThemeAdapter.p(new e(this));
        alphaSingleThemeAdapter.s(new f(this));
        alphaSingleThemeAdapter.q(new g(alphaSingleThemeAdapter, this));
        alphaSingleThemeAdapter.t(new h(this, alphaSingleThemeAdapter));
        ImageView imageView = (ImageView) findViewById(R$id.ivBack);
        Intrinsics.checkNotNullExpressionValue(imageView, "ivBack");
        q1.S(imageView, 0, new i(this), 1, null);
        LinearLayout linearLayout = (LinearLayout) findViewById(R$id.f39811btnManage);
        Intrinsics.checkNotNullExpressionValue(linearLayout, "btnManage");
        q1.S(linearLayout, 0, new j(this), 1, null);
        LinearLayout linearLayout2 = (LinearLayout) findViewById(R$id.f39820btnRefresh);
        Intrinsics.checkNotNullExpressionValue(linearLayout2, "btnRefresh");
        q1.S(linearLayout2, 0, new k(this), 1, null);
        TextView textView = (TextView) findViewById(R$id.f39814btnMoreTheme);
        Intrinsics.checkNotNullExpressionValue(textView, "btnMoreTheme");
        q1.S(textView, 0, new l(this), 1, null);
    }

    public final void Z0() {
        SelectRoundConstraintLayout selectRoundConstraintLayout = (SelectRoundConstraintLayout) findViewById(R$id.rootLayout);
        Intrinsics.checkNotNullExpressionValue(selectRoundConstraintLayout, "rootLayout");
        ViewGroup.LayoutParams layoutParams = selectRoundConstraintLayout.getLayoutParams();
        if (layoutParams != null) {
            layoutParams.height = (int) (((float) d1.f()) * 0.75f);
            selectRoundConstraintLayout.setLayoutParams(layoutParams);
            RecyclerView recyclerView = (RecyclerView) findViewById(R$id.bgj);
            recyclerView.setLayoutManager(new FixLinearLayoutManager(recyclerView.getContext(), 1, false));
            recyclerView.setAdapter(this.f43404z);
            nu2.f.q((ImageView) findViewById(R$id.ivBack), R$drawable.back_left_b, R$color.xhsTheme_colorGrayLevel1, 0);
            int i10 = R$drawable.refresh;
            int i14 = R$color.xhsTheme_colorGray1000;
            nu2.f.q((ImageView) findViewById(R$id.cdt), i10, i14, 0);
            nu2.f.q((ImageView) findViewById(R$id.cda), R$drawable.setting, i14, 0);
            R0().o(new m(this)).q(new n(this));
            R0().a();
            return;
        }
        throw new TypeCastException("null cannot be cast to non-null type android.view.ViewGroup.LayoutParams");
    }

    public final void c1(GoodsExplainCardInfo goodsExplainCardInfo) {
        Bundle bundle = new Bundle();
        if (goodsExplainCardInfo != null) {
            bundle.putParcelable("explain_card_info", goodsExplainCardInfo);
        }
        bundle.putBoolean("show_card", goodsExplainCardInfo != null);
        e30.c.e(new Event("com.xingin.alpha.goods.view.EmceeExplainGoodsView", bundle));
    }

    public final void d1(SelectGoodsThemeBean selectGoodsThemeBean) {
        ws.a.f151188a.B(ks.e.g(selectGoodsThemeBean));
    }

    public final void f1(Function2<? super Integer, ? super SelectGoodsThemeBean, Unit> function2) {
        this.f43401w = function2;
    }

    public final void g1(Function2<? super Integer, ? super SelectGoodsThemeBean, Unit> function2) {
        this.f43400v = function2;
    }

    public final void h1(Function3<? super PlayBackGoodsCardInfo, ? super Integer, ? super Integer, Unit> function3) {
        this.f43402x = function3;
    }

    @Override // com.xingin.alpha.base.AlphaBaseCustomDialog
    public int m() {
        return R$layout.f39985alpha_dialog_audience_single_theme_goods;
    }

    @Override // com.xingin.alpha.base.AlphaBaseCustomDialog, androidx.appcompat.app.AppCompatDialog
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        Window window = getWindow();
        if (window != null) {
            window.setSoftInputMode(48);
        }
        Z0();
        W0();
    }

    public void onDetachedFromWindow() {
        super.onDetachedFromWindow();
        R0().b();
    }

    @Override // com.xingin.alpha.base.AlphaBaseCustomDialog
    public void onStart() {
        super.onStart();
        LinearLayout linearLayout = (LinearLayout) findViewById(R$id.f39811btnManage);
        Intrinsics.checkNotNullExpressionValue(linearLayout, "btnManage");
        d2 d2Var = d2.f102239a;
        q1.Q(linearLayout, !d2Var.y0().isNormalUser(), false, 2, null);
        LinearLayout linearLayout2 = (LinearLayout) findViewById(R$id.f39820btnRefresh);
        Intrinsics.checkNotNullExpressionValue(linearLayout2, "btnRefresh");
        q1.Q(linearLayout2, !d2Var.y0().isNormalUser(), false, 2, null);
        boolean k14 = gu2.a.k();
        XYImageView xYImageView = (XYImageView) findViewById(R$id.backgroundView);
        String str = k14 ? "https://fe-video-qc.xhscdn.com/picasso-editor/d067edefd388017289c53d32cb93555cc9727f20.png" : "https://fe-video-qc.xhscdn.com/picasso-editor/54a15aa0269c1428b8fc950344a184f4f3422ed9.png";
        g0 g0Var = g0.f72750a;
        xYImageView.o(str, g0Var.P());
        ((XYImageView) findViewById(R$id.fot)).o(k14 ? "https://fe-video-qc.xhscdn.com/picasso-editor/16caf421975a3ac2108de84a02798522b4392fc9.png" : "https://fe-video-qc.xhscdn.com/picasso-editor/6c5b825dddbcaa0b7ec825988079f566de8aef58.png", g0Var.P());
        ((SelectRoundConstraintLayout) findViewById(R$id.rootLayout)).setBackgroundResource(k14 ? R$drawable.alpha_bg_gray_bottom_dialog : R$drawable.alpha_bg_gray_bottom_dialog_night);
    }

    public final void r0(SelectGoodsThemeBean selectGoodsThemeBean, int i10, boolean z14) {
        this.A.p(d2.f102239a.z0(), selectGoodsThemeBean.getCombinationId(), selectGoodsThemeBean.isExplaining() ? 2 : 1, z14 ? 1 : 0, new a(selectGoodsThemeBean, this, z14, i10));
    }

    @Override // com.xingin.alpha.base.AlphaBaseCustomDialog
    public void show() {
        super.show();
        u0();
    }

    public final void u0() {
        if (ak.c.f3514a.S().getUseNewThemeInterface()) {
            D0();
        } else {
            x0();
        }
    }

    public final void v0(ArrayList<SelectGoodsThemeBean> arrayList, CombinationDataBean combinationDataBean) {
        d2 d2Var = d2.f102239a;
        boolean z14 = d2Var.y0().isSuperUser() || d2Var.y0().isEmcee();
        this.f43403y.clear();
        g1.a(arrayList, new b(this));
        this.f43404z.v(z14);
        this.f43404z.notifyDataSetChanged();
        if (!z14 || combinationDataBean == null || !(!this.f43403y.isEmpty())) {
            AlphaEmceeThemeGoodsSaleDataView alphaEmceeThemeGoodsSaleDataView = (AlphaEmceeThemeGoodsSaleDataView) findViewById(R$id.eu7);
            Intrinsics.checkNotNullExpressionValue(alphaEmceeThemeGoodsSaleDataView, "saleDataView");
            q1.r(alphaEmceeThemeGoodsSaleDataView, false, 0, null, 7, null);
            LinearLayout linearLayout = (LinearLayout) findViewById(R$id.f39820btnRefresh);
            Intrinsics.checkNotNullExpressionValue(linearLayout, "btnRefresh");
            q1.r(linearLayout, false, 0, null, 7, null);
            return;
        }
        bj2.l.q((LinearLayout) findViewById(R$id.f39820btnRefresh));
        int i10 = R$id.eu7;
        bj2.l.q((AlphaEmceeThemeGoodsSaleDataView) findViewById(i10));
        AlphaEmceeThemeGoodsSaleDataView alphaEmceeThemeGoodsSaleDataView2 = (AlphaEmceeThemeGoodsSaleDataView) findViewById(i10);
        Long uv3 = combinationDataBean.getUv();
        long j14 = 0;
        long longValue = uv3 != null ? uv3.longValue() : 0;
        Long amount = combinationDataBean.getAmount();
        if (amount != null) {
            j14 = amount.longValue();
        }
        alphaEmceeThemeGoodsSaleDataView2.b(longValue, j14);
    }

    public final void x0() {
        D(true);
        d2 d2Var = d2.f102239a;
        r W0 = AlphaGoodsService.a.e(cl.a.f12786a.s(), d2Var.z0(), (d2Var.y0().isEmcee() || d2Var.y0().isSuperAdmin()) ? 1 : 0, 1, null, 8, null).x1(mi2.a.P()).W0(gw2.a.a());
        Intrinsics.checkNotNullExpressionValue(W0, "AlphaApiManager\n        …dSchedulers.mainThread())");
        Object n14 = W0.n(com.uber.autodispose.d.b(this));
        Intrinsics.checkExpressionValueIsNotNull(n14, "this.`as`(AutoDispose.autoDisposable(provider))");
        ((y) n14).a(new es.e(this), new es.g(this));
    }
}