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


package com.shizhuang.duapp.modules.live.common.dialog;

import android.content.Context;
import android.view.View;
import android.widget.ImageView;
import androidx.constraintlayout.widget.ConstraintLayout;
import com.lxj.xpopup.core.AttachPopupView;
import com.lxj.xpopup.core.BottomPopupView;
import com.lxj.xpopup.core.CenterPopupView;
import com.lxj.xpopup.core.ImageViewerPopupView;
import com.lxj.xpopup.core.PositionPopupView;
import com.lxj.xpopup.enums.PopupAnimation;
import com.lxj.xpopup.enums.PopupType;
import com.lxj.xpopup.impl.FullScreenPopupView;
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.common.model.AnchorSurveyViewModel;
import com.shizhuang.duapp.modules.live.common.widget.view.DuShapeView;
import ea.b;
import java.util.HashMap;
import kotlin.Metadata;
import kotlin.jvm.JvmOverloads;
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\u0010\u000b\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u0007\u0018\u00002\u00020\u0001:\u0001\u0012J\b\u0010\u0003\u001a\u00020\u0002H\u0014R\"\u0010\u000b\u001a\u00020\u00048\u0006@\u0006X†\u000e¢\u0006\u0012\n\u0004\b\u0005\u0010\u0006\u001a\u0004\b\u0007\u0010\b\"\u0004\b\t\u0010\nR\u0019\u0010\u0011\u001a\u0004\u0018\u00010\f8\u0006¢\u0006\f\n\u0004\b\r\u0010\u000e\u001a\u0004\b\u000f\u0010\u0010¨\u0006\u0013"}, d2 = {"Lcom/shizhuang/duapp/modules/live/common/dialog/LiveAnchorSurveyDialog;", "Lcom/lxj/xpopup/impl/FullScreenPopupView;", "", "getImplLayoutId", "", "w", "Z", "getConfirmDismiss", "()Z", "setConfirmDismiss", "(Z)V", "confirmDismiss", "Lcom/shizhuang/duapp/modules/live/common/model/AnchorSurveyViewModel;", "x", "Lcom/shizhuang/duapp/modules/live/common/model/AnchorSurveyViewModel;", "getModel", "()Lcom/shizhuang/duapp/modules/live/common/model/AnchorSurveyViewModel;", "model", "a", "du_live_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: LiveAnchorSurveyDialog.kt */
public final class LiveAnchorSurveyDialog extends FullScreenPopupView {
    public static ChangeQuickRedirect changeQuickRedirect;
    @NotNull
    public static final a z = new a(null);
    public boolean w;
    @Nullable
    public final AnchorSurveyViewModel x;
    public HashMap y;

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

        public a(DefaultConstructorMarker defaultConstructorMarker) {
        }

        @NotNull
        public final LiveAnchorSurveyDialog a(@NotNull Context context, @NotNull AnchorSurveyViewModel anchorSurveyViewModel) {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[]{context, anchorSurveyViewModel}, this, changeQuickRedirect, false, 192316, new Class[]{Context.class, AnchorSurveyViewModel.class}, LiveAnchorSurveyDialog.class);
            if (proxy.isSupported) {
                return (LiveAnchorSurveyDialog) proxy.result;
            }
            b bVar = new b();
            bVar.n = 2;
            bVar.d = PopupAnimation.ScaleAlphaFromCenter;
            bVar.i = true;
            Boolean bool = Boolean.TRUE;
            bVar.f31770a = bool;
            bVar.b = bool;
            LiveAnchorSurveyDialog liveAnchorSurveyDialog = new LiveAnchorSurveyDialog(context, anchorSurveyViewModel);
            if (liveAnchorSurveyDialog instanceof CenterPopupView) {
                PopupType popupType = PopupType.Center;
            } else if (liveAnchorSurveyDialog instanceof BottomPopupView) {
                PopupType popupType2 = PopupType.Bottom;
            } else if (liveAnchorSurveyDialog instanceof AttachPopupView) {
                PopupType popupType3 = PopupType.AttachView;
            } else if (liveAnchorSurveyDialog instanceof ImageViewerPopupView) {
                PopupType popupType4 = PopupType.ImageViewer;
            } else if (liveAnchorSurveyDialog instanceof PositionPopupView) {
                PopupType popupType5 = PopupType.Position;
            }
            liveAnchorSurveyDialog.b = bVar;
            return liveAnchorSurveyDialog;
        }
    }

    @JvmOverloads
    public LiveAnchorSurveyDialog(@NotNull Context context) {
        super(context);
        this.x = null;
    }

    @Override // com.lxj.xpopup.core.BasePopupView
    public void b() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 192311, new Class[0], Void.TYPE).isSupported) {
            ((DuImageLoaderView) q(R.id.dlHead)).i("https://apk.poizon.com/duApp/Android_Config/resource/live/img/du_live_anchor_survey_head_bg.png").x();
            ((DuShapeView) q(R.id.tvConfirm)).setOnClickListener(new LiveAnchorSurveyDialog$beforeShow$1(this));
            ViewExtensionKt.j((ConstraintLayout) q(R.id.ctRootContainer), 0, new LiveAnchorSurveyDialog$beforeShow$2(this), 1);
            ViewExtensionKt.j((ImageView) q(R.id.ivClose), 0, new LiveAnchorSurveyDialog$beforeShow$3(this), 1);
            mq0.b.c("community_live_anchor_block_exposure", "1559", null, new LiveAnchorSurveyDialog$beforeShow$4(this), 4);
        }
    }

    public final boolean getConfirmDismiss() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 192308, new Class[0], Boolean.TYPE);
        return proxy.isSupported ? ((Boolean) proxy.result).booleanValue() : this.w;
    }

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

    @Nullable
    public final AnchorSurveyViewModel getModel() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 192313, new Class[0], AnchorSurveyViewModel.class);
        return proxy.isSupported ? (AnchorSurveyViewModel) proxy.result : this.x;
    }

    @Override // com.lxj.xpopup.core.BasePopupView
    public void n() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 192312, new Class[0], Void.TYPE).isSupported) {
            mq0.b.e(mq0.b.f35739a, "community_live_anchor_block_click", "1559", null, new LiveAnchorSurveyDialog$onDismiss$1(this), 4);
        }
    }

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

    public final void setConfirmDismiss(boolean z4) {
        if (!PatchProxy.proxy(new Object[]{new Byte(z4 ? (byte) 1 : 0)}, this, changeQuickRedirect, false, 192309, new Class[]{Boolean.TYPE}, Void.TYPE).isSupported) {
            this.w = z4;
        }
    }

    @JvmOverloads
    public LiveAnchorSurveyDialog(@NotNull Context context, @Nullable AnchorSurveyViewModel anchorSurveyViewModel) {
        super(context);
        this.x = anchorSurveyViewModel;
    }
}