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


package com.shizhuang.duapp.modules.mall_dynamic.channel.views.feed;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.TextView;
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.IModuleExposureObserver;
import com.shizhuang.duapp.common.exposure.DuExposureHelper;
import com.shizhuang.duapp.common.extension.DrawableScale;
import com.shizhuang.duapp.libs.duimageloaderview.DuImageLoaderView;
import com.shizhuang.duapp.libs.duimageloaderview.options.DuScaleType;
import com.shizhuang.duapp.modules.du_mall_common.extension.ViewExtensionKt;
import com.shizhuang.duapp.modules.mall_dynamic.channel.model.feed.ChannelBoutiqueDetailModel;
import com.shizhuang.duapp.modules.mall_dynamic.channel.model.feed.ChannelBoutiqueModel;
import com.shizhuang.duapp.modules.mall_dynamic.channel.views.BaseChannelView;
import fi.b;
import j60.z;
import java.util.HashMap;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.jvm.JvmOverloads;
import kotlin.jvm.functions.Function1;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import u91.e;

@Metadata(bv = {}, d1 = {"\u0000$\n\u0002\u0018\u0002\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\u00012\u00020\u0003B'\b\u0007\u0012\u0006\u0010\u0007\u001a\u00020\u0006\u0012\n\b\u0002\u0010\t\u001a\u0004\u0018\u00010\b\u0012\b\b\u0002\u0010\n\u001a\u00020\u0004¢\u0006\u0004\b\u000b\u0010\fJ\b\u0010\u0005\u001a\u00020\u0004H\u0016¨\u0006\r"}, d2 = {"Lcom/shizhuang/duapp/modules/mall_dynamic/channel/views/feed/ChannelBoutiqueCardVIew;", "Lcom/shizhuang/duapp/modules/mall_dynamic/channel/views/BaseChannelView;", "Lcom/shizhuang/duapp/modules/mall_dynamic/channel/model/feed/ChannelBoutiqueModel;", "Lcom/shizhuang/duapp/common/component/module/IModuleExposureObserver;", "", "getLayoutId", "Landroid/content/Context;", "context", "Landroid/util/AttributeSet;", "attrs", "defStyleAttr", "<init>", "(Landroid/content/Context;Landroid/util/AttributeSet;I)V", "du_mall_dynamic_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: ChannelBoutiqueCardVIew.kt */
public final class ChannelBoutiqueCardVIew extends BaseChannelView<ChannelBoutiqueModel> implements IModuleExposureObserver {
    public static ChangeQuickRedirect changeQuickRedirect;
    public HashMap f;

    @JvmOverloads
    public ChannelBoutiqueCardVIew(@NotNull Context context) {
        this(context, null, 0, 6);
    }

    @JvmOverloads
    public ChannelBoutiqueCardVIew(@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 */ ChannelBoutiqueCardVIew(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, 212090, 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;
    }

    /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
    @Override // com.shizhuang.duapp.modules.mall_dynamic.channel.views.BaseChannelView
    public void c(ChannelBoutiqueModel channelBoutiqueModel) {
        ChannelBoutiqueModel channelBoutiqueModel2 = channelBoutiqueModel;
        if (!PatchProxy.proxy(new Object[]{channelBoutiqueModel2}, this, changeQuickRedirect, false, 212088, new Class[]{ChannelBoutiqueModel.class}, Void.TYPE).isSupported) {
            DuImageLoaderView duImageLoaderView = (DuImageLoaderView) _$_findCachedViewById(R.id.ivCover);
            ChannelBoutiqueDetailModel detail = channelBoutiqueModel2.getDetail();
            String str = null;
            String coverUrl = detail != null ? detail.getCoverUrl() : null;
            String str2 = "";
            if (coverUrl == null) {
                coverUrl = str2;
            }
            g.a(duImageLoaderView.i(coverUrl), DrawableScale.OneToOne).d0(300).p0(DuScaleType.CENTER_CROP).x();
            DuImageLoaderView duImageLoaderView2 = (DuImageLoaderView) _$_findCachedViewById(R.id.ivTag);
            String tagImage = channelBoutiqueModel2.getTagImage();
            if (tagImage != null) {
                str2 = tagImage;
            }
            duImageLoaderView2.i(str2).d0(300).x();
            TextView textView = (TextView) _$_findCachedViewById(R.id.tvTitle);
            ChannelBoutiqueDetailModel detail2 = channelBoutiqueModel2.getDetail();
            textView.setText(detail2 != null ? detail2.getTitle() : null);
            TextView textView2 = (TextView) _$_findCachedViewById(R.id.tvSubTitle);
            ChannelBoutiqueDetailModel detail3 = channelBoutiqueModel2.getDetail();
            if (detail3 != null) {
                str = detail3.getSubTitle();
            }
            textView2.setText(str);
        }
    }

    @Override // com.shizhuang.duapp.common.component.module.AbsModuleView
    public int getLayoutId() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 212087, new Class[0], Integer.TYPE);
        return proxy.isSupported ? ((Integer) proxy.result).intValue() : R.layout.item_mall_channel_boutique_card;
    }

    @Override // com.shizhuang.duapp.common.component.module.IModuleExposureObserver
    public void onExposure(@Nullable DuExposureHelper.State state) {
        if (!PatchProxy.proxy(new Object[]{state}, this, changeQuickRedirect, false, 212089, new Class[]{DuExposureHelper.State.class}, Void.TYPE).isSupported) {
            ChannelBoutiqueModel channelBoutiqueModel = (ChannelBoutiqueModel) getAcquireData();
            BaseChannelView.k(this, null, channelBoutiqueModel != null ? channelBoutiqueModel.getTrack() : null, 1, null);
        }
    }

    @JvmOverloads
    public ChannelBoutiqueCardVIew(@NotNull Context context, @Nullable AttributeSet attributeSet, int i) {
        super(context, attributeSet, i);
        z.b.a(this, b.b((float) 2), -1);
        ViewExtensionKt.e(this, 0, new Function1<View, Unit>(this) {
            /* class com.shizhuang.duapp.modules.mall_dynamic.channel.views.feed.ChannelBoutiqueCardVIew.AnonymousClass1 */
            public static ChangeQuickRedirect changeQuickRedirect;
            public final /* synthetic */ ChannelBoutiqueCardVIew this$0;

            {
                this.this$0 = r1;
            }

            /* 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) {
                ChannelBoutiqueDetailModel detail;
                if (!PatchProxy.proxy(new Object[]{view}, this, changeQuickRedirect, false, 212092, new Class[]{View.class}, Void.TYPE).isSupported) {
                    Context context = view.getContext();
                    ChannelBoutiqueModel channelBoutiqueModel = (ChannelBoutiqueModel) this.this$0.getAcquireData();
                    e.G(context, (channelBoutiqueModel == null || (detail = channelBoutiqueModel.getDetail()) == null) ? null : detail.getUrl());
                    ChannelBoutiqueCardVIew channelBoutiqueCardVIew = this.this$0;
                    ChannelBoutiqueModel channelBoutiqueModel2 = (ChannelBoutiqueModel) channelBoutiqueCardVIew.getAcquireData();
                    BaseChannelView.i(channelBoutiqueCardVIew, null, channelBoutiqueModel2 != null ? channelBoutiqueModel2.getTrack() : null, 1, null);
                }
            }
        }, 1);
        ((DuImageLoaderView) _$_findCachedViewById(R.id.ivDecor)).i("https://apk.poizon.com/duApp/Android_Config/resource/mall/app/ic_channel_boutique_bottom_right_decor.webp").x();
    }
}