得物.apk(点击下载) / SelectRefundWayAdapter.java


package com.shizhuang.duapp.modules.aftersale.refund.adapter;

import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.constraintlayout.widget.Group;
import cd.f;
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.extension.ViewExtensionKt;
import com.shizhuang.duapp.common.recyclerview.adapter.DuDelegateInnerAdapter;
import com.shizhuang.duapp.common.recyclerview.holder.DuViewHolder;
import com.shizhuang.duapp.common.widget.font.IconFontTextView;
import com.shizhuang.duapp.libs.duimageloaderview.DuImageLoaderView;
import com.shizhuang.duapp.libs.duimageloaderview.options.DuScaleType;
import com.shizhuang.duapp.modules.common.model.ExpressReturnButton;
import java.util.HashMap;
import kotlin.Metadata;
import org.jetbrains.annotations.NotNull;

@Metadata(bv = {}, d1 = {"\u0000\u0010\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001:\u0001\u0005B\u0007¢\u0006\u0004\b\u0003\u0010\u0004¨\u0006\u0006"}, d2 = {"Lcom/shizhuang/duapp/modules/aftersale/refund/adapter/SelectRefundWayAdapter;", "Lcom/shizhuang/duapp/common/recyclerview/adapter/DuDelegateInnerAdapter;", "Lcom/shizhuang/duapp/modules/common/model/ExpressReturnButton;", "<init>", "()V", "RefundWayViewHolder", "du_order_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: SelectRefundWayAdapter.kt */
public final class SelectRefundWayAdapter extends DuDelegateInnerAdapter<ExpressReturnButton> {
    public static ChangeQuickRedirect changeQuickRedirect;
    public int l = -1;

    @Metadata(bv = {}, d1 = {"\u0000\u000e\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\b†\u0004\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001¨\u0006\u0003"}, d2 = {"Lcom/shizhuang/duapp/modules/aftersale/refund/adapter/SelectRefundWayAdapter$RefundWayViewHolder;", "Lcom/shizhuang/duapp/common/recyclerview/holder/DuViewHolder;", "Lcom/shizhuang/duapp/modules/common/model/ExpressReturnButton;", "du_order_release"}, k = 1, mv = {1, 4, 2})
    /* compiled from: SelectRefundWayAdapter.kt */
    public final class RefundWayViewHolder extends DuViewHolder<ExpressReturnButton> {
        public static ChangeQuickRedirect changeQuickRedirect;

        /* renamed from: c  reason: collision with root package name */
        public HashMap f10780c;

        public RefundWayViewHolder(@NotNull View view) {
            super(view);
        }

        public View _$_findCachedViewById(int i) {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 61984, new Class[]{Integer.TYPE}, View.class);
            if (proxy.isSupported) {
                return (View) proxy.result;
            }
            if (this.f10780c == null) {
                this.f10780c = new HashMap();
            }
            View view = (View) this.f10780c.get(Integer.valueOf(i));
            if (view != null) {
                return view;
            }
            View containerView = getContainerView();
            if (containerView == null) {
                return null;
            }
            View findViewById = containerView.findViewById(i);
            this.f10780c.put(Integer.valueOf(i), findViewById);
            return findViewById;
        }

        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, int] */
        /* JADX WARNING: Code restructure failed: missing block: B:26:0x00d0, code lost:
            if ((r4 == null || r4.length() == 0) == false) goto L_0x00d4;
         */
        @Override // com.shizhuang.duapp.common.recyclerview.holder.DuViewHolder
        public void onBind(ExpressReturnButton expressReturnButton, int i) {
            int i3;
            ExpressReturnButton expressReturnButton2 = expressReturnButton;
            boolean z = true;
            Object[] objArr = {expressReturnButton2, new Integer(i)};
            ChangeQuickRedirect changeQuickRedirect2 = changeQuickRedirect;
            Class cls = Integer.TYPE;
            if (!PatchProxy.proxy(objArr, this, changeQuickRedirect2, false, 61983, new Class[]{ExpressReturnButton.class, cls}, Void.TYPE).isSupported) {
                String recommendTitle = expressReturnButton2.getRecommendTitle();
                int i12 = 8;
                String str = "";
                if (recommendTitle == null || recommendTitle.length() == 0) {
                    ((Group) _$_findCachedViewById(R.id.refundHeaderGroup)).setVisibility(8);
                } else {
                    ((Group) _$_findCachedViewById(R.id.refundHeaderGroup)).setVisibility(0);
                    TextView textView = (TextView) _$_findCachedViewById(R.id.tvRefundRecommendTitle);
                    String recommendTitle2 = expressReturnButton2.getRecommendTitle();
                    if (recommendTitle2 == null) {
                        recommendTitle2 = str;
                    }
                    textView.setText(recommendTitle2);
                    TextView textView2 = (TextView) _$_findCachedViewById(R.id.tvRefundRecommendTip);
                    String recommendCopyWriting = expressReturnButton2.getRecommendCopyWriting();
                    if (recommendCopyWriting == null) {
                        recommendCopyWriting = str;
                    }
                    textView2.setText(recommendCopyWriting);
                    ((DuImageLoaderView) _$_findCachedViewById(R.id.ivHeaderBackground)).i("https://apk.poizon.com/duApp/Android_Config/resource/mall/app/order/bg_refund_header_view.webp").p0(DuScaleType.FIT_XY).x();
                }
                ((TextView) _$_findCachedViewById(R.id.tvRefundWayName)).setText(expressReturnButton2.getButton());
                TextView textView3 = (TextView) _$_findCachedViewById(R.id.tvRefundWayTag);
                if (expressReturnButton2.getRecommend()) {
                    String freightLabel = expressReturnButton2.getFreightLabel();
                }
                z = false;
                if (z) {
                    i12 = 0;
                }
                textView3.setVisibility(i12);
                TextView textView4 = (TextView) _$_findCachedViewById(R.id.tvRefundWayTag);
                String freightLabel2 = expressReturnButton2.getFreightLabel();
                if (freightLabel2 == null) {
                    freightLabel2 = str;
                }
                textView4.setText(freightLabel2);
                TextView textView5 = (TextView) _$_findCachedViewById(R.id.tvRefundWayDesc);
                String buttonDesc = expressReturnButton2.getButtonDesc();
                if (buttonDesc != null) {
                    str = buttonDesc;
                }
                textView5.setText(str);
                SelectRefundWayAdapter selectRefundWayAdapter = SelectRefundWayAdapter.this;
                PatchProxyResult proxy = PatchProxy.proxy(new Object[0], selectRefundWayAdapter, SelectRefundWayAdapter.changeQuickRedirect, false, 61980, new Class[0], cls);
                if (proxy.isSupported) {
                    i3 = ((Integer) proxy.result).intValue();
                } else {
                    i3 = selectRefundWayAdapter.l;
                }
                if (i3 == expressReturnButton2.getButtonVal()) {
                    ((IconFontTextView) _$_findCachedViewById(R.id.checkItem)).setTextColor(f.b(getContext(), R.color.color_primary));
                    ((IconFontTextView) _$_findCachedViewById(R.id.checkItem)).setText(getContext().getText(R.string.iconfont_check_filled));
                    this.itemView.setBackgroundColor(f.b(getContext(), R.color.color_gray_fafafc));
                    return;
                }
                ((IconFontTextView) _$_findCachedViewById(R.id.checkItem)).setTextColor(f.b(getContext(), R.color.color_gray_disable));
                ((IconFontTextView) _$_findCachedViewById(R.id.checkItem)).setText(getContext().getText(R.string.iconfont_unchecked));
                this.itemView.setBackgroundColor(f.b(getContext(), R.color.white));
            }
        }
    }

    @Override // com.shizhuang.duapp.common.recyclerview.adapter.AdapterLoader, com.shizhuang.duapp.common.recyclerview.adapter.DuDelegateInnerAdapter
    @NotNull
    public DuViewHolder<ExpressReturnButton> onViewHolderCreate(@NotNull ViewGroup viewGroup, int i) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{viewGroup, new Integer(i)}, this, changeQuickRedirect, false, 61982, new Class[]{ViewGroup.class, Integer.TYPE}, DuViewHolder.class);
        return proxy.isSupported ? (DuViewHolder) proxy.result : new RefundWayViewHolder(ViewExtensionKt.w(viewGroup, R.layout.item_refund_way, false, 2));
    }
}