得物.apk(点击下载) / MyOwnSkuCardItemView.java
package com.shizhuang.duapp.modules.product_detail.own.views;
import a.f;
import android.content.Context;
import android.graphics.drawable.GradientDrawable;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.constraintlayout.widget.Group;
import androidx.lifecycle.ViewModelLazy;
import cd.g;
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.component.module.ModuleAdapterDelegateKt;
import com.shizhuang.duapp.common.extension.DrawableScale;
import com.shizhuang.duapp.common.extension.ViewExtensionKt;
import com.shizhuang.duapp.common.ui.view.ProductImageLoaderView;
import com.shizhuang.duapp.common.widget.font.FontText;
import com.shizhuang.duapp.common.widget.shapeview.ShapeTextView;
import com.shizhuang.duapp.libs.duimageloaderview.DuImageLoaderView;
import com.shizhuang.duapp.libs.duimageloaderview.options.DuScaleType;
import com.shizhuang.duapp.modules.du_mall_common.utils.exposure.callback.IMallViewExposureObserver;
import com.shizhuang.duapp.modules.product_detail.own.model.FriendGreetingCarInfo;
import com.shizhuang.duapp.modules.product_detail.own.model.MyOwnGiverInfo;
import com.shizhuang.duapp.modules.product_detail.own.model.MyOwnOrderModel;
import com.shizhuang.duapp.modules.product_detail.own.model.MyOwnSkuCardItemModel;
import com.shizhuang.duapp.modules.product_detail.own.model.MyOwnSkuListItemModel;
import com.shizhuang.duapp.modules.product_detail.own.p005interface.MyOwnSkuCardItemOperateCallBack;
import com.shizhuang.duapp.modules.product_detail.own.ui.MyOwnActivity;
import com.shizhuang.duapp.modules.product_detail.own.vm.MyOwnViewModel;
import fd0.c;
import fi.b;
import g00.a;
import j60.l0;
import j60.z;
import java.util.HashMap;
import kotlin.Lazy;
import kotlin.LazyKt__LazyJVMKt;
import kotlin.Metadata;
import kotlin.Pair;
import kotlin.Unit;
import kotlin.collections.ArraysKt___ArraysKt;
import kotlin.jvm.JvmOverloads;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Reflection;
import m21.p;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@Metadata(bv = {}, d1 = {"\u0000>\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0010\u0011\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0006\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u00012\u00020\u0003J\b\u0010\u0005\u001a\u00020\u0004H\u0002J\b\u0010\u0007\u001a\u00020\u0006H\u0002J\b\u0010\b\u001a\u00020\u0006H\u0016R=\u0010\u0011\u001a$\u0012 \u0012\u001e\u0012\f\u0012\n \f*\u0004\u0018\u00010\u000b0\u000b\u0012\f\u0012\n \f*\u0004\u0018\u00010\u000b0\u000b0\n0\t8BX\u0002¢\u0006\f\n\u0004\b\r\u0010\u000e\u001a\u0004\b\u000f\u0010\u0010R\u001b\u0010\u0016\u001a\u00020\u00128BX\u0002¢\u0006\f\n\u0004\b\u0013\u0010\u000e\u001a\u0004\b\u0014\u0010\u0015R\u0019\u0010\u001c\u001a\u0004\u0018\u00010\u00178\u0006¢\u0006\f\n\u0004\b\u0018\u0010\u0019\u001a\u0004\b\u001a\u0010\u001b¨\u0006\u001d"}, d2 = {"Lcom/shizhuang/duapp/modules/product_detail/own/views/MyOwnSkuCardItemView;", "Lcom/shizhuang/duapp/common/component/module/AbsModuleView;", "Lcom/shizhuang/duapp/modules/product_detail/own/model/MyOwnSkuCardItemModel;", "Lcom/shizhuang/duapp/modules/du_mall_common/utils/exposure/callback/IMallViewExposureObserver;", "", "getContentTitle", "", "getContentType", "getLayoutId", "", "Lkotlin/Pair;", "Landroid/widget/TextView;", "kotlin.jvm.PlatformType", "c", "Lkotlin/Lazy;", "getDescViews", "()[Lkotlin/Pair;", "descViews", "Lcom/shizhuang/duapp/modules/product_detail/own/vm/MyOwnViewModel;", "d", "getViewModel", "()Lcom/shizhuang/duapp/modules/product_detail/own/vm/MyOwnViewModel;", "viewModel", "Lcom/shizhuang/duapp/modules/product_detail/own/interface/MyOwnSkuCardItemOperateCallBack;", "e", "Lcom/shizhuang/duapp/modules/product_detail/own/interface/MyOwnSkuCardItemOperateCallBack;", "getOnOperateCallback", "()Lcom/shizhuang/duapp/modules/product_detail/own/interface/MyOwnSkuCardItemOperateCallBack;", "onOperateCallback", "du_product_detail_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: MyOwnSkuCardItemView.kt */
public final class MyOwnSkuCardItemView extends AbsModuleView<MyOwnSkuCardItemModel> implements IMallViewExposureObserver {
public static ChangeQuickRedirect changeQuickRedirect;
public final String b;
/* renamed from: c reason: collision with root package name */
public final Lazy f22857c;
public final Lazy d;
@Nullable
public final MyOwnSkuCardItemOperateCallBack e;
public HashMap f;
@JvmOverloads
public MyOwnSkuCardItemView(@NotNull Context context) {
this(context, null, 0, null, 14);
}
@JvmOverloads
public MyOwnSkuCardItemView(@NotNull Context context, @Nullable AttributeSet attributeSet) {
this(context, attributeSet, 0, null, 12);
}
@JvmOverloads
public MyOwnSkuCardItemView(@NotNull Context context, @Nullable AttributeSet attributeSet, int i) {
this(context, attributeSet, i, null, 8);
}
/* JADX WARNING: Illegal instructions before constructor call */
public MyOwnSkuCardItemView(Context context, AttributeSet attributeSet, int i, MyOwnSkuCardItemOperateCallBack myOwnSkuCardItemOperateCallBack, int i3) {
super(context, attributeSet, i);
attributeSet = (i3 & 2) != 0 ? null : attributeSet;
i = (i3 & 4) != 0 ? 0 : i;
myOwnSkuCardItemOperateCallBack = (i3 & 8) != 0 ? null : myOwnSkuCardItemOperateCallBack;
this.e = myOwnSkuCardItemOperateCallBack;
this.b = "https://apk.poizon.com/duApp/Android_Config/resource/mall/app/product_detail/ic_own_card_del_tip.png";
this.f22857c = LazyKt__LazyJVMKt.lazy(new MyOwnSkuCardItemView$descViews$2(this));
AppCompatActivity g3 = ViewExtensionKt.g(this);
this.d = new ViewModelLazy(Reflection.getOrCreateKotlinClass(MyOwnViewModel.class), new MyOwnSkuCardItemView$$special$$inlined$activityViewModels$2(g3), new MyOwnSkuCardItemView$$special$$inlined$activityViewModels$1(g3));
setLayoutParams(new ViewGroup.LayoutParams((int) (((float) b.f32351a) * 0.8666667f), -2));
setOnLongClickListener(new p(this));
com.shizhuang.duapp.modules.du_mall_common.extension.ViewExtensionKt.e((ConstraintLayout) _$_findCachedViewById(R.id.delLayout), 0, new Function1<View, Unit>() {
/* class com.shizhuang.duapp.modules.product_detail.own.views.MyOwnSkuCardItemView.AnonymousClass2 */
public static ChangeQuickRedirect changeQuickRedirect;
/* 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(View view) {
invoke(view);
return Unit.INSTANCE;
}
public final void invoke(@NotNull View view) {
MyOwnSkuCardItemModel myOwnSkuCardItemModel;
MyOwnSkuCardItemOperateCallBack onOperateCallback;
if (!PatchProxy.proxy(new Object[]{view}, this, changeQuickRedirect, false, 280802, new Class[]{View.class}, Void.TYPE).isSupported && (myOwnSkuCardItemModel = (MyOwnSkuCardItemModel) MyOwnSkuCardItemView.this.getData()) != null && (onOperateCallback = MyOwnSkuCardItemView.this.getOnOperateCallback()) != null) {
onOperateCallback.onCancelLongClick(myOwnSkuCardItemModel, ModuleAdapterDelegateKt.b(MyOwnSkuCardItemView.this));
}
}
}, 1);
com.shizhuang.duapp.modules.du_mall_common.extension.ViewExtensionKt.e(_$_findCachedViewById(R.id.ivDelete), 0, new Function1<View, Unit>() {
/* class com.shizhuang.duapp.modules.product_detail.own.views.MyOwnSkuCardItemView.AnonymousClass3 */
public static ChangeQuickRedirect changeQuickRedirect;
/* 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(View view) {
invoke(view);
return Unit.INSTANCE;
}
public final void invoke(@NotNull View view) {
MyOwnSkuCardItemModel myOwnSkuCardItemModel;
MyOwnSkuCardItemOperateCallBack onOperateCallback;
if (!PatchProxy.proxy(new Object[]{view}, this, changeQuickRedirect, false, 280803, new Class[]{View.class}, Void.TYPE).isSupported && (myOwnSkuCardItemModel = (MyOwnSkuCardItemModel) MyOwnSkuCardItemView.this.getData()) != null && (onOperateCallback = MyOwnSkuCardItemView.this.getOnOperateCallback()) != null) {
onOperateCallback.onConfirmDelete(myOwnSkuCardItemModel, ModuleAdapterDelegateKt.b(MyOwnSkuCardItemView.this));
}
}
}, 1);
GradientDrawable gradientDrawable = new GradientDrawable();
float f12 = (float) 2;
a.l(gradientDrawable, (float) b.b(f12), "#80000000");
Unit unit = Unit.INSTANCE;
((ConstraintLayout) _$_findCachedViewById(R.id.delLayout)).setBackground(gradientDrawable);
z.b.a(_$_findCachedViewById(R.id.ivDelete), b.b(f12), null);
}
private final String getContentTitle() {
MyOwnSkuListItemModel sku;
boolean z = false;
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 280794, new Class[0], String.class);
if (proxy.isSupported) {
return (String) proxy.result;
}
FontText fontText = (FontText) _$_findCachedViewById(R.id.tvHornoraryTitle);
if (fontText == null) {
return "";
}
if (fontText.getVisibility() == 0) {
z = true;
}
if (!z) {
return "";
}
MyOwnSkuCardItemModel myOwnSkuCardItemModel = (MyOwnSkuCardItemModel) getData();
String title = (myOwnSkuCardItemModel == null || (sku = myOwnSkuCardItemModel.getSku()) == null) ? null : sku.getTitle();
if (title != null) {
return title;
}
return "";
}
private final int getContentType() {
MyOwnSkuCardItemModel myOwnSkuCardItemModel;
MyOwnSkuListItemModel sku;
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 280795, new Class[0], Integer.TYPE);
if (proxy.isSupported) {
return ((Integer) proxy.result).intValue();
}
FontText fontText = (FontText) _$_findCachedViewById(R.id.tvHornoraryTitle);
if (fontText == null) {
return 0;
}
if (!(fontText.getVisibility() == 0) || (myOwnSkuCardItemModel = (MyOwnSkuCardItemModel) getData()) == null || (sku = myOwnSkuCardItemModel.getSku()) == null) {
return 0;
}
return sku.getTitleType();
}
private final Pair<TextView, TextView>[] getDescViews() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 280785, new Class[0], Pair[].class);
return (Pair[]) (proxy.isSupported ? proxy.result : this.f22857c.getValue());
}
public View _$_findCachedViewById(int i) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 280797, 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(MyOwnSkuCardItemModel myOwnSkuCardItemModel) {
String str;
if (!PatchProxy.proxy(new Object[]{myOwnSkuCardItemModel}, this, changeQuickRedirect, false, 280791, new Class[]{MyOwnSkuCardItemModel.class}, Void.TYPE).isSupported) {
u21.a aVar = u21.a.f38776a;
MyOwnSkuListItemModel sku = myOwnSkuCardItemModel.getSku();
FriendGreetingCarInfo friendGreetingCarInfo = null;
String c5 = j50.p.c(sku != null ? sku.getRowKey() : null);
String contentTitle = getContentTitle();
MyOwnSkuListItemModel sku2 = myOwnSkuCardItemModel.getSku();
Long valueOf = Long.valueOf(sku2 != null ? sku2.getSkuId() : 0);
Long valueOf2 = Long.valueOf(myOwnSkuCardItemModel.getSpuId());
MyOwnSkuListItemModel sku3 = myOwnSkuCardItemModel.getSku();
if (sku3 != null) {
friendGreetingCarInfo = sku3.getIntentionInfo();
}
String str2 = friendGreetingCarInfo != null ? "贺卡" : "";
MyOwnSkuListItemModel sku4 = myOwnSkuCardItemModel.getSku();
if (sku4 == null || !sku4.isGift()) {
str = "";
} else {
str = ((FontText) _$_findCachedViewById(R.id.tvHornoraryTitle)).getText().toString();
}
aVar.f(c5, contentTitle, valueOf, valueOf2, str2, str, 0, Integer.valueOf(getContentType()));
}
}
@Override // com.shizhuang.duapp.common.component.module.AbsModuleView
public int getLayoutId() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 280787, new Class[0], Integer.TYPE);
return proxy.isSupported ? ((Integer) proxy.result).intValue() : R.layout.item_own_sku_card;
}
@Nullable
public final MyOwnSkuCardItemOperateCallBack getOnOperateCallback() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 280796, new Class[0], MyOwnSkuCardItemOperateCallBack.class);
return proxy.isSupported ? (MyOwnSkuCardItemOperateCallBack) proxy.result : this.e;
}
public final MyOwnViewModel getViewModel() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 280786, new Class[0], MyOwnViewModel.class);
return (MyOwnViewModel) (proxy.isSupported ? proxy.result : this.d.getValue());
}
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // com.shizhuang.duapp.common.component.module.AbsModuleView
public void onChanged(MyOwnSkuCardItemModel myOwnSkuCardItemModel) {
int i;
Pair[] pairArr;
String str;
MyOwnSkuCardItemModel myOwnSkuCardItemModel2 = myOwnSkuCardItemModel;
if (!PatchProxy.proxy(new Object[]{myOwnSkuCardItemModel2}, this, changeQuickRedirect, false, 280789, new Class[]{MyOwnSkuCardItemModel.class}, Void.TYPE).isSupported) {
super.onChanged(myOwnSkuCardItemModel2);
((DuImageLoaderView) _$_findCachedViewById(R.id.ivTips)).i(this.b).x();
((FontText) _$_findCachedViewById(R.id.tvProductTitle)).setText(myOwnSkuCardItemModel2.getName());
MyOwnSkuListItemModel sku = myOwnSkuCardItemModel2.getSku();
MyOwnSkuListItemModel myOwnSkuListItemModel = sku != null ? sku : new MyOwnSkuListItemModel(null, null, null, null, null, null, 0, 0, null, 0, null, null, null, 8191, null);
TextView textView = (TextView) _$_findCachedViewById(R.id.tvSkuDesc);
StringBuilder h12 = f.h("规格 ");
String propertiesValue = myOwnSkuListItemModel.getPropertiesValue();
String str2 = "";
if (propertiesValue == null) {
propertiesValue = str2;
}
h12.append(propertiesValue);
textView.setText(h12.toString());
MyOwnSkuListItemModel sku2 = myOwnSkuCardItemModel2.getSku();
if (sku2 == null || sku2.getIntentionInfo() == null) {
((ImageView) _$_findCachedViewById(R.id.ivGreetingCard)).setVisibility(8);
} else {
((ImageView) _$_findCachedViewById(R.id.ivGreetingCard)).setVisibility(0);
l0.a((ImageView) _$_findCachedViewById(R.id.ivGreetingCard), b.b((float) 20));
ViewExtensionKt.j((ImageView) _$_findCachedViewById(R.id.ivGreetingCard), 0, new MyOwnSkuCardItemView$onChanged$$inlined$let$lambda$1(this, myOwnSkuCardItemModel2), 1);
}
if (((ImageView) _$_findCachedViewById(R.id.ivGreetingCard)).getVisibility() == 0) {
((FontText) _$_findCachedViewById(R.id.tvHornoraryTitle)).setMaxWidth(b.b(106.0f));
} else {
((FontText) _$_findCachedViewById(R.id.tvHornoraryTitle)).setMaxWidth(b.b((float) 180));
}
if (myOwnSkuListItemModel.isGift()) {
((FontText) _$_findCachedViewById(R.id.tvHornoraryTitle)).setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);
FontText fontText = (FontText) _$_findCachedViewById(R.id.tvHornoraryTitle);
MyOwnGiverInfo giverInfo = myOwnSkuListItemModel.getGiverInfo();
String userName = giverInfo != null ? giverInfo.getUserName() : null;
String str3 = userName != null ? userName : str2;
FontText fontText2 = (FontText) _$_findCachedViewById(R.id.tvHornoraryTitle);
int maxWidth = ((FontText) _$_findCachedViewById(R.id.tvHornoraryTitle)).getMaxWidth();
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{str3, fontText2, new Integer(maxWidth)}, this, changeQuickRedirect, false, 280793, new Class[]{String.class, TextView.class, Integer.TYPE}, String.class);
if (proxy.isSupported) {
str = (String) proxy.result;
} else {
String g3 = a01.a.g("来自", str3, "的礼物");
float measureText = fontText2.getPaint().measureText(g3);
String str4 = str3;
while (measureText > ((float) maxWidth)) {
String l = c.l(str4, 1, 0);
int length = l.length() - 1;
int i3 = 0;
boolean z = false;
while (i3 <= length) {
boolean z4 = Intrinsics.compare(l.charAt(!z ? i3 : length), 32) <= 0;
if (!z) {
if (!z4) {
z = true;
} else {
i3++;
}
} else if (!z4) {
break;
} else {
length--;
}
}
str4 = androidx.appcompat.widget.a.f(length, 1, l, i3);
g3 = a0.b.f("来自", str4, "...", "的礼物");
measureText = fontText2.getPaint().measureText(g3);
}
str = g3;
}
fontText.setText(str);
i = R.id.tvHornoraryTitle;
((FontText) _$_findCachedViewById(R.id.tvHornoraryTitle)).setVisibility(0);
} else {
i = R.id.tvHornoraryTitle;
((FontText) _$_findCachedViewById(R.id.tvHornoraryTitle)).setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_own_card_wheat_left, 0, R.drawable.ic_own_card_wheat_right, 0);
((FontText) _$_findCachedViewById(R.id.tvHornoraryTitle)).setText(myOwnSkuListItemModel.getTitle());
FontText fontText3 = (FontText) _$_findCachedViewById(R.id.tvHornoraryTitle);
String title = myOwnSkuListItemModel.getTitle();
fontText3.setVisibility((title == null || title.length() == 0) ^ true ? 0 : 8);
}
((ImageView) _$_findCachedViewById(R.id.goodTagView)).setVisibility((((FontText) _$_findCachedViewById(i)).getVisibility() == 0) ^ true ? 0 : 8);
boolean isPlatformBuy = myOwnSkuListItemModel.isPlatformBuy();
((co.c) ((DuImageLoaderView) _$_findCachedViewById(R.id.bgCard)).i(isPlatformBuy ? "https://apk.poizon.com/duApp/Android_Config/resource/mall/app/product_detail/bg_own_detail_card_poizion_v4.png" : "https://apk.poizon.com/duApp/Android_Config/resource/mall/app/product_detail/bg_own_detail_card_v4.png").d()).x();
((DuImageLoaderView) _$_findCachedViewById(R.id.ivPoizonTag)).setVisibility(isPlatformBuy ? 0 : 8);
if (isPlatformBuy) {
((co.c) ((DuImageLoaderView) _$_findCachedViewById(R.id.ivPoizonTag)).i("https://apk.poizon.com/duApp/Android_Config/resource/mall/app/product_detail/icon_detail_card_poizon_tag_new.png").v(MyOwnActivity.f22821q.a())).p0(DuScaleType.FIT_XY).x();
}
if (isPlatformBuy) {
pairArr = new Pair[3];
StringBuilder sb2 = new StringBuilder();
MyOwnOrderModel orderInfo = myOwnSkuListItemModel.getOrderInfo();
sb2.append(orderInfo != null ? orderInfo.getBuyerName() : null);
sb2.append(" ");
MyOwnOrderModel orderInfo2 = myOwnSkuListItemModel.getOrderInfo();
sb2.append(orderInfo2 != null ? orderInfo2.getBuyerPhone() : null);
pairArr[0] = new Pair("收货人", sb2.toString());
MyOwnOrderModel orderInfo3 = myOwnSkuListItemModel.getOrderInfo();
pairArr[1] = new Pair("购入金额", orderInfo3 != null ? orderInfo3.getOrderMoney() : null);
pairArr[2] = new Pair("下单时间", myOwnSkuListItemModel.getCreateTime());
} else {
pairArr = new Pair[]{new Pair("添加时间", myOwnSkuListItemModel.getCreateTime())};
}
Pair<TextView, TextView>[] descViews = getDescViews();
int length2 = descViews.length;
int i12 = 0;
int i13 = 0;
while (i12 < length2) {
Pair<TextView, TextView> pair = descViews[i12];
int i14 = i13 + 1;
TextView component1 = pair.component1();
TextView component2 = pair.component2();
Pair pair2 = (Pair) ArraysKt___ArraysKt.getOrNull(pairArr, i13);
component1.setText(pair2 != null ? (String) pair2.getFirst() : null);
CharSequence text = component1.getText();
component1.setVisibility((text == null || text.length() == 0) ^ true ? 0 : 8);
component2.setText(pair2 != null ? (String) pair2.getSecond() : null);
CharSequence text2 = component2.getText();
component2.setVisibility((text2 == null || text2.length() == 0) ^ true ? 0 : 8);
i12++;
i13 = i14;
}
ProductImageLoaderView productImageLoaderView = (ProductImageLoaderView) _$_findCachedViewById(R.id.ivProduct);
String img = myOwnSkuListItemModel.getImg();
if (img != null) {
str2 = img;
}
g.a(productImageLoaderView.i(str2), DrawableScale.OneToOne).d0(300).x();
ViewExtensionKt.j((ShapeTextView) _$_findCachedViewById(R.id.tvEnterProductDetail), 0, new MyOwnSkuCardItemView$onChanged$4(this, myOwnSkuCardItemModel2, myOwnSkuListItemModel), 1);
}
}
@Override // com.shizhuang.duapp.modules.du_mall_common.utils.exposure.callback.IMallViewExposureObserver
public void onExposure() {
MyOwnSkuCardItemModel myOwnSkuCardItemModel;
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 280792, new Class[0], Void.TYPE).isSupported && (myOwnSkuCardItemModel = (MyOwnSkuCardItemModel) getData()) != null) {
u21.a aVar = u21.a.f38776a;
MyOwnSkuListItemModel sku = myOwnSkuCardItemModel.getSku();
FriendGreetingCarInfo friendGreetingCarInfo = null;
String c5 = j50.p.c(sku != null ? sku.getRowKey() : null);
String contentTitle = getContentTitle();
MyOwnSkuListItemModel sku2 = myOwnSkuCardItemModel.getSku();
Long valueOf = Long.valueOf(sku2 != null ? sku2.getSkuId() : 0);
Long valueOf2 = Long.valueOf(myOwnSkuCardItemModel.getSpuId());
MyOwnSkuListItemModel sku3 = myOwnSkuCardItemModel.getSku();
if (sku3 != null) {
friendGreetingCarInfo = sku3.getIntentionInfo();
}
String str = "";
String str2 = friendGreetingCarInfo != null ? "贺卡" : str;
MyOwnSkuListItemModel sku4 = myOwnSkuCardItemModel.getSku();
if (sku4 != null && sku4.isGift()) {
str = ((FontText) _$_findCachedViewById(R.id.tvHornoraryTitle)).getText().toString();
}
aVar.t(c5, contentTitle, valueOf, valueOf2, str2, str, 0, Integer.valueOf(getContentType()));
}
}
/* 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(MyOwnSkuCardItemModel myOwnSkuCardItemModel) {
MyOwnSkuCardItemModel myOwnSkuCardItemModel2 = myOwnSkuCardItemModel;
boolean z = true;
int i = 0;
if (!PatchProxy.proxy(new Object[]{myOwnSkuCardItemModel2}, this, changeQuickRedirect, false, 280788, new Class[]{MyOwnSkuCardItemModel.class}, Void.TYPE).isSupported) {
super.update(myOwnSkuCardItemModel2);
((ConstraintLayout) _$_findCachedViewById(R.id.delLayout)).setVisibility(myOwnSkuCardItemModel2.isLongSelected() || myOwnSkuCardItemModel2.isShowDeleteTips() ? 0 : 8);
((Group) _$_findCachedViewById(R.id.groupDelete)).setVisibility(myOwnSkuCardItemModel2.isLongSelected() && !myOwnSkuCardItemModel2.isShowDeleteTips() ? 0 : 8);
DuImageLoaderView duImageLoaderView = (DuImageLoaderView) _$_findCachedViewById(R.id.ivTips);
if (myOwnSkuCardItemModel2.isLongSelected() || !myOwnSkuCardItemModel2.isShowDeleteTips()) {
z = false;
}
if (!z) {
i = 8;
}
duImageLoaderView.setVisibility(i);
}
}
}