得物.apk(点击下载) / ShareGreetingCardFragment$createProtocolDialog$1.java
package com.shizhuang.duapp.modules.growth_order.shareorder;
import android.graphics.drawable.Drawable;
import android.view.View;
import android.widget.CompoundButton;
import android.widget.TextView;
import androidx.appcompat.widget.AppCompatCheckBox;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.FragmentActivity;
import com.meituan.robust.ChangeQuickRedirect;
import com.meituan.robust.PatchProxy;
import com.sensorsdata.analytics.android.sdk.SensorsDataAutoTrackHelper;
import com.sensorsdata.analytics.android.sdk.SensorsDataInstrumented;
import com.shizhuang.duapp.R;
import com.shizhuang.duapp.common.dialog.commondialog.IDialog;
import com.shizhuang.duapp.common.extension.ViewExtensionKt;
import com.shizhuang.duapp.modules.growth_order.shareorder.models.GiftCardModel;
import com.shizhuang.duapp.modules.growth_order.shareorder.models.GiftSingleInfo;
import com.shizhuang.duapp.modules.growth_order.shareorder.models.GiftWrappingModel;
import df.q;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
import nd0.h;
import org.jetbrains.annotations.NotNull;
import u91.c;
/* compiled from: ShareGreetingCardFragment.kt */
public final class ShareGreetingCardFragment$createProtocolDialog$1 implements IDialog.OnBuildListener {
public static ChangeQuickRedirect changeQuickRedirect;
/* renamed from: a reason: collision with root package name */
public final /* synthetic */ ShareGreetingCardFragment f15709a;
/* compiled from: ShareGreetingCardFragment.kt */
public static final class a implements CompoundButton.OnCheckedChangeListener {
public static ChangeQuickRedirect changeQuickRedirect;
/* renamed from: a reason: collision with root package name */
public final /* synthetic */ ShareGreetingCardFragment$createProtocolDialog$1 f15710a;
public a(ShareGreetingCardFragment$createProtocolDialog$1 shareGreetingCardFragment$createProtocolDialog$1) {
this.f15710a = shareGreetingCardFragment$createProtocolDialog$1;
}
@SensorsDataInstrumented
public final void onCheckedChanged(CompoundButton compoundButton, boolean z) {
Drawable drawable;
if (!PatchProxy.proxy(new Object[]{compoundButton, new Byte(z ? (byte) 1 : 0)}, this, changeQuickRedirect, false, 153871, new Class[]{CompoundButton.class, Boolean.TYPE}, Void.TYPE).isSupported) {
FragmentActivity activity = this.f15710a.f15709a.getActivity();
if (activity != null) {
if (z) {
drawable = ContextCompat.getDrawable(activity, R.drawable.icon_checked);
} else {
drawable = ContextCompat.getDrawable(activity, R.drawable.icon_check_line);
}
compoundButton.setBackground(drawable);
}
SensorsDataAutoTrackHelper.trackViewOnClick(compoundButton);
}
}
}
public ShareGreetingCardFragment$createProtocolDialog$1(ShareGreetingCardFragment shareGreetingCardFragment) {
this.f15709a = shareGreetingCardFragment;
}
@Override // com.shizhuang.duapp.common.dialog.commondialog.IDialog.OnBuildListener
public final void onBuildChildView(final IDialog iDialog, final View view, int i) {
if (!PatchProxy.proxy(new Object[]{iDialog, view, new Integer(i)}, this, changeQuickRedirect, false, 153869, new Class[]{IDialog.class, View.class, Integer.TYPE}, Void.TYPE).isSupported) {
ViewExtensionKt.h((TextView) view.findViewById(R.id.tvAgreeContent), new Function1<View, Unit>(this) {
/* class com.shizhuang.duapp.modules.growth_order.shareorder.ShareGreetingCardFragment$createProtocolDialog$1.AnonymousClass1 */
public static ChangeQuickRedirect changeQuickRedirect;
public final /* synthetic */ ShareGreetingCardFragment$createProtocolDialog$1 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, 153870, new Class[]{View.class}, Void.TYPE).isSupported) {
c.c().b("https://fast.dewu.com/nezha-plus/detail/60ed73215c3873534ca677c0").f(this.this$0.f15709a.getContext());
}
}
});
((AppCompatCheckBox) view.findViewById(R.id.checkbox)).setOnCheckedChangeListener(new a(this));
ViewExtensionKt.h((TextView) view.findViewById(R.id.tv_cancel), new Function1<View, Unit>() {
/* class com.shizhuang.duapp.modules.growth_order.shareorder.ShareGreetingCardFragment$createProtocolDialog$1.AnonymousClass3 */
public static ChangeQuickRedirect changeQuickRedirect;
/* 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, 153872, new Class[]{View.class}, Void.TYPE).isSupported) {
iDialog.dismiss();
}
}
});
ViewExtensionKt.h((TextView) view.findViewById(R.id.tv_ok), new Function1<View, Unit>(this) {
/* class com.shizhuang.duapp.modules.growth_order.shareorder.ShareGreetingCardFragment$createProtocolDialog$1.AnonymousClass4 */
public static ChangeQuickRedirect changeQuickRedirect;
public final /* synthetic */ ShareGreetingCardFragment$createProtocolDialog$1 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) {
GiftSingleInfo subOrderInfo;
GiftCardModel cardInfo;
if (!PatchProxy.proxy(new Object[]{view}, this, changeQuickRedirect, false, 153873, new Class[]{View.class}, Void.TYPE).isSupported) {
if (((AppCompatCheckBox) view.findViewById(R.id.checkbox)).isChecked()) {
GiftWrappingModel giftWrappingModel = this.this$0.f15709a.b;
Integer editable = (giftWrappingModel == null || (subOrderInfo = giftWrappingModel.getSubOrderInfo()) == null || (cardInfo = subOrderInfo.getCardInfo()) == null) ? null : cardInfo.getEditable();
if (editable != null && editable.intValue() == 1) {
ShareGreetingCardFragment shareGreetingCardFragment = this.this$0.f15709a;
if (!PatchProxy.proxy(new Object[0], shareGreetingCardFragment, ShareGreetingCardFragment.changeQuickRedirect, false, 153820, new Class[0], Void.TYPE).isSupported) {
if (shareGreetingCardFragment.m) {
shareGreetingCardFragment.z();
} else {
dd0.a.f31413a.k(new h(shareGreetingCardFragment, shareGreetingCardFragment));
}
}
iDialog.dismiss();
return;
}
q.v("超出心意贺卡可编辑时间范围", 0);
iDialog.dismiss();
return;
}
q.v("需要勾选协议才能确认提交哦~", 0);
}
}
});
}
}
}