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


package com.shizhuang.duapp.modules.growth_order.shareorder;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.TextView;
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.modules.growth_order.shareorder.listener.BottomOperateInterface;
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.c;

@Metadata(bv = {}, d1 = {"\u0000\u001c\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0002\b\u0004\u0018\u00002\u00020\u0001B'\b\u0007\u0012\u0006\u0010\u0003\u001a\u00020\u0002\u0012\n\b\u0002\u0010\u0005\u001a\u0004\u0018\u00010\u0004\u0012\b\b\u0002\u0010\u0007\u001a\u00020\u0006¢\u0006\u0004\b\b\u0010\t¨\u0006\n"}, d2 = {"Lcom/shizhuang/duapp/modules/growth_order/shareorder/GreetingBottomButtonView;", "Landroid/widget/FrameLayout;", "Landroid/content/Context;", "context", "Landroid/util/AttributeSet;", "attrs", "", "defStyleAttr", "<init>", "(Landroid/content/Context;Landroid/util/AttributeSet;I)V", "du_growth_order_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: GreetingBottomButtonView.kt */
public final class GreetingBottomButtonView extends FrameLayout {
    public static ChangeQuickRedirect changeQuickRedirect;
    public int b;

    /* renamed from: c  reason: collision with root package name */
    public final View f15688c;
    public BottomOperateInterface d;
    public final int e;
    public HashMap f;

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

    public View a(int i) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 153680, 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;
    }

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

    @JvmOverloads
    public GreetingBottomButtonView(@NotNull final Context context, @Nullable AttributeSet attributeSet, int i) {
        super(context, attributeSet, i);
        this.b = -1;
        this.f15688c = LayoutInflater.from(context).inflate(R.layout.view_bottom_button, this);
        this.e = 222;
        ViewExtensionKt.h(a(R.id.viewButtonLeft), new Function1<View, Unit>(this) {
            /* class com.shizhuang.duapp.modules.growth_order.shareorder.GreetingBottomButtonView.AnonymousClass1 */
            public static ChangeQuickRedirect changeQuickRedirect;
            public final /* synthetic */ GreetingBottomButtonView 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) {
                BottomOperateInterface bottomOperateInterface;
                if (!PatchProxy.proxy(new Object[]{view}, this, changeQuickRedirect, false, 153682, new Class[]{View.class}, Void.TYPE).isSupported) {
                    GreetingBottomButtonView greetingBottomButtonView = this.this$0;
                    int i = greetingBottomButtonView.b;
                    if (i == 0) {
                        c.c().b("https://cdn-fast.dewu.com/nezha-plus/detail/629f10902370c701121e2271").f(context);
                    } else if (i == greetingBottomButtonView.e && (bottomOperateInterface = greetingBottomButtonView.d) != null) {
                        bottomOperateInterface.exitEdit();
                    }
                }
            }
        });
        ViewExtensionKt.h((TextView) a(R.id.tvButtonRight), new Function1<View, Unit>(this) {
            /* class com.shizhuang.duapp.modules.growth_order.shareorder.GreetingBottomButtonView.AnonymousClass2 */
            public static ChangeQuickRedirect changeQuickRedirect;
            public final /* synthetic */ GreetingBottomButtonView 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) {
                BottomOperateInterface bottomOperateInterface;
                if (!PatchProxy.proxy(new Object[]{view}, this, changeQuickRedirect, false, 153683, new Class[]{View.class}, Void.TYPE).isSupported) {
                    GreetingBottomButtonView greetingBottomButtonView = this.this$0;
                    int i = greetingBottomButtonView.b;
                    if (i == 0) {
                        greetingBottomButtonView.setVisibility(8);
                        BottomOperateInterface bottomOperateInterface2 = this.this$0.d;
                        if (bottomOperateInterface2 != null) {
                            bottomOperateInterface2.confirmMake();
                        }
                    } else if (i == greetingBottomButtonView.e && (bottomOperateInterface = greetingBottomButtonView.d) != null) {
                        bottomOperateInterface.confirmEdit();
                    }
                }
            }
        });
        ViewExtensionKt.h((TextView) a(R.id.tvButtonRightLong), new Function1<View, Unit>(this) {
            /* class com.shizhuang.duapp.modules.growth_order.shareorder.GreetingBottomButtonView.AnonymousClass3 */
            public static ChangeQuickRedirect changeQuickRedirect;
            public final /* synthetic */ GreetingBottomButtonView 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) {
                if (!PatchProxy.proxy(new Object[]{view}, this, changeQuickRedirect, false, 153684, new Class[]{View.class}, Void.TYPE).isSupported) {
                    this.this$0.setVisibility(8);
                    BottomOperateInterface bottomOperateInterface = this.this$0.d;
                    if (bottomOperateInterface != null) {
                        bottomOperateInterface.confirmMake();
                    }
                }
            }
        });
    }
}