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


package com.shizhuang.duapp.modules.productv2.crowdfund.views;

import a.f;
import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.GradientDrawable;
import android.text.SpannableStringBuilder;
import android.text.SpannedString;
import android.text.style.ForegroundColorSpan;
import android.util.ArrayMap;
import android.util.AttributeSet;
import android.view.View;
import androidx.appcompat.widget.AppCompatTextView;
import androidx.core.content.ContextCompat;
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.AbsModuleView;
import com.shizhuang.duapp.common.component.module.IModuleExposureObserver;
import com.shizhuang.duapp.common.component.module.ModuleAdapterDelegateKt;
import com.shizhuang.duapp.common.exposure.DuExposureHelper;
import com.shizhuang.duapp.common.helper.LoginHelper;
import com.shizhuang.duapp.modules.du_mall_common.helper.MallViewCountDownHelper;
import com.shizhuang.duapp.modules.productv2.api.ProductFacadeV2;
import com.shizhuang.duapp.modules.productv2.crowdfund.model.CrowdfundItemModel;
import com.shizhuang.duapp.modules.productv2.crowdfund.model.CrowdfundSubscribeModel;
import df.q;
import df.u0;
import j50.o;
import java.util.Arrays;
import kotlin.Lazy;
import kotlin.LazyKt__LazyJVMKt;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.jvm.JvmOverloads;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.StringCompanionObject;
import kotlin.text.StringsKt__StringsJVMKt;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import rd.l;
import td.s;

