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


package com.shizhuang.duapp.modules.live.audience.detail.widget.anniversary;

import android.content.Context;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.lifecycle.MutableLiveData;
import com.lxj.xpopup.core.CenterPopupView;
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.libs.duimageloaderview.DuImageLoaderView;
import com.shizhuang.duapp.modules.live.audience.detail.viewmodel.LiveItemViewModel;
import com.shizhuang.duapp.modules.live.common.model.AnniversaryModel;
import com.shizhuang.duapp.modules.live.common.model.live.LiveRoom;
import java.util.HashMap;
import kotlin.Metadata;
import kotlin.jvm.internal.DefaultConstructorMarker;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

@Metadata(bv = {}, d1 = {"\u0000\u001e\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u0005\u0018\u00002\u00020\u0001:\u0001\u0010B\u000f\u0012\u0006\u0010\r\u001a\u00020\f¢\u0006\u0004\b\u000e\u0010\u000fJ\b\u0010\u0003\u001a\u00020\u0002H\u0014R$\u0010\u000b\u001a\u0004\u0018\u00010\u00048\u0006@\u0006X†\u000e¢\u0006\u0012\n\u0004\b\u0005\u0010\u0006\u001a\u0004\b\u0007\u0010\b\"\u0004\b\t\u0010\n¨\u0006\u0011"}, d2 = {"Lcom/shizhuang/duapp/modules/live/audience/detail/widget/anniversary/AnniversaryFirstRewardXpDialog;", "Lcom/lxj/xpopup/core/CenterPopupView;", "", "getImplLayoutId", "Lcom/shizhuang/duapp/modules/live/common/model/AnniversaryModel;", "w", "Lcom/shizhuang/duapp/modules/live/common/model/AnniversaryModel;", "getAnniversaryModel", "()Lcom/shizhuang/duapp/modules/live/common/model/AnniversaryModel;", "setAnniversaryModel", "(Lcom/shizhuang/duapp/modules/live/common/model/AnniversaryModel;)V", "anniversaryModel", "Landroid/content/Context;", "context", "<init>", "(Landroid/content/Context;)V", "a", "du_live_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: AnniversaryFirstRewardXpDialog.kt */
public final class AnniversaryFirstRewardXpDialog extends CenterPopupView {
    public static ChangeQuickRedirect changeQuickRedirect;
    @NotNull
    public static final a y = new a(null);
    @Nullable
    public AnniversaryModel w;
    public HashMap x;

    /* compiled from: AnniversaryFirstRewardXpDialog.kt */
    public static final class a {
        public static ChangeQuickRedirect changeQuickRedirect;

        public a(DefaultConstructorMarker defaultConstructorMarker) {
        }
    }

    public AnniversaryFirstRewardXpDialog(@NotNull Context context) {
        super(context);
    }

    @Override // com.lxj.xpopup.core.BasePopupView
    public void b() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 189108, new Class[0], Void.TYPE).isSupported) {
            ((DuImageLoaderView) s(R.id.poizonLogo)).g("https://apk.poizon.com/duApp/Android_Config/live/assets/live_bg_fans_join_anniversary_button.png");
        }
    }

    @Nullable
    public final AnniversaryModel getAnniversaryModel() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 189105, new Class[0], AnniversaryModel.class);
        return proxy.isSupported ? (AnniversaryModel) proxy.result : this.w;
    }

    @Override // com.lxj.xpopup.core.BasePopupView, com.lxj.xpopup.core.CenterPopupView
    public int getImplLayoutId() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 189109, new Class[0], Integer.TYPE);
        return proxy.isSupported ? ((Integer) proxy.result).intValue() : R.layout.anniversary_first_reward_view;
    }

    @Override // com.lxj.xpopup.core.BasePopupView
    public void onCreate() {
        MutableLiveData<LiveRoom> liveRoom;
        LiveRoom value;
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 189107, new Class[0], Void.TYPE).isSupported) {
            LiveItemViewModel o = hl0.a.f33089a.o();
            Integer valueOf = (o == null || (liveRoom = o.getLiveRoom()) == null || (value = liveRoom.getValue()) == null) ? null : Integer.valueOf(value.streamLogId);
            ViewExtensionKt.i((ImageView) s(R.id.close), 1000, new AnniversaryFirstRewardXpDialog$onCreate$1(this, valueOf));
            ViewExtensionKt.j((TextView) s(R.id.acceptAndJoin), 0, new AnniversaryFirstRewardXpDialog$onCreate$2(this, valueOf), 1);
        }
    }

    public View s(int i) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 189110, new Class[]{Integer.TYPE}, View.class);
        if (proxy.isSupported) {
            return (View) proxy.result;
        }
        if (this.x == null) {
            this.x = new HashMap();
        }
        View view = (View) this.x.get(Integer.valueOf(i));
        if (view != null) {
            return view;
        }
        View findViewById = findViewById(i);
        this.x.put(Integer.valueOf(i), findViewById);
        return findViewById;
    }

    public final void setAnniversaryModel(@Nullable AnniversaryModel anniversaryModel) {
        if (!PatchProxy.proxy(new Object[]{anniversaryModel}, this, changeQuickRedirect, false, 189106, new Class[]{AnniversaryModel.class}, Void.TYPE).isSupported) {
            this.w = anniversaryModel;
        }
    }
}