package com.shizhuang.duapp.modules.product_detail.own.views; import a.f; import android.app.Activity; import android.content.Context; import android.graphics.Color; import android.graphics.drawable.GradientDrawable; import android.util.ArrayMap; import android.util.AttributeSet; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import androidx.constraintlayout.widget.ConstraintLayout; import androidx.core.view.OneShotPreDrawListener; import androidx.core.view.ViewCompat; import co.c; import co.d; import com.meituan.robust.ChangeQuickRedirect; import com.meituan.robust.PatchProxy; import com.meituan.robust.PatchProxyResult; import com.shizhuang.duapp.R; import com.shizhuang.duapp.common.component.module.AbsModuleView; import com.shizhuang.duapp.common.extension.DrawableScale; import com.shizhuang.duapp.common.ui.view.ProductImageLoaderView; 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.utils.exposure.callback.IMallViewExposureObserver; import com.shizhuang.duapp.modules.product_detail.own.model.MyOwnGiverInfo; import com.shizhuang.duapp.modules.product_detail.own.model.MyOwnSkuListItemModel; import com.shizhuang.duapp.modules.product_detail.own.model.MyOwnSpuItemModel; import com.shizhuang.duapp.modules.product_detail.own.widget.MyOwnLongClickItemView; import fi.b; import h.a; import j50.p; import java.util.HashMap; import java.util.List; import kotlin.Metadata; import kotlin.Unit; import kotlin.collections.CollectionsKt___CollectionsKt; import kotlin.jvm.JvmOverloads; import kotlin.jvm.internal.Intrinsics; import kotlin.text.StringsKt__StringsJVMKt; import m21.s; import m21.t; import m21.u; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import u91.e; @Metadata(bv = {}, d1 = {"\u0000\u0018\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\b\n\u0002\b\u0003\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u00012\u00020\u0003:\u0001\u0006J\b\u0010\u0005\u001a\u00020\u0004H\u0016¨\u0006\u0007"}, d2 = {"Lcom/shizhuang/duapp/modules/product_detail/own/views/MyOwnSpuItemView;", "Lcom/shizhuang/duapp/common/component/module/AbsModuleView;", "Lcom/shizhuang/duapp/modules/product_detail/own/model/MyOwnSpuItemModel;", "Lcom/shizhuang/duapp/modules/du_mall_common/utils/exposure/callback/IMallViewExposureObserver;", "", "getLayoutId", "OnOperateCallback", "du_product_detail_release"}, k = 1, mv = {1, 4, 2}) /* compiled from: MyOwnSpuItemView.kt */ public final class MyOwnSpuItemView extends AbsModuleView<MyOwnSpuItemModel> implements IMallViewExposureObserver { public static ChangeQuickRedirect changeQuickRedirect; public float b; /* renamed from: c reason: collision with root package name */ public final OnOperateCallback f22861c; public final boolean d; public final boolean e; public HashMap f; @Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u001e\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0002\b\u0007\bf\u0018\u00002\u00020\u0001J\u0018\u0010\u0002\u001a\u00020\u00032\u0006\u0010\u0004\u001a\u00020\u00052\u0006\u0010\u0006\u001a\u00020\u0007H&J\u0018\u0010\b\u001a\u00020\u00032\u0006\u0010\u0004\u001a\u00020\u00052\u0006\u0010\t\u001a\u00020\u0007H&J\u0018\u0010\n\u001a\u00020\u00032\u0006\u0010\u0004\u001a\u00020\u00052\u0006\u0010\u0006\u001a\u00020\u0007H&J\u0018\u0010\u000b\u001a\u00020\u00032\u0006\u0010\u0004\u001a\u00020\u00052\u0006\u0010\t\u001a\u00020\u0007H&J\u0018\u0010\f\u001a\u00020\u00032\u0006\u0010\u0004\u001a\u00020\u00052\u0006\u0010\t\u001a\u00020\u0007H&J\u0018\u0010\r\u001a\u00020\u00032\u0006\u0010\u0004\u001a\u00020\u00052\u0006\u0010\t\u001a\u00020\u0007H&¨\u0006\u000e"}, d2 = {"Lcom/shizhuang/duapp/modules/product_detail/own/views/MyOwnSpuItemView$OnOperateCallback;", "", "editorClick", "", "model", "Lcom/shizhuang/duapp/modules/product_detail/own/model/MyOwnSpuItemModel;", "curPosition", "", "onCancelLongClick", "position", "onClick", "onConfirmDelete", "onFollowUser", "onLongClick", "du_product_detail_release"}, k = 1, mv = {1, 4, 2}) /* compiled from: MyOwnSpuItemView.kt */ public interface OnOperateCallback { void editorClick(@NotNull MyOwnSpuItemModel myOwnSpuItemModel, int i); void onCancelLongClick(@NotNull MyOwnSpuItemModel myOwnSpuItemModel, int i); void onClick(@NotNull MyOwnSpuItemModel myOwnSpuItemModel, int i); void onConfirmDelete(@NotNull MyOwnSpuItemModel myOwnSpuItemModel, int i); void onFollowUser(@NotNull MyOwnSpuItemModel myOwnSpuItemModel, int i); void onLongClick(@NotNull MyOwnSpuItemModel myOwnSpuItemModel, int i); } @JvmOverloads public MyOwnSpuItemView(@NotNull Context context) { this(context, null, 0, null, false, false, 62); } @JvmOverloads public MyOwnSpuItemView(@NotNull Context context, @Nullable AttributeSet attributeSet) { this(context, attributeSet, 0, null, false, false, 60); } @JvmOverloads public MyOwnSpuItemView(@NotNull Context context, @Nullable AttributeSet attributeSet, int i) { this(context, attributeSet, i, null, false, false, 56); } /* JADX WARNING: Illegal instructions before constructor call */ public MyOwnSpuItemView(Context context, AttributeSet attributeSet, int i, OnOperateCallback onOperateCallback, boolean z, boolean z4, int i3) { super(context, attributeSet, i); attributeSet = (i3 & 2) != 0 ? null : attributeSet; i = (i3 & 4) != 0 ? 0 : i; onOperateCallback = (i3 & 8) != 0 ? null : onOperateCallback; z = (i3 & 16) != 0 ? false : z; z4 = (i3 & 32) != 0 ? false : z4; this.f22861c = onOperateCallback; this.d = z; this.e = z4; this.b = 1.0f; if (!ViewCompat.isLaidOut(this) || isLayoutRequested()) { addOnLayoutChangeListener(new s(this)); } else { a(); } } public View _$_findCachedViewById(int i) { PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 280850, 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; } public final void a() { if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 280842, new Class[0], Void.TYPE).isSupported) { this.b = ((float) getMeasuredWidth()) / ((float) b.b((float) 173)); GradientDrawable gradientDrawable = new GradientDrawable(); gradientDrawable.setCornerRadius(b(b.b((float) 1))); gradientDrawable.setColor(Color.parseColor("#263AD6DF")); Unit unit = Unit.INSTANCE; ((TextView) _$_findCachedViewById(R.id.tvFollow)).setBackground(gradientDrawable); ViewExtensionKt.e((TextView) _$_findCachedViewById(R.id.tvFollow), 0, new MyOwnSpuItemView$adjustUi$2(this), 1); float b2 = b(b.b((float) 2)); GradientDrawable gradientDrawable2 = new GradientDrawable(); gradientDrawable2.setCornerRadius(b2); gradientDrawable2.setColor(Color.parseColor("#60FFFFFF")); ((ConstraintLayout) _$_findCachedViewById(R.id.cardBg)).setBackground(gradientDrawable2); GradientDrawable gradientDrawable3 = new GradientDrawable(); gradientDrawable3.setCornerRadius(b2); gradientDrawable3.setColor(Color.parseColor("#80000000")); ((ConstraintLayout) _$_findCachedViewById(R.id.layoutDelete)).setBackground(gradientDrawable3); float f12 = (float) 9; ((TextView) _$_findCachedViewById(R.id.tvProperty)).setTextSize(0, b(b.b(f12))); ((TextView) _$_findCachedViewById(R.id.tvSkuCount)).setTextSize(0, b(b.b(f12))); TextView textView = (TextView) _$_findCachedViewById(R.id.tvDate); textView.setTextSize(0, b(b.b(f12))); ViewGroup.MarginLayoutParams marginLayoutParams = (ViewGroup.MarginLayoutParams) textView.getLayoutParams(); marginLayoutParams.topMargin = (int) b(b.b((float) 4)); textView.setLayoutParams(marginLayoutParams); } } public final float b(int i) { PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 280837, new Class[]{Integer.TYPE}, Float.TYPE); return proxy.isSupported ? ((Float) proxy.result).floatValue() : ((float) i) * this.b; } public final void c() { MyOwnSpuItemModel myOwnSpuItemModel; List<MyOwnSkuListItemModel> skuInfos; MyOwnSkuListItemModel myOwnSkuListItemModel; MyOwnGiverInfo giverInfo; if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 280844, new Class[0], Void.TYPE).isSupported && (myOwnSpuItemModel = (MyOwnSpuItemModel) getData()) != null && (skuInfos = myOwnSpuItemModel.getSkuInfos()) != null && (myOwnSkuListItemModel = (MyOwnSkuListItemModel) CollectionsKt___CollectionsKt.firstOrNull((List) skuInfos)) != null && (giverInfo = myOwnSkuListItemModel.getGiverInfo()) != null) { Context context = getContext(); if (context instanceof Activity) { e.w1(context, String.valueOf(giverInfo.getUserId())); } } } @Override // com.shizhuang.duapp.common.component.module.AbsModuleView public int getLayoutId() { PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 280838, new Class[0], Integer.TYPE); return proxy.isSupported ? ((Integer) proxy.result).intValue() : R.layout.item_own_spu; } /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */ /* JADX WARNING: Removed duplicated region for block: B:133:0x0242 */ /* JADX WARNING: Removed duplicated region for block: B:137:0x0251 */ /* JADX WARNING: Removed duplicated region for block: B:138:0x0267 */ /* JADX WARNING: Removed duplicated region for block: B:144:0x02c6 */ /* JADX WARNING: Removed duplicated region for block: B:153:0x02d9 */ /* JADX WARNING: Removed duplicated region for block: B:154:0x02db */ /* JADX WARNING: Removed duplicated region for block: B:157:0x030e */ /* JADX WARNING: Removed duplicated region for block: B:158:0x0310 */ /* JADX WARNING: Removed duplicated region for block: B:160:0x0313 */ /* JADX WARNING: Removed duplicated region for block: B:161:0x0315 */ /* JADX WARNING: Removed duplicated region for block: B:164:0x0326 */ /* JADX WARNING: Removed duplicated region for block: B:165:0x0328 */ /* JADX WARNING: Removed duplicated region for block: B:167:0x032b */ /* JADX WARNING: Removed duplicated region for block: B:168:0x032d */ /* JADX WARNING: Removed duplicated region for block: B:171:0x0341 */ /* JADX WARNING: Removed duplicated region for block: B:174:0x034a */ /* JADX WARNING: Removed duplicated region for block: B:190:0x0382 */ /* JADX WARNING: Removed duplicated region for block: B:191:0x0387 */ /* JADX WARNING: Removed duplicated region for block: B:193:0x038a */ /* JADX WARNING: Removed duplicated region for block: B:196:0x039a */ /* JADX WARNING: Removed duplicated region for block: B:197:0x039d */ /* JADX WARNING: Removed duplicated region for block: B:79:0x012a */ /* JADX WARNING: Removed duplicated region for block: B:80:0x012c */ /* JADX WARNING: Removed duplicated region for block: B:83:0x013f */ /* JADX WARNING: Removed duplicated region for block: B:84:0x0141 */ /* JADX WARNING: Removed duplicated region for block: B:87:0x0155 */ /* JADX WARNING: Removed duplicated region for block: B:88:0x0157 */ /* JADX WARNING: Removed duplicated region for block: B:91:0x0162 */ @Override // com.shizhuang.duapp.common.component.module.AbsModuleView public void onChanged(MyOwnSpuItemModel myOwnSpuItemModel) { boolean z; int i; String str; String img; String str2; MyOwnGiverInfo giverInfo; String str3; String str4; String str5; MyOwnSpuItemModel myOwnSpuItemModel2 = myOwnSpuItemModel; int i3 = 1; boolean z4 = false; if (!PatchProxy.proxy(new Object[]{myOwnSpuItemModel2}, this, changeQuickRedirect, false, 280840, new Class[]{MyOwnSpuItemModel.class}, Void.TYPE).isSupported) { super.onChanged(myOwnSpuItemModel2); List<MyOwnSkuListItemModel> skuInfos = myOwnSpuItemModel2.getSkuInfos(); MyOwnSkuListItemModel myOwnSkuListItemModel = skuInfos != null ? (MyOwnSkuListItemModel) CollectionsKt___CollectionsKt.firstOrNull((List) skuInfos) : null; String str6 = ""; if (myOwnSpuItemModel2.isGift()) { TextView textView = (TextView) _$_findCachedViewById(R.id.tvDate); String createTime = myOwnSkuListItemModel != null ? myOwnSkuListItemModel.getCreateTime() : null; if (!(createTime == null || createTime.length() == 0)) { StringBuilder h12 = f.h("赠送时间 "); h12.append(myOwnSkuListItemModel != null ? myOwnSkuListItemModel.getCreateTime() : null); str5 = h12.toString(); } else { str5 = str6; } textView.setText(str5); } else if (myOwnSpuItemModel2.isPlatformBuy()) { TextView textView2 = (TextView) _$_findCachedViewById(R.id.tvDate); String createTime2 = myOwnSkuListItemModel != null ? myOwnSkuListItemModel.getCreateTime() : null; if (!(createTime2 == null || createTime2.length() == 0)) { StringBuilder h13 = f.h("购买时间 "); h13.append(myOwnSkuListItemModel != null ? myOwnSkuListItemModel.getCreateTime() : null); str4 = h13.toString(); } else { str4 = str6; } textView2.setText(str4); } else { TextView textView3 = (TextView) _$_findCachedViewById(R.id.tvDate); String createTime3 = myOwnSkuListItemModel != null ? myOwnSkuListItemModel.getCreateTime() : null; if (!(createTime3 == null || createTime3.length() == 0)) { StringBuilder h14 = f.h("添加时间 "); h14.append(myOwnSkuListItemModel != null ? myOwnSkuListItemModel.getCreateTime() : null); str3 = h14.toString(); } else { str3 = str6; } textView3.setText(str3); } ((TextView) _$_findCachedViewById(R.id.tvOwnTitle)).setText(myOwnSkuListItemModel != null ? myOwnSkuListItemModel.getTitle() : null); TextView textView4 = (TextView) _$_findCachedViewById(R.id.tvOwnTitle); if (!myOwnSpuItemModel2.isGift()) { String title = myOwnSkuListItemModel != null ? myOwnSkuListItemModel.getTitle() : null; if (!(title == null || StringsKt__StringsJVMKt.isBlank(title))) { z = false; textView4.setVisibility(!z ? 4 : 0); ((DuImageLoaderView) _$_findCachedViewById(R.id.ivGiver)).setVisibility(!myOwnSpuItemModel2.isGift() ? 0 : 8); ((TextView) _$_findCachedViewById(R.id.tvGiverTitle)).setVisibility(!myOwnSpuItemModel2.isGift() ? 0 : 8); if (!myOwnSpuItemModel2.isGift()) { a.r((DuImageLoaderView) _$_findCachedViewById(R.id.ivGiver), (myOwnSkuListItemModel == null || (giverInfo = myOwnSkuListItemModel.getGiverInfo()) == null) ? null : giverInfo.getIcon(), true); if (myOwnSkuListItemModel == null || !myOwnSkuListItemModel.isSign()) { i = R.id.tvGiverTitle; ((TextView) _$_findCachedViewById(R.id.tvGiverTitle)).setText("惊喜派送中"); if (myOwnSpuItemModel2.isGift()) { ((ImageView) _$_findCachedViewById(R.id.ivPoizonTag)).setVisibility(0); ((ImageView) _$_findCachedViewById(R.id.ivPoizonTag)).setImageResource(R.drawable.ic_pm_own_list_gift_tag); } else if (myOwnSpuItemModel2.isPlatformBuy()) { ((ImageView) _$_findCachedViewById(R.id.ivPoizonTag)).setVisibility(0); ((ImageView) _$_findCachedViewById(R.id.ivPoizonTag)).setImageResource(R.drawable.ic_pm_own_list_poizon_tag); } else { ((ImageView) _$_findCachedViewById(R.id.ivPoizonTag)).setVisibility(8); } ((c) ((DuImageLoaderView) _$_findCachedViewById(R.id.emotionIcon)).i("https://apk.poizon.com/duApp/Android_Config/resource/mall/app/product_detail/my_own_list_item_tag.png").v(new d(b.b((float) 24), b.b((float) 14)))).x(); ((DuImageLoaderView) _$_findCachedViewById(R.id.emotionIcon)).setVisibility(myOwnSpuItemModel2.getHasEmotion() != 1 && this.d && !this.e && !myOwnSpuItemModel2.isUnSignGift() ? 0 : 8); StringBuilder sb2 = new StringBuilder(); sb2.append(myOwnSpuItemModel2.getCount()); sb2.append((char) 20214); ((TextView) _$_findCachedViewById(R.id.tvSkuCount)).setText(sb2.toString()); ((TextView) _$_findCachedViewById(R.id.tvSkuCount)).setVisibility(myOwnSpuItemModel2.getCount() <= 1 ? 4 : 0); _$_findCachedViewById(R.id.skuGroupDecor).setVisibility(myOwnSpuItemModel2.getCount() > 1 ? 0 : 8); TextView textView5 = (TextView) _$_findCachedViewById(R.id.tvProperty); if (myOwnSpuItemModel2.isUnSignGift()) { str = myOwnSkuListItemModel != null ? myOwnSkuListItemModel.getPropertiesValue() : null; } else { String propertiesValue = myOwnSkuListItemModel != null ? myOwnSkuListItemModel.getPropertiesValue() : null; if (propertiesValue == null || propertiesValue.length() == 0) { z4 = true; } if (!z4) { StringBuilder h15 = f.h("规格 "); h15.append(myOwnSkuListItemModel != null ? myOwnSkuListItemModel.getPropertiesValue() : null); str = h15.toString(); } else { str = str6; } } textView5.setText(str); ProductImageLoaderView productImageLoaderView = (ProductImageLoaderView) _$_findCachedViewById(R.id.ivSku); img = myOwnSkuListItemModel != null ? myOwnSkuListItemModel.getImg() : null; if (img != null) { str6 = img; } fd0.c.s(productImageLoaderView.i(str6), DrawableScale.OneToOne, 300); ((DuImageLoaderView) _$_findCachedViewById(R.id.imgDeleteTips)).i(this.d ? "https://apk.poizon.com/duApp/Android_Config/resource/mall/app/product_detail/my_own_first_guide_new_icon.png" : "https://apk.poizon.com/duApp/Android_Config/resource/mall/app/product_detail/my_own_first_guide_old_icon.png").m0(0.8741259f).x(); ((MyOwnLongClickItemView) _$_findCachedViewById(R.id.itemDeleteView)).a("删除商品", "https://apk.poizon.com/duApp/Android_Config/resource/mall/app/product/my_own_delete_icon.png"); ((MyOwnLongClickItemView) _$_findCachedViewById(R.id.itemEditorView)).a("记录心情", "https://apk.poizon.com/duApp/Android_Config/resource/mall/app/product/my_own_eidit_icon.png"); setOnLongClickListener(new u(this, myOwnSpuItemModel2)); ViewExtensionKt.e((ConstraintLayout) _$_findCachedViewById(R.id.layoutDelete), 0, new MyOwnSpuItemView$onChanged$2(this, myOwnSpuItemModel2), 1); ViewExtensionKt.e((MyOwnLongClickItemView) _$_findCachedViewById(R.id.itemDeleteView), 0, new MyOwnSpuItemView$onChanged$3(this, myOwnSpuItemModel2), 1); com.shizhuang.duapp.common.extension.ViewExtensionKt.j((MyOwnLongClickItemView) _$_findCachedViewById(R.id.itemEditorView), 0, new MyOwnSpuItemView$onChanged$4(this, myOwnSpuItemModel2), 1); ViewExtensionKt.e((TextView) _$_findCachedViewById(i), 0, new MyOwnSpuItemView$onChanged$5(this), 1); ViewExtensionKt.e((DuImageLoaderView) _$_findCachedViewById(R.id.ivGiver), 0, new MyOwnSpuItemView$onChanged$6(this), 1); com.shizhuang.duapp.common.extension.ViewExtensionKt.j(this, 0, new MyOwnSpuItemView$onChanged$7(this, myOwnSpuItemModel2), 1); OneShotPreDrawListener.add(this, new t(this, this)); } TextView textView6 = (TextView) _$_findCachedViewById(R.id.tvGiverTitle); MyOwnGiverInfo giverInfo2 = myOwnSkuListItemModel.getGiverInfo(); String userName = giverInfo2 != null ? giverInfo2.getUserName() : null; String str7 = userName != null ? userName : str6; TextView textView7 = (TextView) _$_findCachedViewById(R.id.tvGiverTitle); PatchProxyResult proxy = PatchProxy.proxy(new Object[]{str7, textView7}, this, changeQuickRedirect, false, 280845, new Class[]{String.class, TextView.class}, String.class); if (proxy.isSupported) { str2 = (String) proxy.result; } else { String g3 = a01.a.g("来自", str7, "的礼物"); int b2 = b.b((float) 92); float measureText = textView7.getPaint().measureText(g3); while (measureText > ((float) b2)) { String l = fd0.c.l(str7, i3, 0); int length = l.length() - i3; int i12 = 0; boolean z5 = false; while (i12 <= length) { boolean z12 = Intrinsics.compare(l.charAt(!z5 ? i12 : length), 32) <= 0; if (!z5) { if (!z12) { z5 = true; } else { i12++; } } else if (!z12) { break; } else { length--; } } str7 = androidx.appcompat.widget.a.f(length, 1, l, i12); g3 = a0.b.f("来自", str7, "...", "的礼物"); measureText = textView7.getPaint().measureText(g3); i3 = 1; } str2 = g3; } textView6.setText(str2); } i = R.id.tvGiverTitle; if (myOwnSpuItemModel2.isGift()) { } ((c) ((DuImageLoaderView) _$_findCachedViewById(R.id.emotionIcon)).i("https://apk.poizon.com/duApp/Android_Config/resource/mall/app/product_detail/my_own_list_item_tag.png").v(new d(b.b((float) 24), b.b((float) 14)))).x(); ((DuImageLoaderView) _$_findCachedViewById(R.id.emotionIcon)).setVisibility(myOwnSpuItemModel2.getHasEmotion() != 1 && this.d && !this.e && !myOwnSpuItemModel2.isUnSignGift() ? 0 : 8); StringBuilder sb22 = new StringBuilder(); sb22.append(myOwnSpuItemModel2.getCount()); sb22.append((char) 20214); ((TextView) _$_findCachedViewById(R.id.tvSkuCount)).setText(sb22.toString()); ((TextView) _$_findCachedViewById(R.id.tvSkuCount)).setVisibility(myOwnSpuItemModel2.getCount() <= 1 ? 4 : 0); _$_findCachedViewById(R.id.skuGroupDecor).setVisibility(myOwnSpuItemModel2.getCount() > 1 ? 0 : 8); TextView textView52 = (TextView) _$_findCachedViewById(R.id.tvProperty); if (myOwnSpuItemModel2.isUnSignGift()) { } textView52.setText(str); ProductImageLoaderView productImageLoaderView2 = (ProductImageLoaderView) _$_findCachedViewById(R.id.ivSku); if (myOwnSkuListItemModel != null) { } if (img != null) { } fd0.c.s(productImageLoaderView2.i(str6), DrawableScale.OneToOne, 300); ((DuImageLoaderView) _$_findCachedViewById(R.id.imgDeleteTips)).i(this.d ? "https://apk.poizon.com/duApp/Android_Config/resource/mall/app/product_detail/my_own_first_guide_new_icon.png" : "https://apk.poizon.com/duApp/Android_Config/resource/mall/app/product_detail/my_own_first_guide_old_icon.png").m0(0.8741259f).x(); ((MyOwnLongClickItemView) _$_findCachedViewById(R.id.itemDeleteView)).a("删除商品", "https://apk.poizon.com/duApp/Android_Config/resource/mall/app/product/my_own_delete_icon.png"); ((MyOwnLongClickItemView) _$_findCachedViewById(R.id.itemEditorView)).a("记录心情", "https://apk.poizon.com/duApp/Android_Config/resource/mall/app/product/my_own_eidit_icon.png"); setOnLongClickListener(new u(this, myOwnSpuItemModel2)); ViewExtensionKt.e((ConstraintLayout) _$_findCachedViewById(R.id.layoutDelete), 0, new MyOwnSpuItemView$onChanged$2(this, myOwnSpuItemModel2), 1); ViewExtensionKt.e((MyOwnLongClickItemView) _$_findCachedViewById(R.id.itemDeleteView), 0, new MyOwnSpuItemView$onChanged$3(this, myOwnSpuItemModel2), 1); com.shizhuang.duapp.common.extension.ViewExtensionKt.j((MyOwnLongClickItemView) _$_findCachedViewById(R.id.itemEditorView), 0, new MyOwnSpuItemView$onChanged$4(this, myOwnSpuItemModel2), 1); ViewExtensionKt.e((TextView) _$_findCachedViewById(i), 0, new MyOwnSpuItemView$onChanged$5(this), 1); ViewExtensionKt.e((DuImageLoaderView) _$_findCachedViewById(R.id.ivGiver), 0, new MyOwnSpuItemView$onChanged$6(this), 1); com.shizhuang.duapp.common.extension.ViewExtensionKt.j(this, 0, new MyOwnSpuItemView$onChanged$7(this, myOwnSpuItemModel2), 1); OneShotPreDrawListener.add(this, new t(this, this)); } } z = true; textView4.setVisibility(!z ? 4 : 0); ((DuImageLoaderView) _$_findCachedViewById(R.id.ivGiver)).setVisibility(!myOwnSpuItemModel2.isGift() ? 0 : 8); ((TextView) _$_findCachedViewById(R.id.tvGiverTitle)).setVisibility(!myOwnSpuItemModel2.isGift() ? 0 : 8); if (!myOwnSpuItemModel2.isGift()) { } i = R.id.tvGiverTitle; if (myOwnSpuItemModel2.isGift()) { } ((c) ((DuImageLoaderView) _$_findCachedViewById(R.id.emotionIcon)).i("https://apk.poizon.com/duApp/Android_Config/resource/mall/app/product_detail/my_own_list_item_tag.png").v(new d(b.b((float) 24), b.b((float) 14)))).x(); ((DuImageLoaderView) _$_findCachedViewById(R.id.emotionIcon)).setVisibility(myOwnSpuItemModel2.getHasEmotion() != 1 && this.d && !this.e && !myOwnSpuItemModel2.isUnSignGift() ? 0 : 8); StringBuilder sb222 = new StringBuilder(); sb222.append(myOwnSpuItemModel2.getCount()); sb222.append((char) 20214); ((TextView) _$_findCachedViewById(R.id.tvSkuCount)).setText(sb222.toString()); ((TextView) _$_findCachedViewById(R.id.tvSkuCount)).setVisibility(myOwnSpuItemModel2.getCount() <= 1 ? 4 : 0); _$_findCachedViewById(R.id.skuGroupDecor).setVisibility(myOwnSpuItemModel2.getCount() > 1 ? 0 : 8); TextView textView522 = (TextView) _$_findCachedViewById(R.id.tvProperty); if (myOwnSpuItemModel2.isUnSignGift()) { } textView522.setText(str); ProductImageLoaderView productImageLoaderView22 = (ProductImageLoaderView) _$_findCachedViewById(R.id.ivSku); if (myOwnSkuListItemModel != null) { } if (img != null) { } fd0.c.s(productImageLoaderView22.i(str6), DrawableScale.OneToOne, 300); ((DuImageLoaderView) _$_findCachedViewById(R.id.imgDeleteTips)).i(this.d ? "https://apk.poizon.com/duApp/Android_Config/resource/mall/app/product_detail/my_own_first_guide_new_icon.png" : "https://apk.poizon.com/duApp/Android_Config/resource/mall/app/product_detail/my_own_first_guide_old_icon.png").m0(0.8741259f).x(); ((MyOwnLongClickItemView) _$_findCachedViewById(R.id.itemDeleteView)).a("删除商品", "https://apk.poizon.com/duApp/Android_Config/resource/mall/app/product/my_own_delete_icon.png"); ((MyOwnLongClickItemView) _$_findCachedViewById(R.id.itemEditorView)).a("记录心情", "https://apk.poizon.com/duApp/Android_Config/resource/mall/app/product/my_own_eidit_icon.png"); setOnLongClickListener(new u(this, myOwnSpuItemModel2)); ViewExtensionKt.e((ConstraintLayout) _$_findCachedViewById(R.id.layoutDelete), 0, new MyOwnSpuItemView$onChanged$2(this, myOwnSpuItemModel2), 1); ViewExtensionKt.e((MyOwnLongClickItemView) _$_findCachedViewById(R.id.itemDeleteView), 0, new MyOwnSpuItemView$onChanged$3(this, myOwnSpuItemModel2), 1); com.shizhuang.duapp.common.extension.ViewExtensionKt.j((MyOwnLongClickItemView) _$_findCachedViewById(R.id.itemEditorView), 0, new MyOwnSpuItemView$onChanged$4(this, myOwnSpuItemModel2), 1); ViewExtensionKt.e((TextView) _$_findCachedViewById(i), 0, new MyOwnSpuItemView$onChanged$5(this), 1); ViewExtensionKt.e((DuImageLoaderView) _$_findCachedViewById(R.id.ivGiver), 0, new MyOwnSpuItemView$onChanged$6(this), 1); com.shizhuang.duapp.common.extension.ViewExtensionKt.j(this, 0, new MyOwnSpuItemView$onChanged$7(this, myOwnSpuItemModel2), 1); OneShotPreDrawListener.add(this, new t(this, this)); } } /* JADX WARN: Multi-variable type inference failed */ /* JADX WARN: Type inference failed for: r9v36, types: [java.lang.Integer] */ @Override // com.shizhuang.duapp.modules.du_mall_common.utils.exposure.callback.IMallViewExposureObserver public void onExposure() { List<MyOwnSkuListItemModel> skuInfos; MyOwnSkuListItemModel myOwnSkuListItemModel; List<MyOwnSkuListItemModel> skuInfos2; MyOwnSkuListItemModel myOwnSkuListItemModel2; List<MyOwnSkuListItemModel> skuInfos3; MyOwnSkuListItemModel myOwnSkuListItemModel3; List<MyOwnSkuListItemModel> skuInfos4; MyOwnSkuListItemModel myOwnSkuListItemModel4; List<MyOwnSkuListItemModel> skuInfos5; MyOwnSkuListItemModel myOwnSkuListItemModel5; if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 280847, new Class[0], Void.TYPE).isSupported) { u21.a aVar = u21.a.f38776a; MyOwnSpuItemModel myOwnSpuItemModel = (MyOwnSpuItemModel) getData(); String str = null; String rowKey = (myOwnSpuItemModel == null || (skuInfos5 = myOwnSpuItemModel.getSkuInfos()) == null || (myOwnSkuListItemModel5 = (MyOwnSkuListItemModel) CollectionsKt___CollectionsKt.firstOrNull(skuInfos5)) == null) ? null : myOwnSkuListItemModel5.getRowKey(); String str2 = ""; if (rowKey == null) { rowKey = str2; } MyOwnSpuItemModel myOwnSpuItemModel2 = (MyOwnSpuItemModel) getData(); String createTime = (myOwnSpuItemModel2 == null || (skuInfos4 = myOwnSpuItemModel2.getSkuInfos()) == null || (myOwnSkuListItemModel4 = (MyOwnSkuListItemModel) CollectionsKt___CollectionsKt.firstOrNull(skuInfos4)) == null) ? null : myOwnSkuListItemModel4.getCreateTime(); if (createTime == null) { createTime = str2; } MyOwnSpuItemModel myOwnSpuItemModel3 = (MyOwnSpuItemModel) getData(); String c5 = p.c((myOwnSpuItemModel3 == null || (skuInfos3 = myOwnSpuItemModel3.getSkuInfos()) == null || (myOwnSkuListItemModel3 = (MyOwnSkuListItemModel) CollectionsKt___CollectionsKt.firstOrNull(skuInfos3)) == null) ? null : Long.valueOf(myOwnSkuListItemModel3.getSkuId())); MyOwnSpuItemModel myOwnSpuItemModel4 = (MyOwnSpuItemModel) getData(); String c12 = p.c(myOwnSpuItemModel4 != null ? Long.valueOf(myOwnSpuItemModel4.getSpuId()) : null); MyOwnSpuItemModel myOwnSpuItemModel5 = (MyOwnSpuItemModel) getData(); String buttonTitle = myOwnSpuItemModel5 != null ? myOwnSpuItemModel5.getButtonTitle() : null; if (buttonTitle == null) { buttonTitle = str2; } String str3 = ((TextView) _$_findCachedViewById(R.id.tvFollow)).getVisibility() == 0 ? 1 : str2; MyOwnSpuItemModel myOwnSpuItemModel6 = (MyOwnSpuItemModel) getData(); String tagTitle = myOwnSpuItemModel6 != null ? myOwnSpuItemModel6.getTagTitle() : null; String str4 = tagTitle != null ? tagTitle : str2; MyOwnSpuItemModel myOwnSpuItemModel7 = (MyOwnSpuItemModel) getData(); Integer valueOf = Integer.valueOf((myOwnSpuItemModel7 == null || myOwnSpuItemModel7.getHasEmotion() != 1 || !this.d) ? 0 : 1); MyOwnSpuItemModel myOwnSpuItemModel8 = (MyOwnSpuItemModel) getData(); String c13 = p.c((myOwnSpuItemModel8 == null || (skuInfos2 = myOwnSpuItemModel8.getSkuInfos()) == null || (myOwnSkuListItemModel2 = (MyOwnSkuListItemModel) CollectionsKt___CollectionsKt.firstOrNull(skuInfos2)) == null) ? null : Integer.valueOf(myOwnSkuListItemModel2.getTitleType())); MyOwnSpuItemModel myOwnSpuItemModel9 = (MyOwnSpuItemModel) getData(); if (!(myOwnSpuItemModel9 == null || (skuInfos = myOwnSpuItemModel9.getSkuInfos()) == null || (myOwnSkuListItemModel = (MyOwnSkuListItemModel) CollectionsKt___CollectionsKt.firstOrNull((List) skuInfos)) == null)) { str = myOwnSkuListItemModel.getTitle(); } if (str != null) { str2 = str; } if (!PatchProxy.proxy(new Object[]{rowKey, createTime, c5, c12, buttonTitle, str3, str4, valueOf, c13, str2}, aVar, u21.a.changeQuickRedirect, false, 282638, new Class[]{Object.class, Object.class, Object.class, Object.class, Object.class, Object.class, Object.class, Object.class, Object.class, Object.class}, Void.TYPE).isSupported) { i60.b bVar = i60.b.f33293a; ArrayMap e6 = g.a.e(8, "block_content_id", rowKey, "block_content_title", createTime); e6.put("sku_id", c5); e6.put("spu_id", c12); e6.put("button_title", buttonTitle); e6.put("status", str3); e6.put("tag_title", str4); e6.put("is_labeled", valueOf); e6.put("honor_type", c13); e6.put("honor_title", str2); bVar.b("trade_common_exposure", "1016", "35", e6); } } } /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */ @Override // com.shizhuang.duapp.common.component.module.IModuleView, com.shizhuang.duapp.common.component.module.AbsModuleView public void update(MyOwnSpuItemModel myOwnSpuItemModel) { List<MyOwnSkuListItemModel> skuInfos; MyOwnSkuListItemModel myOwnSkuListItemModel; MyOwnSpuItemModel myOwnSpuItemModel2 = myOwnSpuItemModel; boolean z = true; int i = 0; if (!PatchProxy.proxy(new Object[]{myOwnSpuItemModel2}, this, changeQuickRedirect, false, 280839, new Class[]{MyOwnSpuItemModel.class}, Void.TYPE).isSupported) { super.update(myOwnSpuItemModel2); ((ConstraintLayout) _$_findCachedViewById(R.id.layoutDelete)).setVisibility(myOwnSpuItemModel2.isLongSelected() || myOwnSpuItemModel2.isShowDeleteTips() ? 0 : 8); ((MyOwnLongClickItemView) _$_findCachedViewById(R.id.itemDeleteView)).setVisibility(myOwnSpuItemModel2.isLongSelected() && !myOwnSpuItemModel2.isShowDeleteTips() ? 0 : 8); ((MyOwnLongClickItemView) _$_findCachedViewById(R.id.itemEditorView)).setVisibility((!myOwnSpuItemModel2.isGift() || !myOwnSpuItemModel2.isUnSignGift()) && myOwnSpuItemModel2.isLongSelected() && !myOwnSpuItemModel2.isShowDeleteTips() && this.d ? 0 : 8); ((LinearLayout) _$_findCachedViewById(R.id.layDeleTips)).setVisibility(!myOwnSpuItemModel2.isLongSelected() && myOwnSpuItemModel2.isShowDeleteTips() ? 0 : 8); TextView textView = (TextView) _$_findCachedViewById(R.id.tvFollow); if (this.e || !myOwnSpuItemModel2.isGift() || (skuInfos = myOwnSpuItemModel2.getSkuInfos()) == null || (myOwnSkuListItemModel = (MyOwnSkuListItemModel) CollectionsKt___CollectionsKt.firstOrNull((List) skuInfos)) == null || myOwnSkuListItemModel.isFollow()) { z = false; } if (!z) { i = 8; } textView.setVisibility(i); } } }