package hx0; import android.content.Context; import android.widget.TextView; import androidx.core.content.ContextCompat; import androidx.fragment.app.FragmentActivity; import com.meituan.robust.ChangeQuickRedirect; import com.meituan.robust.PatchProxy; import com.shizhuang.duapp.R; import com.shizhuang.duapp.common.ui.view.ProductImageLoaderView; import com.shizhuang.duapp.modules.common.model.ConfirmReceiveModel; import com.shizhuang.duapp.modules.orderdetail.dialog.ConfirmReceiveDialog; import com.shizhuang.duapp.modules.router.Callback; import df.q; import nd.e; import org.jetbrains.annotations.Nullable; import rd.l; import td.s; /* compiled from: ConfirmReceiveDialog.kt */ public final class a extends s<ConfirmReceiveModel> { public static ChangeQuickRedirect changeQuickRedirect; public final /* synthetic */ FragmentActivity b; /* renamed from: c reason: collision with root package name */ public final /* synthetic */ ConfirmReceiveDialog f33195c; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public a(FragmentActivity fragmentActivity, Context context, ConfirmReceiveDialog confirmReceiveDialog) { super(context); this.b = fragmentActivity; this.f33195c = confirmReceiveDialog; } @Override // com.shizhuang.duapp.common.helper.net.facade.IViewHandler, td.s, td.a public void onBzError(@Nullable l<ConfirmReceiveModel> lVar) { if (!PatchProxy.proxy(new Object[]{lVar}, this, changeQuickRedirect, false, 244855, new Class[]{l.class}, Void.TYPE).isSupported) { super.onBzError(lVar); Callback callback = this.f33195c.e; String str = ""; String str2 = null; if (callback != null) { String c5 = lVar != null ? lVar.c() : null; if (c5 == null) { c5 = str; } callback.error(c5); } if (cd.l.c(this.f33195c)) { ((TextView) this.f33195c._$_findCachedViewById(R.id.tvError)).setVisibility(0); TextView textView = (TextView) this.f33195c._$_findCachedViewById(R.id.tvError); if (lVar != null) { str2 = lVar.c(); } if (str2 != null) { str = str2; } textView.setText(str); } } } @Override // com.shizhuang.duapp.common.helper.net.facade.IViewHandler, td.a public void onSuccess(Object obj) { ConfirmReceiveModel confirmReceiveModel = (ConfirmReceiveModel) obj; if (!PatchProxy.proxy(new Object[]{confirmReceiveModel}, this, changeQuickRedirect, false, 244854, new Class[]{ConfirmReceiveModel.class}, Void.TYPE).isSupported) { Callback callback = this.f33195c.e; String str = ""; if (callback != null) { String n = e.n(confirmReceiveModel); if (n == null) { n = str; } callback.success(n); } if (cd.l.c(this.f33195c)) { ((TextView) this.f33195c._$_findCachedViewById(R.id.tvError)).setVisibility(8); if (confirmReceiveModel != null) { Integer receiveAllowance = confirmReceiveModel.getReceiveAllowance(); if (receiveAllowance != null && receiveAllowance.intValue() == 1) { this.f33195c.f21004g = confirmReceiveModel.getMemberGrowthUrl(); ((ProductImageLoaderView) this.f33195c._$_findCachedViewById(R.id.imgGoods)).setBackground(ContextCompat.getDrawable(this.b, R.drawable.order_white_corners_2)); ConfirmReceiveDialog confirmReceiveDialog = this.f33195c; String allowanceDesc = confirmReceiveModel.getAllowanceDesc(); if (allowanceDesc != null) { str = allowanceDesc; } confirmReceiveDialog.x("已收货,津贴发放成功", "https://apk.poizon.com/duApp/Android_Config/resource/mall/app/order/icon_receive_allowance_success.png", str, "去看看"); } else if (receiveAllowance != null && receiveAllowance.intValue() == 2) { this.f33195c.f21004g = confirmReceiveModel.getMemberGrowthUrl(); ((ProductImageLoaderView) this.f33195c._$_findCachedViewById(R.id.imgGoods)).setBackground(ContextCompat.getDrawable(this.b, R.drawable.order_white_corners_2)); this.f33195c.x("已收货,津贴领取失败", "https://apk.poizon.com/duApp/Android_Config/resource/mall/app/order/icon_receive_allowance_fail.png", "点击“去看看”,前往“会员成长分”查看详情", "去看看"); } else { q.n("收货成功"); this.f33195c.dismiss(); } } } } } }