package com.shizhuang.duapp.modules.orderparticulars.views; import android.content.Context; import android.util.AttributeSet; import android.view.View; import android.widget.TextView; 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.exposure.DuExposureHelper; import com.shizhuang.duapp.common.extension.ViewExtensionKt; import com.shizhuang.duapp.libs.duimageloaderview.DuImageLoaderView; import com.shizhuang.duapp.libs.duimageloaderview.options.DuScaleType; import com.shizhuang.duapp.modules.orderdetail.model.OdLogisticInfo; import com.shizhuang.duapp.modules.orderdetail.viewmodel.OdViewModel; import com.shizhuang.duapp.modules.orderdetail.views.OdBaseView; import fi.b; import java.util.HashMap; import kotlin.Metadata; import kotlin.jvm.JvmOverloads; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import px0.a; @Metadata(bv = {}, d1 = {"\u0000 \n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0005\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001B'\b\u0007\u0012\u0006\u0010\u0006\u001a\u00020\u0005\u0012\n\b\u0002\u0010\b\u001a\u0004\u0018\u00010\u0007\u0012\b\b\u0002\u0010\t\u001a\u00020\u0003¢\u0006\u0004\b\n\u0010\u000bJ\b\u0010\u0004\u001a\u00020\u0003H\u0016¨\u0006\f"}, d2 = {"Lcom/shizhuang/duapp/modules/orderparticulars/views/OpLogisticView;", "Lcom/shizhuang/duapp/modules/orderdetail/views/OdBaseView;", "Lcom/shizhuang/duapp/modules/orderdetail/model/OdLogisticInfo;", "", "getLayoutId", "Landroid/content/Context;", "context", "Landroid/util/AttributeSet;", "attrs", "defStyleAttr", "<init>", "(Landroid/content/Context;Landroid/util/AttributeSet;I)V", "du_order_release"}, k = 1, mv = {1, 4, 2}) /* compiled from: OpLogisticView.kt */ public final class OpLogisticView extends OdBaseView<OdLogisticInfo> { public static ChangeQuickRedirect changeQuickRedirect; public HashMap d; @JvmOverloads public OpLogisticView(@NotNull Context context) { this(context, null, 0, 6); } @JvmOverloads public OpLogisticView(@NotNull Context context, @Nullable AttributeSet attributeSet) { this(context, attributeSet, 0, 4); } /* JADX INFO: this call moved to the top of the method (can break code semantics) */ public /* synthetic */ OpLogisticView(Context context, AttributeSet attributeSet, int i, int i3) { this(context, (i3 & 2) != 0 ? null : attributeSet, (i3 & 4) != 0 ? 0 : i); } public View _$_findCachedViewById(int i) { PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 248646, new Class[]{Integer.TYPE}, View.class); if (proxy.isSupported) { return (View) proxy.result; } if (this.d == null) { this.d = new HashMap(); } View view = (View) this.d.get(Integer.valueOf(i)); if (view != null) { return view; } View findViewById = findViewById(i); this.d.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, 248643, new Class[0], Integer.TYPE); return proxy.isSupported ? ((Integer) proxy.result).intValue() : R.layout.layout_op_logistic_view; } @Override // com.shizhuang.duapp.modules.orderdetail.views.OdBaseView, com.shizhuang.duapp.common.component.module.IModuleExposureObserver public void onExposure(@Nullable DuExposureHelper.State state) { if (!PatchProxy.proxy(new Object[]{state}, this, changeQuickRedirect, false, 248645, new Class[]{DuExposureHelper.State.class}, Void.TYPE).isSupported) { super.onExposure(state); a aVar = a.f37160a; OdViewModel odViewModel = getOdViewModel(); OdLogisticInfo odLogisticInfo = (OdLogisticInfo) getData(); String title = odLogisticInfo != null ? odLogisticInfo.getTitle() : null; OdLogisticInfo odLogisticInfo2 = (OdLogisticInfo) getData(); a.c(aVar, odViewModel, title, odLogisticInfo2 != null ? odLogisticInfo2.getDesc() : null, "查看物流", null, 16); } } @Override // com.shizhuang.duapp.common.component.module.IModuleView, com.shizhuang.duapp.common.component.module.AbsModuleView public void update(Object obj) { OdLogisticInfo odLogisticInfo = (OdLogisticInfo) obj; int i = 0; if (!PatchProxy.proxy(new Object[]{odLogisticInfo}, this, changeQuickRedirect, false, 248644, new Class[]{OdLogisticInfo.class}, Void.TYPE).isSupported) { super.update(odLogisticInfo); ((DuImageLoaderView) _$_findCachedViewById(R.id.ivBackground)).i("https://apk.poizon.com/duApp/Android_Config/resource/mall/app/order/order_op_logisctic_bg.png").p0(DuScaleType.CENTER_CROP).R((float) b.b((float) 2)).x(); ((DuImageLoaderView) _$_findCachedViewById(R.id.ivCar)).i(odLogisticInfo.getIcon()).x(); ((TextView) _$_findCachedViewById(R.id.tvTitle)).setText(odLogisticInfo.getTitle()); ((TextView) _$_findCachedViewById(R.id.tvDesc)).setText(odLogisticInfo.getDesc()); ((TextView) _$_findCachedViewById(R.id.tvTime)).setText(odLogisticInfo.getTime()); TextView textView = (TextView) _$_findCachedViewById(R.id.tvTime); String time = odLogisticInfo.getTime(); if (time == null || time.length() == 0) { i = 8; } textView.setVisibility(i); ViewExtensionKt.j(this, 0, new OpLogisticView$update$1(this, odLogisticInfo), 1); } } @JvmOverloads public OpLogisticView(@NotNull Context context, @Nullable AttributeSet attributeSet, int i) { super(context, attributeSet, i); } }