package com.shizhuang.duapp.modules.orderparticulars.views; import android.content.Context; import android.util.AttributeSet; import android.view.View; import android.widget.TextView; import androidx.recyclerview.widget.RecyclerView; 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.bean.ImageViewModel; import com.shizhuang.duapp.common.exposure.DuExposureHelper; import com.shizhuang.duapp.libs.duimageloaderview.DuImageLoaderView; import com.shizhuang.duapp.modules.aftersale.logistics.adapter.OrderQualityFlawInfoImageAdapter; import com.shizhuang.duapp.modules.orderdetail.model.OpFlawInfo; import com.shizhuang.duapp.modules.orderdetail.viewmodel.OdViewModel; import com.shizhuang.duapp.modules.orderdetail.views.OdBaseView; import fi.b; import java.util.HashMap; import java.util.List; import kotlin.Metadata; import kotlin.collections.CollectionsKt__CollectionsKt; 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/OpFlawInfoView;", "Lcom/shizhuang/duapp/modules/orderdetail/views/OdBaseView;", "Lcom/shizhuang/duapp/modules/orderdetail/model/OpFlawInfo;", "", "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: OpFlawInfoView.kt */ public final class OpFlawInfoView extends OdBaseView<OpFlawInfo> { public static ChangeQuickRedirect changeQuickRedirect; public HashMap d; @JvmOverloads public OpFlawInfoView(@NotNull Context context) { this(context, null, 0, 6); } @JvmOverloads public OpFlawInfoView(@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 */ OpFlawInfoView(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, 248577, 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, 248574, new Class[0], Integer.TYPE); return proxy.isSupported ? ((Integer) proxy.result).intValue() : R.layout.layout_op_flow_info_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, 248576, new Class[]{DuExposureHelper.State.class}, Void.TYPE).isSupported) { super.onExposure(state); a aVar = a.f37160a; OdViewModel odViewModel = getOdViewModel(); OpFlawInfo opFlawInfo = (OpFlawInfo) getData(); String qualityResultTitle = opFlawInfo != null ? opFlawInfo.getQualityResultTitle() : null; OpFlawInfo opFlawInfo2 = (OpFlawInfo) getData(); a.c(aVar, odViewModel, qualityResultTitle, opFlawInfo2 != null ? opFlawInfo2.getQualityResultDesc() : null, null, null, 16); } } @Override // com.shizhuang.duapp.common.component.module.IModuleView, com.shizhuang.duapp.common.component.module.AbsModuleView public void update(Object obj) { OpFlawInfo opFlawInfo = (OpFlawInfo) obj; boolean z = true; int i = 0; if (!PatchProxy.proxy(new Object[]{opFlawInfo}, this, changeQuickRedirect, false, 248575, new Class[]{OpFlawInfo.class}, Void.TYPE).isSupported) { super.update(opFlawInfo); ((DuImageLoaderView) _$_findCachedViewById(R.id.ivRight)).i("https://apk.poizon.com/duApp/Android_Config/resource/mall/app/order/op_flaw_bg_new_v2.png").x(); ((TextView) _$_findCachedViewById(R.id.tvTitle)).setText(opFlawInfo.getQualityResultTitle()); ((TextView) _$_findCachedViewById(R.id.tvDesc)).setText(opFlawInfo.getQualityResultDesc()); View _$_findCachedViewById = _$_findCachedViewById(R.id.viewShadow); List<ImageViewModel> flawImages = opFlawInfo.getFlawImages(); if ((flawImages != null ? flawImages.size() : 0) >= 6) { z = false; } if (z) { i = 8; } _$_findCachedViewById.setVisibility(i); Context context = getContext(); List<ImageViewModel> flawImages2 = opFlawInfo.getFlawImages(); if (flawImages2 == null) { flawImages2 = CollectionsKt__CollectionsKt.emptyList(); } ((RecyclerView) _$_findCachedViewById(R.id.rvFlawImages)).setAdapter(new OrderQualityFlawInfoImageAdapter(context, flawImages2, b.b((float) 50), new OpFlawInfoView$update$imagesAdapter$1(this, opFlawInfo))); } } @JvmOverloads public OpFlawInfoView(@NotNull Context context, @Nullable AttributeSet attributeSet, int i) { super(context, attributeSet, i); } }