@Metadata(bv = {}, d1 = {"\u0000P\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\t\n\u0000\n\u0002\u0010\b\n\u0002\b\u000b\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\u0010\u000b\n\u0002\u0010\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0005\b&\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u00012\u00020\u0003B'\b\u0007\u0012\u0006\u0010,\u001a\u00020+\u0012\n\b\u0002\u0010.\u001a\u0004\u0018\u00010-\u0012\b\b\u0002\u0010/\u001a\u00020\u0006¢\u0006\u0004\b0\u00101J\b\u0010\u0005\u001a\u00020\u0004H\u0016R\u001a\u0010\u000b\u001a\u00020\u00068\u0004X„\u0004¢\u0006\f\n\u0004\b\u0007\u0010\b\u001a\u0004\b\t\u0010\nR\u001a\u0010\u000e\u001a\u00020\u00068\u0004X„\u0004¢\u0006\f\n\u0004\b\f\u0010\b\u001a\u0004\b\r\u0010\nR\u001a\u0010\u0011\u001a\u00020\u00068\u0004X„\u0004¢\u0006\f\n\u0004\b\u000f\u0010\b\u001a\u0004\b\u0010\u0010\nR\u001b\u0010\u0017\u001a\u00020\u00128BX‚„\u0002¢\u0006\f\n\u0004\b\u0013\u0010\u0014\u001a\u0004\b\u0015\u0010\u0016R*\u0010 \u001a\n\u0012\u0004\u0012\u00020\u0019\u0018\u00010\u00188\u0006@\u0006X†\u000e¢\u0006\u0012\n\u0004\b\u001a\u0010\u001b\u001a\u0004\b\u001c\u0010\u001d\"\u0004\b\u001e\u0010\u001fR6\u0010*\u001a\u0016\u0012\u0004\u0012\u00020\u0019\u0012\u0004\u0012\u00020\"\u0012\u0004\u0012\u00020#\u0018\u00010!8\u0006@\u0006X†\u000e¢\u0006\u0012\n\u0004\b$\u0010%\u001a\u0004\b&\u0010'\"\u0004\b(\u0010)¨\u00062"}, d2 = {"Lcom/shizhuang/duapp/modules/productv2/crowdfund/views/CrowdfundBaseItemView;", "Lcom/shizhuang/duapp/common/component/module/AbsModuleView;", "Lcom/shizhuang/duapp/modules/productv2/crowdfund/model/CrowdfundItemModel;", "Lcom/shizhuang/duapp/common/component/module/IModuleExposureObserver;", "", "getCountDownTime", "", "b", "I", "getCOLOR_14151A", "()I", "COLOR_14151A", "c", "getCOLOR_F5F5F9", "COLOR_F5F5F9", "d", "getCOLOR_C7C7D7", "COLOR_C7C7D7", "Lcom/shizhuang/duapp/modules/du_mall_common/helper/MallViewCountDownHelper;", "e", "Lkotlin/Lazy;", "getCountDownHelper", "()Lcom/shizhuang/duapp/modules/du_mall_common/helper/MallViewCountDownHelper;", "countDownHelper", "Lkotlin/Function0;", "", "f", "Lkotlin/jvm/functions/Function0;", "getTabName", "()Lkotlin/jvm/functions/Function0;", "setTabName", "(Lkotlin/jvm/functions/Function0;)V", "tabName", "Lkotlin/Function2;", "", "", "g", "Lkotlin/jvm/functions/Function2;", "getSubscribeCb", "()Lkotlin/jvm/functions/Function2;", "setSubscribeCb", "(Lkotlin/jvm/functions/Function2;)V", "subscribeCb", "Landroid/content/Context;", "context", "Landroid/util/AttributeSet;", "attrs", "defStyleAttr", "<init>", "(Landroid/content/Context;Landroid/util/AttributeSet;I)V", "du_product_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: CrowdfundBaseItemView.kt */
public abstract class CrowdfundBaseItemView extends AbsModuleView<CrowdfundItemModel> implements IModuleExposureObserver {
    public static ChangeQuickRedirect changeQuickRedirect;
    public final int b;

    /* renamed from: c  reason: collision with root package name */
    public final int f23553c;
    public final int d;
    public final Lazy e;
    @Nullable
    public Function0<String> f;
    @Nullable

    /* renamed from: g  reason: collision with root package name */
    public Function2<? super String, ? super Boolean, Unit> f23554g;

    /* compiled from: CrowdfundBaseItemView.kt */
    public static final class a extends s<CrowdfundSubscribeModel> {
        public static ChangeQuickRedirect changeQuickRedirect;
        public final /* synthetic */ CrowdfundBaseItemView b;

        /* renamed from: c  reason: collision with root package name */
        public final /* synthetic */ Function1 f23555c;
        public final /* synthetic */ boolean d;
        public final /* synthetic */ Function0 e;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public a(CrowdfundBaseItemView crowdfundBaseItemView, Function1 function1, boolean z, Function0 function0, View view) {
            super(view);
            this.b = crowdfundBaseItemView;
            this.f23555c = function1;
            this.d = z;
            this.e = function0;
        }

        @Override // com.shizhuang.duapp.common.helper.net.facade.IViewHandler, td.s, td.a
        public void onBzError(@Nullable l<CrowdfundSubscribeModel> lVar) {
            if (!PatchProxy.proxy(new Object[]{lVar}, this, changeQuickRedirect, false, 292377, new Class[]{l.class}, Void.TYPE).isSupported) {
                u0.a(this.b.getContext(), "网络出错了,请稍后重试!");
                this.f23555c.invoke(Boolean.valueOf(this.d));
            }
        }

        @Override // com.shizhuang.duapp.common.helper.net.facade.IViewHandler, td.a
        public void onFinish() {
            if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 292378, new Class[0], Void.TYPE).isSupported) {
                super.onFinish();
                this.e.invoke();
            }
        }

        @Override // com.shizhuang.duapp.common.helper.net.facade.IViewHandler, td.a
        public void onSuccess(Object obj) {
            CrowdfundSubscribeModel crowdfundSubscribeModel = (CrowdfundSubscribeModel) obj;
            boolean z = true;
            if (!PatchProxy.proxy(new Object[]{crowdfundSubscribeModel}, this, changeQuickRedirect, false, 292376, new Class[]{CrowdfundSubscribeModel.class}, Void.TYPE).isSupported) {
                super.onSuccess(crowdfundSubscribeModel);
                if (crowdfundSubscribeModel == null || !Intrinsics.areEqual(crowdfundSubscribeModel.getState(), Boolean.TRUE)) {
                    u0.a(this.b.getContext(), "网络出错了,请稍后重试!");
                    this.f23555c.invoke(Boolean.valueOf(this.d));
                    return;
                }
                CrowdfundBaseItemView crowdfundBaseItemView = this.b;
                String text = crowdfundSubscribeModel.getText();
                if (!PatchProxy.proxy(new Object[]{text}, crowdfundBaseItemView, CrowdfundBaseItemView.changeQuickRedirect, false, 292358, new Class[]{String.class}, Void.TYPE).isSupported) {
                    if (text != null && !StringsKt__StringsJVMKt.isBlank(text)) {
                        z = false;
                    }
                    if (!z) {
                        Context context = crowdfundBaseItemView.getContext();
                        AppCompatTextView appCompatTextView = new AppCompatTextView(crowdfundBaseItemView.getContext());
                        appCompatTextView.setText(text);
                        appCompatTextView.setTextSize(13.0f);
                        appCompatTextView.setIncludeFontPadding(false);
                        appCompatTextView.setTextColor(-1);
                        float f = (float) 21;
                        float f12 = (float) 16;
                        appCompatTextView.setPadding(fi.b.b(f), fi.b.b(f12), fi.b.b(f), fi.b.b(f12));
                        appCompatTextView.setGravity(17);
                        GradientDrawable gradientDrawable = new GradientDrawable();
                        gradientDrawable.setColor(Color.parseColor("#CC000000"));
                        gradientDrawable.setCornerRadius((float) fi.b.b((float) 4));
                        Unit unit = Unit.INSTANCE;
                        appCompatTextView.setBackground(gradientDrawable);
                        appCompatTextView.setMaxWidth(fi.b.b((float) 200));
                        q.p(context, appCompatTextView, 0);
                    }
                }
            }
        }
    }

    /* compiled from: CrowdfundBaseItemView.kt */
    public static final class b implements MallViewCountDownHelper.OnCountDownListener {
        public static ChangeQuickRedirect changeQuickRedirect;

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ CrowdfundBaseItemView f23556a;

        /* JADX WARN: Incorrect args count in method signature: ()V */
        public b(CrowdfundBaseItemView crowdfundBaseItemView) {
            this.f23556a = crowdfundBaseItemView;
        }

        @Override // com.shizhuang.duapp.modules.du_mall_common.helper.MallViewCountDownHelper.OnCountDownListener
        public void onCountDownChanged(boolean z, long j) {
            if (!PatchProxy.proxy(new Object[]{new Byte(z ? (byte) 1 : 0), new Long(j)}, this, changeQuickRedirect, false, 292379, new Class[]{Boolean.TYPE, Long.TYPE}, Void.TYPE).isSupported) {
                this.f23556a.g(j);
            }
        }

        @Override // com.shizhuang.duapp.modules.du_mall_common.helper.MallViewCountDownHelper.OnCountDownListener
        public void onCountDownFinished(boolean z) {
            if (!PatchProxy.proxy(new Object[]{new Byte(z ? (byte) 1 : 0)}, this, changeQuickRedirect, false, 292380, new Class[]{Boolean.TYPE}, Void.TYPE).isSupported) {
                this.f23556a.g(0);
            }
        }
    }

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

    public static CharSequence c(CrowdfundBaseItemView crowdfundBaseItemView, long j, int i, String str, int i3, int i12, Object obj) {
        int b2 = (i12 & 2) != 0 ? fi.b.b((float) 2) : i;
        String str2 = (i12 & 4) != 0 ? null : str;
        int parseColor = (i12 & 8) != 0 ? Color.parseColor("#6B7B99") : i3;
        Object[] objArr = {new Long(j), new Integer(b2), str2, new Integer(parseColor)};
        ChangeQuickRedirect changeQuickRedirect2 = changeQuickRedirect;
        Class cls = Integer.TYPE;
        PatchProxyResult proxy = PatchProxy.proxy(objArr, crowdfundBaseItemView, changeQuickRedirect2, false, 292353, new Class[]{Long.TYPE, cls, String.class, cls}, CharSequence.class);
        if (proxy.isSupported) {
            return (CharSequence) proxy.result;
        }
        long ceil = (long) ((float) Math.ceil((double) (((float) j) / 1000.0f)));
        SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder();
        if (parseColor == -1 || ceil >= ((long) 86400)) {
            crowdfundBaseItemView.a(spannableStringBuilder, ceil, str2, b2);
        } else {
            ForegroundColorSpan foregroundColorSpan = new ForegroundColorSpan(parseColor);
            int length = spannableStringBuilder.length();
            crowdfundBaseItemView.a(spannableStringBuilder, ceil, str2, b2);
            spannableStringBuilder.setSpan(foregroundColorSpan, length, spannableStringBuilder.length(), 17);
        }
        return new SpannedString(spannableStringBuilder);
    }

    private final MallViewCountDownHelper getCountDownHelper() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 292344, new Class[0], MallViewCountDownHelper.class);
        return (MallViewCountDownHelper) (proxy.isSupported ? proxy.result : this.e.getValue());
    }

    public final SpannableStringBuilder a(SpannableStringBuilder spannableStringBuilder, long j, String str, int i) {
        boolean z = true;
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{spannableStringBuilder, new Long(j), str, new Integer(i)}, this, changeQuickRedirect, false, 292354, new Class[]{SpannableStringBuilder.class, Long.TYPE, String.class, Integer.TYPE}, SpannableStringBuilder.class);
        if (proxy.isSupported) {
            return (SpannableStringBuilder) proxy.result;
        }
        if (str != null && !StringsKt__StringsJVMKt.isBlank(str)) {
            z = false;
        }
        if (!z) {
            spannableStringBuilder.append((CharSequence) str);
            o.a(spannableStringBuilder, i, 0, 2);
        }
        long j12 = (long) 86400;
        if (j >= j12) {
            o.a(spannableStringBuilder.append((CharSequence) String.valueOf(j / j12)), i, 0, 2).append((CharSequence) "天");
        } else {
            long j13 = (long) 3600;
            if (j > j13) {
                o.a(spannableStringBuilder.append((CharSequence) d(j / j13)), i, 0, 2).append((CharSequence) "时");
                o.a(spannableStringBuilder, i, 0, 2);
                o.a(spannableStringBuilder.append((CharSequence) d((j % j13) / ((long) 60))), i, 0, 2).append((CharSequence) "分");
            } else {
                long j14 = (long) 60;
                if (j > j14) {
                    o.a(spannableStringBuilder.append((CharSequence) d(j / j14)), i, 0, 2).append((CharSequence) "分");
                    o.a(spannableStringBuilder, i, 0, 2);
                    o.a(spannableStringBuilder.append((CharSequence) d(j % j14)), i, 0, 2).append((CharSequence) "秒");
                } else {
                    o.a(spannableStringBuilder.append((CharSequence) String.valueOf(j)), i, 0, 2).append((CharSequence) "秒");
                }
            }
        }
        return spannableStringBuilder;
    }

    @NotNull
    public final String b(int i) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 292352, new Class[]{Integer.TYPE}, String.class);
        if (proxy.isSupported) {
            return (String) proxy.result;
        }
        if (i >= 1000000) {
            StringBuilder sb2 = new StringBuilder();
            sb2.append(i / 10000);
            sb2.append((char) 19975);
            return sb2.toString();
        } else if (i < 10000) {
            return String.valueOf(i);
        } else {
            StringBuilder sb3 = new StringBuilder();
            StringCompanionObject stringCompanionObject = StringCompanionObject.INSTANCE;
            sb3.append(String.format("%.1f", Arrays.copyOf(new Object[]{Float.valueOf(((float) i) / 10000.0f)}, 1)));
            sb3.append("万");
            return sb3.toString();
        }
    }

    public final String d(long j) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Long(j)}, this, changeQuickRedirect, false, 292355, new Class[]{Long.TYPE}, String.class);
        if (proxy.isSupported) {
            return (String) proxy.result;
        }
        if (j >= ((long) 10)) {
            return String.valueOf(j);
        }
        StringBuilder sb2 = new StringBuilder();
        sb2.append('0');
        sb2.append(j);
        return sb2.toString();
    }

    @NotNull
    public final String e(@NotNull CrowdfundItemModel crowdfundItemModel) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{crowdfundItemModel}, this, changeQuickRedirect, false, 292365, new Class[]{CrowdfundItemModel.class}, String.class);
        if (proxy.isSupported) {
            return (String) proxy.result;
        }
        StringBuilder h12 = f.h("https://m.poizon.com/router/product/ProductDetailV3?spuId=");
        h12.append(crowdfundItemModel.getSpuId());
        return h12.toString();
    }

    public final void f(@NotNull String str, @NotNull String str2, boolean z, @NotNull Function1<? super Boolean, Unit> function1) {
        if (!PatchProxy.proxy(new Object[]{str, str2, new Byte(z ? (byte) 1 : 0), function1}, this, changeQuickRedirect, false, 292356, new Class[]{String.class, String.class, Boolean.TYPE, Function1.class}, Void.TYPE).isSupported) {
            Function2<? super String, ? super Boolean, Unit> function2 = this.f23554g;
            if (function2 != null) {
                function2.invoke(str, Boolean.TRUE);
            }
            LoginHelper.j(getContext(), new CrowdfundBaseItemView$handleSubscribe$1(this, z, str, str2, function1));
        }
    }

    public void g(long j) {
        boolean z = PatchProxy.proxy(new Object[]{new Long(j)}, this, changeQuickRedirect, false, 292350, new Class[]{Long.TYPE}, Void.TYPE).isSupported;
    }

    public final int getCOLOR_14151A() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 292341, new Class[0], Integer.TYPE);
        return proxy.isSupported ? ((Integer) proxy.result).intValue() : this.b;
    }

    public final int getCOLOR_C7C7D7() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 292343, new Class[0], Integer.TYPE);
        return proxy.isSupported ? ((Integer) proxy.result).intValue() : this.d;
    }

    public final int getCOLOR_F5F5F9() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 292342, new Class[0], Integer.TYPE);
        return proxy.isSupported ? ((Integer) proxy.result).intValue() : this.f23553c;
    }

    public long getCountDownTime() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 292351, new Class[0], Long.TYPE);
        if (proxy.isSupported) {
            return ((Long) proxy.result).longValue();
        }
        CrowdfundItemModel crowdfundItemModel = (CrowdfundItemModel) getData();
        if (crowdfundItemModel != null) {
            return crowdfundItemModel.getRealRemainTime();
        }
        return -1;
    }

    /* JADX DEBUG: Type inference failed for r0v2. Raw type applied. Possible types: kotlin.jvm.functions.Function2<? super java.lang.String, ? super java.lang.Boolean, kotlin.Unit>, kotlin.jvm.functions.Function2<java.lang.String, java.lang.Boolean, kotlin.Unit> */
    @Nullable
    public final Function2<String, Boolean, Unit> getSubscribeCb() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 292347, new Class[0], Function2.class);
        return proxy.isSupported ? (Function2) proxy.result : this.f23554g;
    }

    @Nullable
    public final Function0<String> getTabName() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 292345, new Class[0], Function0.class);
        return proxy.isSupported ? (Function0) proxy.result : this.f;
    }

    public final void h(@NotNull String str, @NotNull String str2, boolean z, @NotNull Function1<? super Boolean, Unit> function1, @NotNull Function0<Unit> function0) {
        if (!PatchProxy.proxy(new Object[]{str, str2, new Byte(z ? (byte) 1 : 0), function1, function0}, this, changeQuickRedirect, false, 292357, new Class[]{String.class, String.class, Boolean.TYPE, Function1.class, Function0.class}, Void.TYPE).isSupported) {
            function1.invoke(Boolean.valueOf(!z ? 1 : 0));
            ProductFacadeV2.f23068a.d0(str, str2, z ? 1 : 0, new a(this, function1, z, function0, this));
        }
    }

    /* renamed from: i */
    public void update(@NotNull CrowdfundItemModel crowdfundItemModel) {
        if (!PatchProxy.proxy(new Object[]{crowdfundItemModel}, this, changeQuickRedirect, false, 292349, new Class[]{CrowdfundItemModel.class}, Void.TYPE).isSupported) {
            super.update(crowdfundItemModel);
            long countDownTime = getCountDownTime();
            if (countDownTime > 0) {
                getCountDownHelper().c(countDownTime, 1000, new b(this));
            } else {
                getCountDownHelper().e();
            }
        }
    }

    public final void j(@NotNull CrowdfundItemModel crowdfundItemModel) {
        if (!PatchProxy.proxy(new Object[]{crowdfundItemModel}, this, changeQuickRedirect, false, 292361, new Class[]{CrowdfundItemModel.class}, Void.TYPE).isSupported) {
            i60.b bVar = i60.b.f33293a;
            ArrayMap arrayMap = new ArrayMap(8);
            arrayMap.put("block_content_id", crowdfundItemModel.getSpuId());
            arrayMap.put("block_content_title", crowdfundItemModel.getTitle());
            arrayMap.put("block_content_position", Integer.valueOf(ModuleAdapterDelegateKt.b(this) + 1));
            arrayMap.put("block_content_url", e(crowdfundItemModel));
            Function0<String> function0 = this.f;
            arrayMap.put("block_title", function0 != null ? function0.invoke() : null);
            bVar.b("trade_crowd_block_click", "789", "170", arrayMap);
        }
    }

    public final void k(@NotNull CrowdfundItemModel crowdfundItemModel) {
        if (!PatchProxy.proxy(new Object[]{crowdfundItemModel}, this, changeQuickRedirect, false, 292364, new Class[]{CrowdfundItemModel.class}, Void.TYPE).isSupported) {
            i60.b bVar = i60.b.f33293a;
            ArrayMap arrayMap = new ArrayMap(8);
            arrayMap.put("block_content_id", crowdfundItemModel.getSpuId());
            arrayMap.put("block_content_title", crowdfundItemModel.getTitle());
            arrayMap.put("block_content_position", Integer.valueOf(ModuleAdapterDelegateKt.b(this) + 1));
            arrayMap.put("button_title", crowdfundItemModel.isSubscribed() ? "已预约" : "预约");
            bVar.b("trade_crowd_block_click", "789", "1787", arrayMap);
        }
    }

    public final void l(@NotNull CrowdfundItemModel crowdfundItemModel) {
        if (!PatchProxy.proxy(new Object[]{crowdfundItemModel}, this, changeQuickRedirect, false, 292363, new Class[]{CrowdfundItemModel.class}, Void.TYPE).isSupported) {
            i60.b bVar = i60.b.f33293a;
            ArrayMap arrayMap = new ArrayMap(8);
            arrayMap.put("block_content_id", crowdfundItemModel.getSpuId());
            arrayMap.put("block_content_title", crowdfundItemModel.getTitle());
            arrayMap.put("block_content_position", Integer.valueOf(ModuleAdapterDelegateKt.b(this) + 1));
            arrayMap.put("button_title", crowdfundItemModel.isSubscribed() ? "已预约" : "预约");
            bVar.b("trade_crowd_block_exposure", "789", "1787", arrayMap);
        }
    }

    @Override // com.shizhuang.duapp.common.component.module.IModuleExposureObserver
    public void onExposure(@Nullable DuExposureHelper.State state) {
        CrowdfundItemModel crowdfundItemModel;
        if (PatchProxy.proxy(new Object[]{state}, this, changeQuickRedirect, false, 292360, new Class[]{DuExposureHelper.State.class}, Void.TYPE).isSupported || (crowdfundItemModel = (CrowdfundItemModel) getData()) == null) {
            return;
        }
        if (!PatchProxy.proxy(new Object[]{crowdfundItemModel}, this, changeQuickRedirect, false, 292362, new Class[]{CrowdfundItemModel.class}, Void.TYPE).isSupported) {
            i60.b bVar = i60.b.f33293a;
            ArrayMap arrayMap = new ArrayMap(8);
            arrayMap.put("block_content_id", crowdfundItemModel.getSpuId());
            arrayMap.put("block_content_title", crowdfundItemModel.getTitle());
            arrayMap.put("block_content_position", Integer.valueOf(ModuleAdapterDelegateKt.b(this) + 1));
            arrayMap.put("block_content_url", e(crowdfundItemModel));
            Function0<String> function0 = this.f;
            arrayMap.put("block_title", function0 != null ? function0.invoke() : null);
            bVar.b("trade_crowd_block_exposure", "789", "170", arrayMap);
        }
    }

    public final void setSubscribeCb(@Nullable Function2<? super String, ? super Boolean, Unit> function2) {
        if (!PatchProxy.proxy(new Object[]{function2}, this, changeQuickRedirect, false, 292348, new Class[]{Function2.class}, Void.TYPE).isSupported) {
            this.f23554g = function2;
        }
    }

    public final void setTabName(@Nullable Function0<String> function0) {
        if (!PatchProxy.proxy(new Object[]{function0}, this, changeQuickRedirect, false, 292346, new Class[]{Function0.class}, Void.TYPE).isSupported) {
            this.f = function0;
        }
    }

    @JvmOverloads
    public CrowdfundBaseItemView(@NotNull Context context, @Nullable AttributeSet attributeSet) {
        this(context, attributeSet, 0);
    }

    @JvmOverloads
    public CrowdfundBaseItemView(@NotNull Context context, @Nullable AttributeSet attributeSet, int i) {
        super(context, attributeSet, i);
        this.b = ContextCompat.getColor(context, R.color.black_14151A);
        this.f23553c = ContextCompat.getColor(context, R.color.color_gray_f5f5f9);
        this.d = ContextCompat.getColor(context, R.color.color_gray_c7c7d7);
        this.e = LazyKt__LazyJVMKt.lazy(new CrowdfundBaseItemView$countDownHelper$2(this));
    }
}