得物.apk(点击下载) / BeingSellItemView.java
package com.shizhuang.duapp.modules.du_seller_bid.modules.being_sell.view;
import a.f;
import android.app.Activity;
import android.content.Context;
import android.util.ArrayMap;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.appcompat.widget.AppCompatTextView;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentViewModelLazyKt;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import cd.h;
import com.afollestad.materialdialogs.DialogAction;
import com.afollestad.materialdialogs.MaterialDialog;
import com.meituan.robust.ChangeQuickRedirect;
import com.meituan.robust.PatchProxy;
import com.meituan.robust.PatchProxyResult;
import com.sensorsdata.analytics.android.sdk.SensorsDataAutoTrackHelper;
import com.sensorsdata.analytics.android.sdk.SensorsDataInstrumented;
import com.shizhuang.duapp.R;
import com.shizhuang.duapp.common.component.module.AbsModuleView;
import com.shizhuang.duapp.common.component.module.ModuleAdapterDelegateKt;
import com.shizhuang.duapp.common.ui.view.ProductImageLoaderView;
import com.shizhuang.duapp.common.widget.FlowLayout;
import com.shizhuang.duapp.common.widget.font.FontText;
import com.shizhuang.duapp.libs.duimageloaderview.DuImageLoaderView;
import com.shizhuang.duapp.modules.du_mall_common.extension.ViewExtensionKt;
import com.shizhuang.duapp.modules.du_mall_common.model.OrderButtonModel;
import com.shizhuang.duapp.modules.du_mall_common.order.view.OrderButtonListView;
import com.shizhuang.duapp.modules.du_mall_common.utils.exposure.callback.IMallViewExposureObserver;
import com.shizhuang.duapp.modules.du_seller_bid.http.SellerBidFacade;
import com.shizhuang.duapp.modules.du_seller_bid.modules.being_sell.adapter.BeingSellShoesItemAdapterV3;
import com.shizhuang.duapp.modules.du_seller_bid.modules.being_sell.model.BeingSellButtonModel;
import com.shizhuang.duapp.modules.du_seller_bid.modules.being_sell.model.BottomDtoModel;
import com.shizhuang.duapp.modules.du_seller_bid.modules.being_sell.model.SellingSpuDtoModel;
import com.shizhuang.duapp.modules.du_seller_bid.modules.being_sell.model.SkuPropQuantityModel;
import com.shizhuang.duapp.modules.du_seller_bid.modules.being_sell.vm.BeingSellOrderViewModel;
import com.shizhuang.duapp.modules.router.ServiceManager;
import com.shizhuang.duapp.modules.router.service.IPayService;
import j50.p;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.collections.CollectionsKt__IterablesKt;
import kotlin.collections.CollectionsKt___CollectionsKt;
import kotlin.jvm.JvmOverloads;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Ref;
import kotlin.jvm.internal.Reflection;
import kotlin.text.StringsKt__StringsJVMKt;
import n80.a;
import org.greenrobot.eventbus.EventBus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import us.d;
import w50.b;
@Metadata(bv = {}, d1 = {"\u0000$\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\b\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\b\u0006\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u00012\u00020\u0003J\b\u0010\u0005\u001a\u00020\u0004H\u0016R\u0017\u0010\n\u001a\u00020\u00048\u0006¢\u0006\f\n\u0004\b\u0006\u0010\u0007\u001a\u0004\b\b\u0010\tR'\u0010\u0011\u001a\u0012\u0012\u0006\u0012\u0004\u0018\u00010\u0002\u0012\u0004\u0012\u00020\f\u0018\u00010\u000b8\u0006¢\u0006\f\n\u0004\b\r\u0010\u000e\u001a\u0004\b\u000f\u0010\u0010¨\u0006\u0012"}, d2 = {"Lcom/shizhuang/duapp/modules/du_seller_bid/modules/being_sell/view/BeingSellItemView;", "Lcom/shizhuang/duapp/common/component/module/AbsModuleView;", "Lcom/shizhuang/duapp/modules/du_seller_bid/modules/being_sell/model/SellingSpuDtoModel;", "Lcom/shizhuang/duapp/modules/du_mall_common/utils/exposure/callback/IMallViewExposureObserver;", "", "getLayoutId", "d", "I", "getTabId", "()I", "tabId", "Lkotlin/Function1;", "", "e", "Lkotlin/jvm/functions/Function1;", "getOrderClickCallBack", "()Lkotlin/jvm/functions/Function1;", "orderClickCallBack", "du_seller_bid_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: BeingSellItemView.kt */
public final class BeingSellItemView extends AbsModuleView<SellingSpuDtoModel> implements IMallViewExposureObserver {
public static ChangeQuickRedirect changeQuickRedirect;
public BeingSellOrderViewModel b;
/* renamed from: c reason: collision with root package name */
public BeingSellShoesItemAdapterV3 f14001c;
public final int d;
@Nullable
public final Function1<SellingSpuDtoModel, Unit> e;
public HashMap f;
@JvmOverloads
public BeingSellItemView(@NotNull Context context, @Nullable AttributeSet attributeSet, int i) {
this(context, attributeSet, 0, i, null, 20);
}
/* JADX WARNING: Illegal instructions before constructor call */
public BeingSellItemView(final Context context, AttributeSet attributeSet, int i, int i3, Function1 function1, int i12) {
super(context, r2, r4);
Function1 function12 = null;
AttributeSet attributeSet2 = (i12 & 2) != 0 ? null : attributeSet;
int i13 = (i12 & 4) != 0 ? 0 : i;
function12 = (i12 & 16) == 0 ? function1 : function12;
this.d = i3;
this.e = function12;
((OrderButtonListView) _$_findCachedViewById(R.id.buttonListView)).setList(true);
((OrderButtonListView) _$_findCachedViewById(R.id.buttonListView)).setButtonLayoutType(new int[]{R.layout.button_order_list_white, R.layout.button_order_list_primary});
((OrderButtonListView) _$_findCachedViewById(R.id.buttonListView)).c(4, new b(1, new View.OnClickListener() {
/* class com.shizhuang.duapp.modules.du_seller_bid.modules.being_sell.view.BeingSellItemView.AnonymousClass1 */
public static ChangeQuickRedirect changeQuickRedirect;
@SensorsDataInstrumented
public final void onClick(View view) {
Long spuId;
List<SkuPropQuantityModel> skuPropList;
SkuPropQuantityModel skuPropQuantityModel;
Long skuId;
Integer price;
Integer biddingType;
if (!PatchProxy.proxy(new Object[]{view}, this, changeQuickRedirect, false, 130397, new Class[]{View.class}, Void.TYPE).isSupported) {
Function1<SellingSpuDtoModel, Unit> orderClickCallBack = BeingSellItemView.this.getOrderClickCallBack();
if (orderClickCallBack != null) {
orderClickCallBack.invoke((SellingSpuDtoModel) BeingSellItemView.this.getData());
}
e60.b bVar = e60.b.f31725a;
Context context = context;
SellingSpuDtoModel sellingSpuDtoModel = (SellingSpuDtoModel) BeingSellItemView.this.getData();
int intValue = (sellingSpuDtoModel == null || (biddingType = sellingSpuDtoModel.getBiddingType()) == null) ? 0 : biddingType.intValue();
SellingSpuDtoModel sellingSpuDtoModel2 = (SellingSpuDtoModel) BeingSellItemView.this.getData();
Long valueOf = (sellingSpuDtoModel2 == null || (price = sellingSpuDtoModel2.getPrice()) == null) ? null : Long.valueOf((long) price.intValue());
SellingSpuDtoModel sellingSpuDtoModel3 = (SellingSpuDtoModel) BeingSellItemView.this.getData();
long j = 0;
long longValue = (sellingSpuDtoModel3 == null || (skuPropList = sellingSpuDtoModel3.getSkuPropList()) == null || (skuPropQuantityModel = (SkuPropQuantityModel) CollectionsKt___CollectionsKt.firstOrNull(skuPropList)) == null || (skuId = skuPropQuantityModel.getSkuId()) == null) ? 0 : skuId.longValue();
SellingSpuDtoModel sellingSpuDtoModel4 = (SellingSpuDtoModel) BeingSellItemView.this.getData();
e60.b.C(bVar, context, intValue, valueOf, longValue, sellingSpuDtoModel4 != null ? sellingSpuDtoModel4.getSellerBiddingNo() : null, null, null, null, 0, null, null, 0, null, null, null, false, false, 131040);
a aVar = a.f35943a;
Integer valueOf2 = Integer.valueOf(ModuleAdapterDelegateKt.d(BeingSellItemView.this) + 1);
SellingSpuDtoModel sellingSpuDtoModel5 = (SellingSpuDtoModel) BeingSellItemView.this.getData();
if (!(sellingSpuDtoModel5 == null || (spuId = sellingSpuDtoModel5.getSpuId()) == null)) {
j = spuId.longValue();
}
aVar.q(valueOf2, Long.valueOf(j), "调整出价");
SensorsDataAutoTrackHelper.trackViewOnClick(view);
}
}
}, null, null, false, null, null, null, false, 508));
((OrderButtonListView) _$_findCachedViewById(R.id.buttonListView)).c(5, new b(1, new View.OnClickListener() {
/* class com.shizhuang.duapp.modules.du_seller_bid.modules.being_sell.view.BeingSellItemView.AnonymousClass2 */
public static ChangeQuickRedirect changeQuickRedirect;
@SensorsDataInstrumented
public final void onClick(View view) {
Long spuId;
Integer biddingType;
Long spuId2;
int i = 0;
if (!PatchProxy.proxy(new Object[]{view}, this, changeQuickRedirect, false, 130398, new Class[]{View.class}, Void.TYPE).isSupported) {
Function1<SellingSpuDtoModel, Unit> orderClickCallBack = BeingSellItemView.this.getOrderClickCallBack();
if (orderClickCallBack != null) {
orderClickCallBack.invoke((SellingSpuDtoModel) BeingSellItemView.this.getData());
}
e60.b bVar = e60.b.f31725a;
Context context = context;
SellingSpuDtoModel sellingSpuDtoModel = (SellingSpuDtoModel) BeingSellItemView.this.getData();
long j = 0;
long longValue = (sellingSpuDtoModel == null || (spuId2 = sellingSpuDtoModel.getSpuId()) == null) ? 0 : spuId2.longValue();
SellingSpuDtoModel sellingSpuDtoModel2 = (SellingSpuDtoModel) BeingSellItemView.this.getData();
if (!(sellingSpuDtoModel2 == null || (biddingType = sellingSpuDtoModel2.getBiddingType()) == null)) {
i = biddingType.intValue();
}
bVar.i2(context, longValue, i);
a aVar = a.f35943a;
Integer valueOf = Integer.valueOf(ModuleAdapterDelegateKt.d(BeingSellItemView.this) + 1);
SellingSpuDtoModel sellingSpuDtoModel3 = (SellingSpuDtoModel) BeingSellItemView.this.getData();
if (!(sellingSpuDtoModel3 == null || (spuId = sellingSpuDtoModel3.getSpuId()) == null)) {
j = spuId.longValue();
}
aVar.q(valueOf, Long.valueOf(j), "管理库存");
SensorsDataAutoTrackHelper.trackViewOnClick(view);
}
}
}, null, null, false, null, null, null, false, 508));
((OrderButtonListView) _$_findCachedViewById(R.id.buttonListView)).c(6, new b(1, new View.OnClickListener() {
/* class com.shizhuang.duapp.modules.du_seller_bid.modules.being_sell.view.BeingSellItemView.AnonymousClass3 */
public static ChangeQuickRedirect changeQuickRedirect;
/* renamed from: com.shizhuang.duapp.modules.du_seller_bid.modules.being_sell.view.BeingSellItemView$3$a */
/* compiled from: BeingSellItemView.kt */
public static final class a implements IPayService.PayResultListener {
public static final a b = new a();
public static ChangeQuickRedirect changeQuickRedirect;
@Override // com.shizhuang.duapp.modules.router.service.IPayService.PayResultListener
public final void onPayResult(boolean z) {
if (!PatchProxy.proxy(new Object[]{new Byte(z ? (byte) 1 : 0)}, this, changeQuickRedirect, false, 130400, new Class[]{Boolean.TYPE}, Void.TYPE).isSupported) {
d.e(null, 1, EventBus.b());
}
}
}
@SensorsDataInstrumented
public final void onClick(View view) {
Integer deposit;
String sellerBiddingNo;
if (!PatchProxy.proxy(new Object[]{view}, this, changeQuickRedirect, false, 130399, new Class[]{View.class}, Void.TYPE).isSupported) {
IPayService z = ServiceManager.z();
Activity h12 = ViewExtensionKt.h(BeingSellItemView.this);
SellingSpuDtoModel sellingSpuDtoModel = (SellingSpuDtoModel) BeingSellItemView.this.getData();
long parseLong = (sellingSpuDtoModel == null || (sellerBiddingNo = sellingSpuDtoModel.getSellerBiddingNo()) == null) ? 0 : Long.parseLong(sellerBiddingNo);
SellingSpuDtoModel sellingSpuDtoModel2 = (SellingSpuDtoModel) BeingSellItemView.this.getData();
z.showPaySelectorDialog(h12, 1, parseLong, (sellingSpuDtoModel2 == null || (deposit = sellingSpuDtoModel2.getDeposit()) == null) ? 0 : deposit.intValue(), a.b);
SensorsDataAutoTrackHelper.trackViewOnClick(view);
}
}
}, null, null, false, null, null, null, false, 508));
((OrderButtonListView) _$_findCachedViewById(R.id.buttonListView)).c(7, new b(0, new View.OnClickListener() {
/* class com.shizhuang.duapp.modules.du_seller_bid.modules.being_sell.view.BeingSellItemView.AnonymousClass4 */
public static ChangeQuickRedirect changeQuickRedirect;
/* renamed from: com.shizhuang.duapp.modules.du_seller_bid.modules.being_sell.view.BeingSellItemView$4$a */
/* compiled from: BeingSellItemView.kt */
public static final class a implements MaterialDialog.SingleButtonCallback {
public static ChangeQuickRedirect changeQuickRedirect;
public final /* synthetic */ AnonymousClass4 b;
public a(AnonymousClass4 r12) {
this.b = r12;
}
@Override // com.afollestad.materialdialogs.MaterialDialog.SingleButtonCallback
public final void onClick(@NotNull MaterialDialog materialDialog, @NotNull DialogAction dialogAction) {
SellingSpuDtoModel sellingSpuDtoModel;
String sellerBiddingNo;
BeingSellOrderViewModel beingSellOrderViewModel;
if (!PatchProxy.proxy(new Object[]{materialDialog, dialogAction}, this, changeQuickRedirect, false, 130402, new Class[]{MaterialDialog.class, DialogAction.class}, Void.TYPE).isSupported && (sellingSpuDtoModel = (SellingSpuDtoModel) BeingSellItemView.this.getData()) != null && (sellerBiddingNo = sellingSpuDtoModel.getSellerBiddingNo()) != null && (beingSellOrderViewModel = BeingSellItemView.this.b) != null) {
if (!PatchProxy.proxy(new Object[]{sellerBiddingNo}, beingSellOrderViewModel, BeingSellOrderViewModel.changeQuickRedirect, false, 130682, new Class[]{String.class}, Void.TYPE).isSupported) {
SellerBidFacade.deleteBidding(sellerBiddingNo, new r70.a(beingSellOrderViewModel));
}
}
}
}
@SensorsDataInstrumented
public final void onClick(View view) {
if (!PatchProxy.proxy(new Object[]{view}, this, changeQuickRedirect, false, 130401, new Class[]{View.class}, Void.TYPE).isSupported) {
MaterialDialog.b bVar = new MaterialDialog.b(context);
bVar.b("确认删除订单?");
bVar.n = "取消";
bVar.l = "确定";
bVar.f2882u = new a(this);
bVar.l();
SensorsDataAutoTrackHelper.trackViewOnClick(view);
}
}
}, null, null, false, null, null, null, false, 508));
((OrderButtonListView) _$_findCachedViewById(R.id.buttonListView)).c(9, new b(0, new View.OnClickListener() {
/* class com.shizhuang.duapp.modules.du_seller_bid.modules.being_sell.view.BeingSellItemView.AnonymousClass5 */
public static ChangeQuickRedirect changeQuickRedirect;
@SensorsDataInstrumented
public final void onClick(View view) {
String str;
if (!PatchProxy.proxy(new Object[]{view}, this, changeQuickRedirect, false, 130403, new Class[]{View.class}, Void.TYPE).isSupported) {
Function1<SellingSpuDtoModel, Unit> orderClickCallBack = BeingSellItemView.this.getOrderClickCallBack();
if (orderClickCallBack != null) {
orderClickCallBack.invoke((SellingSpuDtoModel) BeingSellItemView.this.getData());
}
e60.b bVar = e60.b.f31725a;
Context context = context;
SellingSpuDtoModel sellingSpuDtoModel = (SellingSpuDtoModel) BeingSellItemView.this.getData();
if (sellingSpuDtoModel == null || (str = sellingSpuDtoModel.getSellerBiddingNo()) == null) {
str = "";
}
bVar.D(context, str);
SensorsDataAutoTrackHelper.trackViewOnClick(view);
}
}
}, null, null, false, null, null, null, false, 508));
((OrderButtonListView) _$_findCachedViewById(R.id.buttonListView)).c(10, new b(0, new View.OnClickListener() {
/* class com.shizhuang.duapp.modules.du_seller_bid.modules.being_sell.view.BeingSellItemView.AnonymousClass6 */
public static ChangeQuickRedirect changeQuickRedirect;
@SensorsDataInstrumented
public final void onClick(View view) {
if (!PatchProxy.proxy(new Object[]{view}, this, changeQuickRedirect, false, 130404, new Class[]{View.class}, Void.TYPE).isSupported) {
Function1<SellingSpuDtoModel, Unit> orderClickCallBack = BeingSellItemView.this.getOrderClickCallBack();
if (orderClickCallBack != null) {
orderClickCallBack.invoke((SellingSpuDtoModel) BeingSellItemView.this.getData());
}
e60.b bVar = e60.b.f31725a;
Context context = context;
SellingSpuDtoModel sellingSpuDtoModel = (SellingSpuDtoModel) BeingSellItemView.this.getData();
bVar.G0(context, sellingSpuDtoModel != null ? sellingSpuDtoModel.getSellerBiddingNo() : null);
SensorsDataAutoTrackHelper.trackViewOnClick(view);
}
}
}, null, null, false, null, null, null, false, 508));
((OrderButtonListView) _$_findCachedViewById(R.id.buttonListView)).c(11, new b(0, new View.OnClickListener() {
/* class com.shizhuang.duapp.modules.du_seller_bid.modules.being_sell.view.BeingSellItemView.AnonymousClass7 */
public static ChangeQuickRedirect changeQuickRedirect;
@SensorsDataInstrumented
public final void onClick(View view) {
if (!PatchProxy.proxy(new Object[]{view}, this, changeQuickRedirect, false, 130405, new Class[]{View.class}, Void.TYPE).isSupported) {
Function1<SellingSpuDtoModel, Unit> orderClickCallBack = BeingSellItemView.this.getOrderClickCallBack();
if (orderClickCallBack != null) {
orderClickCallBack.invoke((SellingSpuDtoModel) BeingSellItemView.this.getData());
}
e60.b bVar = e60.b.f31725a;
Context context = context;
SellingSpuDtoModel sellingSpuDtoModel = (SellingSpuDtoModel) BeingSellItemView.this.getData();
bVar.G0(context, sellingSpuDtoModel != null ? sellingSpuDtoModel.getSellerBiddingNo() : null);
SensorsDataAutoTrackHelper.trackViewOnClick(view);
}
}
}, null, null, false, null, null, null, false, 508));
this.f14001c = new BeingSellShoesItemAdapterV3(context);
}
public View _$_findCachedViewById(int i) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 130395, new Class[]{Integer.TYPE}, View.class);
if (proxy.isSupported) {
return (View) proxy.result;
}
if (this.f == null) {
this.f = new HashMap();
}
View view = (View) this.f.get(Integer.valueOf(i));
if (view != null) {
return view;
}
View findViewById = findViewById(i);
this.f.put(Integer.valueOf(i), findViewById);
return findViewById;
}
@Override // com.shizhuang.duapp.common.component.module.AbsModuleView
public int getLayoutId() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 130390, new Class[0], Integer.TYPE);
return proxy.isSupported ? ((Integer) proxy.result).intValue() : R.layout.item_selling_order_v3;
}
@Nullable
public final Function1<SellingSpuDtoModel, Unit> getOrderClickCallBack() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 130394, new Class[0], Function1.class);
return proxy.isSupported ? (Function1) proxy.result : this.e;
}
public final int getTabId() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 130393, new Class[0], Integer.TYPE);
return proxy.isSupported ? ((Integer) proxy.result).intValue() : this.d;
}
public void onAttachedToWindow() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 130389, new Class[0], Void.TYPE).isSupported) {
super.onAttachedToWindow();
try {
Fragment d12 = h.d(this, com.shizhuang.duapp.common.extension.ViewExtensionKt.g(this));
if (d12 != null) {
this.b = (BeingSellOrderViewModel) FragmentViewModelLazyKt.createViewModelLazy(d12, Reflection.getOrCreateKotlinClass(BeingSellOrderViewModel.class), new BeingSellItemView$onAttachedToWindow$$inlined$fragmentViewModels$2(new BeingSellItemView$onAttachedToWindow$$inlined$fragmentViewModels$1(d12)), null).getValue();
return;
}
throw new IllegalStateException("Required value was null.".toString());
} catch (Exception unused) {
fo.a.f("BeingSellItemView Fragment is null", new Object[0]);
}
}
}
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
/* JADX WARNING: Removed duplicated region for block: B:103:0x0274 */
/* JADX WARNING: Removed duplicated region for block: B:104:0x0276 */
/* JADX WARNING: Removed duplicated region for block: B:107:0x02b0 */
/* JADX WARNING: Removed duplicated region for block: B:108:0x02b2 */
/* JADX WARNING: Removed duplicated region for block: B:111:0x02b6 */
/* JADX WARNING: Removed duplicated region for block: B:112:0x02b8 */
/* JADX WARNING: Removed duplicated region for block: B:120:0x02df */
/* JADX WARNING: Removed duplicated region for block: B:140:0x032c */
/* JADX WARNING: Removed duplicated region for block: B:141:0x033f */
/* JADX WARNING: Removed duplicated region for block: B:144:0x035b */
/* JADX WARNING: Removed duplicated region for block: B:145:0x035d */
/* JADX WARNING: Removed duplicated region for block: B:166:0x03a3 */
/* JADX WARNING: Removed duplicated region for block: B:176:0x03ce */
/* JADX WARNING: Removed duplicated region for block: B:195:0x0414 */
/* JADX WARNING: Removed duplicated region for block: B:64:0x0172 */
/* JADX WARNING: Removed duplicated region for block: B:65:0x0174 */
/* JADX WARNING: Removed duplicated region for block: B:68:0x0190 */
/* JADX WARNING: Removed duplicated region for block: B:89:0x0212 */
/* JADX WARNING: Removed duplicated region for block: B:90:0x0228 */
/* JADX WARNING: Removed duplicated region for block: B:93:0x023c */
/* JADX WARNING: Removed duplicated region for block: B:94:0x024d */
@Override // com.shizhuang.duapp.common.component.module.AbsModuleView
public void onChanged(SellingSpuDtoModel sellingSpuDtoModel) {
boolean z;
Integer price;
List<String> biddingAgreementList;
ArrayList arrayList;
List<SkuPropQuantityModel> skuPropList;
boolean z4;
SkuPropQuantityModel skuPropQuantityModel;
SkuPropQuantityModel skuPropQuantityModel2;
SkuPropQuantityModel skuPropQuantityModel3;
SkuPropQuantityModel skuPropQuantityModel4;
SkuPropQuantityModel skuPropQuantityModel5;
List<BeingSellButtonModel> buttons;
SellingSpuDtoModel sellingSpuDtoModel2 = sellingSpuDtoModel;
if (!PatchProxy.proxy(new Object[]{sellingSpuDtoModel2}, this, changeQuickRedirect, false, 130391, new Class[]{SellingSpuDtoModel.class}, Void.TYPE).isSupported) {
super.onChanged(sellingSpuDtoModel2);
((ProductImageLoaderView) _$_findCachedViewById(R.id.iv_cover)).i(sellingSpuDtoModel2.getSpuPic()).x();
TextView textView = (TextView) _$_findCachedViewById(R.id.tv_status);
int i = this.d;
textView.setText(i != 0 ? i != 1 ? i != 2 ? i != 3 ? "" : "已售罄" : "正在出售" : "已取消" : "待付款");
TextView textView2 = (TextView) _$_findCachedViewById(R.id.tv_article_num);
String articleNumber = sellingSpuDtoModel2.getArticleNumber();
int i3 = 8;
textView2.setVisibility((articleNumber == null || articleNumber.length() == 0) ^ true ? 0 : 8);
((TextView) _$_findCachedViewById(R.id.tv_article_num)).setText(sellingSpuDtoModel2.getArticleNumber());
String billNo = sellingSpuDtoModel2.getBillNo();
if (!(billNo == null || billNo.length() == 0)) {
Integer biddingType = sellingSpuDtoModel2.getBiddingType();
if (biddingType != null && biddingType.intValue() == 5) {
ViewExtensionKt.k((TextView) _$_findCachedViewById(R.id.tvNo));
} else {
ViewExtensionKt.o((TextView) _$_findCachedViewById(R.id.tvNo));
((TextView) _$_findCachedViewById(R.id.tvNo)).setText(com.shizhuang.duapp.common.extension.ViewExtensionKt.t(this, R.string.seller_insure_invoice_bill, sellingSpuDtoModel2.getBillNo()));
((TextView) _$_findCachedViewById(R.id.tvNo)).setTextColor(ContextCompat.getColor(getContext(), R.color.color_gray_7f7f8e));
}
} else {
String priceAutoFollowDesc = sellingSpuDtoModel2.getPriceAutoFollowDesc();
if (!(priceAutoFollowDesc == null || priceAutoFollowDesc.length() == 0)) {
ViewExtensionKt.o((TextView) _$_findCachedViewById(R.id.tvNo));
((TextView) _$_findCachedViewById(R.id.tvNo)).setText(sellingSpuDtoModel2.getPriceAutoFollowDesc());
((TextView) _$_findCachedViewById(R.id.tvNo)).setTextColor(ContextCompat.getColor(getContext(), R.color.color_text_primary));
} else {
ViewExtensionKt.k((TextView) _$_findCachedViewById(R.id.tvNo));
}
}
TextView textView3 = (TextView) _$_findCachedViewById(R.id.tv_agreement);
String biddingAgreement = sellingSpuDtoModel2.getBiddingAgreement();
if (!(biddingAgreement == null || biddingAgreement.length() == 0)) {
List<String> biddingAgreementList2 = sellingSpuDtoModel2.getBiddingAgreementList();
if (biddingAgreementList2 == null || biddingAgreementList2.isEmpty()) {
z = true;
textView3.setVisibility(!z ? 0 : 8);
((TextView) _$_findCachedViewById(R.id.tv_agreement)).setText(sellingSpuDtoModel2.getBiddingAgreement());
String spuTitle = sellingSpuDtoModel2.getSpuTitle();
if (sellingSpuDtoModel2.getTitleTag() != null) {
TextView textView4 = (TextView) _$_findCachedViewById(R.id.tvTag);
String bidTypeName = sellingSpuDtoModel2.getTitleTag().getBidTypeName();
textView4.setVisibility((bidTypeName == null || bidTypeName.length() == 0) ^ true ? 0 : 8);
((TextView) _$_findCachedViewById(R.id.tvTag)).setText(sellingSpuDtoModel2.getTitleTag().getBidTypeName());
String afterSaleTxt = sellingSpuDtoModel2.getTitleTag().getAfterSaleTxt();
if (!(afterSaleTxt == null || afterSaleTxt.length() == 0)) {
StringBuilder h12 = f.h("「");
h12.append(sellingSpuDtoModel2.getTitleTag().getAfterSaleTxt());
h12.append("」");
h12.append(spuTitle);
spuTitle = h12.toString();
}
Unit unit = Unit.INSTANCE;
}
((TextView) _$_findCachedViewById(R.id.tv_title)).setText(spuTitle);
price = sellingSpuDtoModel2.getPrice();
if (price == null) {
((FontText) _$_findCachedViewById(R.id.tv_price)).b(price.intValue() / 100, 12, 16);
Unit unit2 = Unit.INSTANCE;
} else {
((FontText) _$_findCachedViewById(R.id.tv_price)).setText("");
Unit unit3 = Unit.INSTANCE;
}
biddingAgreementList = sellingSpuDtoModel2.getBiddingAgreementList();
if (biddingAgreementList == null) {
c70.a.a(c70.a.f2381a, (FlowLayout) _$_findCachedViewById(R.id.labelFlowLayout), biddingAgreementList, null, false, 12);
} else {
((FlowLayout) _$_findCachedViewById(R.id.labelFlowLayout)).removeAllViews();
}
Unit unit4 = Unit.INSTANCE;
LinearLayout linearLayout = (LinearLayout) _$_findCachedViewById(R.id.icePriceTag);
String icePriceGuideText = sellingSpuDtoModel2.getIcePriceGuideText();
linearLayout.setVisibility(!((icePriceGuideText != null || StringsKt__StringsJVMKt.isBlank(icePriceGuideText)) ^ true) ? 0 : 8);
((DuImageLoaderView) _$_findCachedViewById(R.id.ivIcePrice)).i("https://apk.poizon.com/duApp/Android_Config/resource/mall/app/merchant/icon_browsing_records@3x.png").x();
((TextView) _$_findCachedViewById(R.id.tvIcePriceHint)).setText(sellingSpuDtoModel2.getIcePriceGuideText());
_$_findCachedViewById(R.id.vv_split_middle_tag).setVisibility(!((((LinearLayout) _$_findCachedViewById(R.id.icePriceTag)).getVisibility() != 0) ^ true) ? 0 : 8);
Ref.BooleanRef booleanRef = new Ref.BooleanRef();
booleanRef.element = true;
arrayList = new ArrayList();
BottomDtoModel bottomDto = sellingSpuDtoModel2.getBottomDto();
if (!(bottomDto == null || (buttons = bottomDto.getButtons()) == null)) {
for (T t : buttons) {
String buttonDesc = t.getButtonDesc();
if (!(buttonDesc == null || buttonDesc.length() == 0)) {
Integer buttonType = t.getButtonType();
if (buttonType != null && buttonType.intValue() == 5) {
booleanRef.element = false;
}
Integer buttonType2 = t.getButtonType();
arrayList.add(new OrderButtonModel(buttonType2 != null ? buttonType2.intValue() : 0, t.getButtonDesc()));
}
}
Unit unit5 = Unit.INSTANCE;
}
Integer num = null;
if (!(!arrayList.isEmpty())) {
ViewExtensionKt.o((OrderButtonListView) _$_findCachedViewById(R.id.buttonListView));
((OrderButtonListView) _$_findCachedViewById(R.id.buttonListView)).d(arrayList);
} else {
ViewExtensionKt.k((OrderButtonListView) _$_findCachedViewById(R.id.buttonListView));
((OrderButtonListView) _$_findCachedViewById(R.id.buttonListView)).d(null);
}
((FontText) _$_findCachedViewById(R.id.tv_price)).setVisibility(!booleanRef.element ? 0 : 8);
com.shizhuang.duapp.common.extension.ViewExtensionKt.j(this, 0, new BeingSellItemView$onChanged$6(this, booleanRef, sellingSpuDtoModel2), 1);
skuPropList = sellingSpuDtoModel2.getSkuPropList();
if (skuPropList != null || (skuPropQuantityModel5 = (SkuPropQuantityModel) CollectionsKt___CollectionsKt.firstOrNull((List) skuPropList)) == null) {
z4 = false;
} else {
List<SkuPropQuantityModel> skuPropList2 = sellingSpuDtoModel2.getSkuPropList();
if ((skuPropList2 != null ? skuPropList2.size() : 0) <= 1) {
Integer quantity = skuPropQuantityModel5.getQuantity();
if ((quantity != null ? quantity.intValue() : 0) <= 1) {
z4 = false;
Unit unit6 = Unit.INSTANCE;
}
}
z4 = true;
Unit unit62 = Unit.INSTANCE;
}
if (!z4) {
TextView textView5 = (TextView) _$_findCachedViewById(R.id.tv_current_min_price);
String saleInventoryDesc = sellingSpuDtoModel2.getSaleInventoryDesc();
if (!(saleInventoryDesc == null || saleInventoryDesc.length() == 0)) {
i3 = 0;
}
textView5.setVisibility(i3);
((TextView) _$_findCachedViewById(R.id.tv_current_min_price)).setText(sellingSpuDtoModel2.getSaleInventoryDesc());
} else {
TextView textView6 = (TextView) _$_findCachedViewById(R.id.tv_current_min_price);
BottomDtoModel bottomDto2 = sellingSpuDtoModel2.getBottomDto();
String priceDesc = bottomDto2 != null ? bottomDto2.getPriceDesc() : null;
if (!(priceDesc == null || priceDesc.length() == 0)) {
i3 = 0;
}
textView6.setVisibility(i3);
TextView textView7 = (TextView) _$_findCachedViewById(R.id.tv_current_min_price);
BottomDtoModel bottomDto3 = sellingSpuDtoModel2.getBottomDto();
textView7.setText(bottomDto3 != null ? bottomDto3.getPriceDesc() : null);
}
if (sellingSpuDtoModel2.getGoodsType() != null) {
List<SkuPropQuantityModel> skuPropList3 = sellingSpuDtoModel2.getSkuPropList();
if ((skuPropList3 != null ? skuPropList3.size() : 0) > 0) {
Integer goodsType = sellingSpuDtoModel2.getGoodsType();
if (goodsType != null && goodsType.intValue() == 0) {
((FlowLayout) _$_findCachedViewById(R.id.grid_view_other)).removeAllViews();
ViewExtensionKt.k((FlowLayout) _$_findCachedViewById(R.id.grid_view_other));
if (z4) {
ViewExtensionKt.o((RecyclerView) _$_findCachedViewById(R.id.grid_view_shoes));
GridLayoutManager gridLayoutManager = new GridLayoutManager(getContext(), 4);
gridLayoutManager.setAutoMeasureEnabled(true);
((RecyclerView) _$_findCachedViewById(R.id.grid_view_shoes)).setLayoutManager(gridLayoutManager);
((RecyclerView) _$_findCachedViewById(R.id.grid_view_shoes)).setAdapter(this.f14001c);
((RecyclerView) _$_findCachedViewById(R.id.grid_view_shoes)).setOnTouchListener(new o70.a(this));
BeingSellShoesItemAdapterV3 beingSellShoesItemAdapterV3 = this.f14001c;
List<SkuPropQuantityModel> skuPropList4 = sellingSpuDtoModel2.getSkuPropList();
if (!PatchProxy.proxy(new Object[]{skuPropList4}, beingSellShoesItemAdapterV3, BeingSellShoesItemAdapterV3.changeQuickRedirect, false, 129081, new Class[]{List.class}, Void.TYPE).isSupported) {
beingSellShoesItemAdapterV3.f13966a = skuPropList4;
beingSellShoesItemAdapterV3.notifyDataSetChanged();
}
ViewExtensionKt.k((AppCompatTextView) _$_findCachedViewById(R.id.single_product_message));
return;
}
ViewExtensionKt.k((RecyclerView) _$_findCachedViewById(R.id.grid_view_shoes));
ViewExtensionKt.o((AppCompatTextView) _$_findCachedViewById(R.id.single_product_message));
AppCompatTextView appCompatTextView = (AppCompatTextView) _$_findCachedViewById(R.id.single_product_message);
StringBuilder sb2 = new StringBuilder();
List<SkuPropQuantityModel> skuPropList5 = sellingSpuDtoModel2.getSkuPropList();
sb2.append((skuPropList5 == null || (skuPropQuantityModel4 = (SkuPropQuantityModel) CollectionsKt___CollectionsKt.firstOrNull(skuPropList5)) == null) ? null : skuPropQuantityModel4.getSpuProp());
sb2.append(" × ");
List<SkuPropQuantityModel> skuPropList6 = sellingSpuDtoModel2.getSkuPropList();
if (!(skuPropList6 == null || (skuPropQuantityModel3 = (SkuPropQuantityModel) CollectionsKt___CollectionsKt.firstOrNull((List) skuPropList6)) == null)) {
num = skuPropQuantityModel3.getQuantity();
}
sb2.append(num);
appCompatTextView.setText(sb2.toString());
return;
}
ViewExtensionKt.k((RecyclerView) _$_findCachedViewById(R.id.grid_view_shoes));
if (z4) {
((FlowLayout) _$_findCachedViewById(R.id.grid_view_other)).removeAllViews();
ViewExtensionKt.o((FlowLayout) _$_findCachedViewById(R.id.grid_view_other));
ViewExtensionKt.k((AppCompatTextView) _$_findCachedViewById(R.id.single_product_message));
List<SkuPropQuantityModel> skuPropList7 = sellingSpuDtoModel2.getSkuPropList();
if (skuPropList7 != null) {
for (T t4 : skuPropList7) {
if (!(t4.getSpuProp() == null || t4.getQuantity() == null)) {
View inflate = LayoutInflater.from(getContext()).inflate(R.layout.layout_other_product_pro_v2, (ViewGroup) null);
((TextView) inflate.findViewById(R.id.tv_product_pro)).setText(t4.getSpuProp() + " x️ " + t4.getQuantity());
((FlowLayout) _$_findCachedViewById(R.id.grid_view_other)).addView(inflate);
}
}
Unit unit7 = Unit.INSTANCE;
return;
}
return;
}
ViewExtensionKt.k((FlowLayout) _$_findCachedViewById(R.id.grid_view_other));
ViewExtensionKt.o((AppCompatTextView) _$_findCachedViewById(R.id.single_product_message));
AppCompatTextView appCompatTextView2 = (AppCompatTextView) _$_findCachedViewById(R.id.single_product_message);
StringBuilder sb3 = new StringBuilder();
List<SkuPropQuantityModel> skuPropList8 = sellingSpuDtoModel2.getSkuPropList();
sb3.append((skuPropList8 == null || (skuPropQuantityModel2 = (SkuPropQuantityModel) CollectionsKt___CollectionsKt.firstOrNull(skuPropList8)) == null) ? null : skuPropQuantityModel2.getSpuProp());
sb3.append(" × ");
List<SkuPropQuantityModel> skuPropList9 = sellingSpuDtoModel2.getSkuPropList();
if (!(skuPropList9 == null || (skuPropQuantityModel = (SkuPropQuantityModel) CollectionsKt___CollectionsKt.firstOrNull((List) skuPropList9)) == null)) {
num = skuPropQuantityModel.getQuantity();
}
sb3.append(num);
appCompatTextView2.setText(sb3.toString());
return;
}
}
ViewExtensionKt.k((FlowLayout) _$_findCachedViewById(R.id.grid_view_other));
ViewExtensionKt.k((AppCompatTextView) _$_findCachedViewById(R.id.single_product_message));
}
}
z = false;
textView3.setVisibility(!z ? 0 : 8);
((TextView) _$_findCachedViewById(R.id.tv_agreement)).setText(sellingSpuDtoModel2.getBiddingAgreement());
String spuTitle2 = sellingSpuDtoModel2.getSpuTitle();
if (sellingSpuDtoModel2.getTitleTag() != null) {
}
((TextView) _$_findCachedViewById(R.id.tv_title)).setText(spuTitle2);
price = sellingSpuDtoModel2.getPrice();
if (price == null) {
}
biddingAgreementList = sellingSpuDtoModel2.getBiddingAgreementList();
if (biddingAgreementList == null) {
}
Unit unit42 = Unit.INSTANCE;
LinearLayout linearLayout2 = (LinearLayout) _$_findCachedViewById(R.id.icePriceTag);
String icePriceGuideText2 = sellingSpuDtoModel2.getIcePriceGuideText();
linearLayout2.setVisibility(!((icePriceGuideText2 != null || StringsKt__StringsJVMKt.isBlank(icePriceGuideText2)) ^ true) ? 0 : 8);
((DuImageLoaderView) _$_findCachedViewById(R.id.ivIcePrice)).i("https://apk.poizon.com/duApp/Android_Config/resource/mall/app/merchant/icon_browsing_records@3x.png").x();
((TextView) _$_findCachedViewById(R.id.tvIcePriceHint)).setText(sellingSpuDtoModel2.getIcePriceGuideText());
_$_findCachedViewById(R.id.vv_split_middle_tag).setVisibility(!((((LinearLayout) _$_findCachedViewById(R.id.icePriceTag)).getVisibility() != 0) ^ true) ? 0 : 8);
Ref.BooleanRef booleanRef2 = new Ref.BooleanRef();
booleanRef2.element = true;
arrayList = new ArrayList();
BottomDtoModel bottomDto4 = sellingSpuDtoModel2.getBottomDto();
while (r5.hasNext()) {
}
Unit unit52 = Unit.INSTANCE;
Integer num2 = null;
if (!(!arrayList.isEmpty())) {
}
((FontText) _$_findCachedViewById(R.id.tv_price)).setVisibility(!booleanRef2.element ? 0 : 8);
com.shizhuang.duapp.common.extension.ViewExtensionKt.j(this, 0, new BeingSellItemView$onChanged$6(this, booleanRef2, sellingSpuDtoModel2), 1);
skuPropList = sellingSpuDtoModel2.getSkuPropList();
if (skuPropList != null) {
}
z4 = false;
if (!z4) {
}
if (sellingSpuDtoModel2.getGoodsType() != null) {
}
ViewExtensionKt.k((FlowLayout) _$_findCachedViewById(R.id.grid_view_other));
ViewExtensionKt.k((AppCompatTextView) _$_findCachedViewById(R.id.single_product_message));
}
}
@Override // com.shizhuang.duapp.modules.du_mall_common.utils.exposure.callback.IMallViewExposureObserver
public void onExposure() {
String str;
BottomDtoModel bottomDto;
List<BeingSellButtonModel> buttons;
Long spuId;
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 130392, new Class[0], Void.TYPE).isSupported) {
a aVar = a.f35943a;
Integer valueOf = Integer.valueOf(ModuleAdapterDelegateKt.d(this) + 1);
SellingSpuDtoModel sellingSpuDtoModel = (SellingSpuDtoModel) getData();
Long valueOf2 = Long.valueOf((sellingSpuDtoModel == null || (spuId = sellingSpuDtoModel.getSpuId()) == null) ? 0 : spuId.longValue());
SellingSpuDtoModel sellingSpuDtoModel2 = (SellingSpuDtoModel) getData();
if (sellingSpuDtoModel2 == null || (bottomDto = sellingSpuDtoModel2.getBottomDto()) == null || (buttons = bottomDto.getButtons()) == null) {
str = null;
} else {
ArrayList arrayList = new ArrayList(CollectionsKt__IterablesKt.collectionSizeOrDefault(buttons, 10));
Iterator<T> it2 = buttons.iterator();
while (it2.hasNext()) {
arrayList.add(it2.next().getButtonDesc());
}
str = CollectionsKt___CollectionsKt.joinToString$default(arrayList, ",", null, null, 0, null, null, 62, null);
}
String c5 = p.c(str);
if (!PatchProxy.proxy(new Object[]{valueOf, valueOf2, c5}, aVar, a.changeQuickRedirect, false, 134402, new Class[]{Object.class, Object.class, Object.class}, Void.TYPE).isSupported) {
i60.b bVar = i60.b.f33293a;
ArrayMap b2 = g.a.b(8, "block_content_position", valueOf, "spu_id", valueOf2);
b2.put("button_title", c5);
bVar.b("trade_sell_block_exposure", "1423", "2277", b2);
}
}
}
}