Kufar v3.2.0版本的 MD5 值为:6a4d203db1c561c7e3bcd50d23fed59f
以下内容为反编译后的 PayCardFragment.java 源代码,内容仅作参考
package by.kufar.vas.ui.vas.bump.screen.payCard;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ViewAnimator;
import androidx.compose.runtime.internal.StabilityInferred;
import androidx.core.os.BundleKt;
import androidx.core.view.KeyEventDispatcher;
import androidx.core.view.ViewGroupKt;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentResultListener;
import androidx.fragment.app.FragmentViewModelLazyKt;
import androidx.graphics.OnBackPressedCallback;
import androidx.graphics.OnBackPressedDispatcher;
import androidx.graphics.OnBackPressedDispatcherKt;
import androidx.lifecycle.HasDefaultViewModelProviderFactory;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProvider;
import androidx.lifecycle.ViewModelStore;
import androidx.lifecycle.ViewModelStoreOwner;
import androidx.lifecycle.viewmodel.CreationExtras;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import by.kufar.core.android.fragment.BaseFragment;
import by.kufar.feature.toggles.FeatureToggles;
import by.kufar.re.ui.widget.button.ProgressButton;
import by.kufar.re.ui.widget.error.ErrorView;
import by.kufar.re.ui.widget.webview.WebViewActivity;
import by.kufar.vas.R$id;
import by.kufar.vas.R$layout;
import by.kufar.vas.R$string;
import by.kufar.vas.ui.SomethingGoesWrongDialog;
import by.kufar.vas.ui.vas.a;
import by.kufar.vas.ui.vas.bump.base.VasOffsetItemDecorator;
import by.kufar.vas.ui.vas.bump.screen.payCard.PayCardFragment;
import by.kufar.vas.ui.vas.bump.screen.payCard.PayCardVM;
import by.kufar.vas.ui.vas.bump.screen.payCard.adapter.PayCardController;
import com.begateway.mobilepayments.sdk.PaymentSdk;
import hp.d;
import java.io.Serializable;
import java.util.Iterator;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.g0;
import kotlin.jvm.internal.o0;
import kotlin.reflect.KProperty;
import op.e;
import sp.CardItem;
@StabilityInferred(parameters = 0)
@Metadata(d1 = {"\u0000¼\u0001\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\u000e\n\u0002\b\u0004\n\u0002\u0010\t\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\u000b\n\u0002\b\u0006\n\u0002\u0010\b\n\u0002\b\t\b\u0007\u0018\u0000 u2\u00020\u00012\u00020\u0002:\u0001vB\u0007¢\u0006\u0004\bs\u0010tJ\u0010\u0010\u0006\u001a\u00020\u00052\u0006\u0010\u0004\u001a\u00020\u0003H\u0002J\b\u0010\u0007\u001a\u00020\u0005H\u0002J\b\u0010\b\u001a\u00020\u0005H\u0002J\b\u0010\t\u001a\u00020\u0005H\u0002J\b\u0010\n\u001a\u00020\u0005H\u0002J\u0010\u0010\r\u001a\u00020\u00052\u0006\u0010\f\u001a\u00020\u000bH\u0002J\b\u0010\u000e\u001a\u00020\u0005H\u0002J\b\u0010\u000f\u001a\u00020\u0005H\u0016J&\u0010\u0017\u001a\u0004\u0018\u00010\u00162\u0006\u0010\u0011\u001a\u00020\u00102\b\u0010\u0013\u001a\u0004\u0018\u00010\u00122\b\u0010\u0015\u001a\u0004\u0018\u00010\u0014H\u0016J\u001a\u0010\u0019\u001a\u00020\u00052\u0006\u0010\u0018\u001a\u00020\u00162\b\u0010\u0015\u001a\u0004\u0018\u00010\u0014H\u0016J\b\u0010\u001a\u001a\u00020\u0005H\u0016J\b\u0010\u001b\u001a\u00020\u0005H\u0016J\u0010\u0010\u001e\u001a\u00020\u00052\u0006\u0010\u001d\u001a\u00020\u001cH\u0016J\u0010\u0010!\u001a\u00020\u00052\u0006\u0010 \u001a\u00020\u001fH\u0016J\b\u0010\"\u001a\u00020\u0005H\u0016R\"\u0010$\u001a\u00020#8\u0006@\u0006X\u0087.¢\u0006\u0012\n\u0004\b$\u0010%\u001a\u0004\b&\u0010'\"\u0004\b(\u0010)R\"\u0010+\u001a\u00020*8\u0006@\u0006X\u0087.¢\u0006\u0012\n\u0004\b+\u0010,\u001a\u0004\b-\u0010.\"\u0004\b/\u00100R\"\u00102\u001a\u0002018\u0006@\u0006X\u0087.¢\u0006\u0012\n\u0004\b2\u00103\u001a\u0004\b4\u00105\"\u0004\b6\u00107R\u001b\u0010=\u001a\u0002088BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b9\u0010:\u001a\u0004\b;\u0010<R\u001b\u0010C\u001a\u00020>8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b?\u0010@\u001a\u0004\bA\u0010BR\u001b\u0010H\u001a\u00020D8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\bE\u0010@\u001a\u0004\bF\u0010GR\u001b\u0010M\u001a\u00020I8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\bJ\u0010@\u001a\u0004\bK\u0010LR\u001b\u0010R\u001a\u00020N8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\bO\u0010:\u001a\u0004\bP\u0010QR\u001b\u0010W\u001a\u00020S8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\bT\u0010@\u001a\u0004\bU\u0010VR\u001b\u0010\\\u001a\u00020X8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\bY\u0010:\u001a\u0004\bZ\u0010[R\u001d\u0010a\u001a\u0004\u0018\u00010]8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b^\u0010:\u001a\u0004\b_\u0010`R\u001b\u0010f\u001a\u00020b8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\bc\u0010:\u001a\u0004\bd\u0010eR\u001b\u0010i\u001a\u00020g8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\bh\u0010:\u001a\u0004\bi\u0010jR\u001b\u0010m\u001a\u00020g8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\bk\u0010:\u001a\u0004\bl\u0010jR\u001b\u0010r\u001a\u00020n8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\bo\u0010:\u001a\u0004\bp\u0010q¨\u0006w"}, d2 = {"Lby/kufar/vas/ui/vas/bump/screen/payCard/PayCardFragment;", "Lby/kufar/core/android/fragment/BaseFragment;", "Lby/kufar/vas/ui/vas/bump/screen/payCard/adapter/PayCardController$a;", "Lop/e$a;", "url", "", "openWebBepaidActivity", "setUpObservers", "setUpTitle", "setUpButtons", "setUpRecycler", "Lby/kufar/vas/ui/vas/bump/screen/payCard/PayCardVM$b;", "state", "handleState", "showPayCardTipDialog", "onInject", "Landroid/view/LayoutInflater;", "inflater", "Landroid/view/ViewGroup;", "container", "Landroid/os/Bundle;", "savedInstanceState", "Landroid/view/View;", "onCreateView", "view", "onViewCreated", "onTipClick", "onDetailsClick", "Lsp/a;", "item", "onCardClick", "Lir/c;", "paymentType", "onInstallmentCardClick", "onAdCardClick", "Landroidx/lifecycle/ViewModelProvider$Factory;", "viewModelFactory", "Landroidx/lifecycle/ViewModelProvider$Factory;", "getViewModelFactory", "()Landroidx/lifecycle/ViewModelProvider$Factory;", "setViewModelFactory", "(Landroidx/lifecycle/ViewModelProvider$Factory;)V", "Lcb/b;", "mediator", "Lcb/b;", "getMediator", "()Lcb/b;", "setMediator", "(Lcb/b;)V", "Lxo/a;", "bumpTracker", "Lxo/a;", "getBumpTracker", "()Lxo/a;", "setBumpTracker", "(Lxo/a;)V", "Lby/kufar/vas/ui/vas/bump/screen/payCard/adapter/PayCardController;", "controller$delegate", "Ld80/j;", "getController", "()Lby/kufar/vas/ui/vas/bump/screen/payCard/adapter/PayCardController;", "controller", "Landroid/widget/ViewAnimator;", "animator$delegate", "Li6/c;", "getAnimator", "()Landroid/widget/ViewAnimator;", "animator", "Lby/kufar/re/ui/widget/error/ErrorView;", "error$delegate", "getError", "()Lby/kufar/re/ui/widget/error/ErrorView;", "error", "Landroidx/recyclerview/widget/RecyclerView;", "recycler$delegate", "getRecycler", "()Landroidx/recyclerview/widget/RecyclerView;", "recycler", "Lby/kufar/vas/ui/vas/bump/screen/payCard/PayCardVM;", "payCardVM$delegate", "getPayCardVM", "()Lby/kufar/vas/ui/vas/bump/screen/payCard/PayCardVM;", "payCardVM", "Lby/kufar/re/ui/widget/button/ProgressButton;", "bPayCard$delegate", "getBPayCard", "()Lby/kufar/re/ui/widget/button/ProgressButton;", "bPayCard", "", "productID$delegate", "getProductID", "()Ljava/lang/String;", "productID", "", "adID$delegate", "getAdID", "()Ljava/lang/Long;", "adID", "Lan/a;", "vasType$delegate", "getVasType", "()Lan/a;", "vasType", "", "isInstallmentCards$delegate", "isInstallmentCards", "()Z", "forceEmptyCards$delegate", "getForceEmptyCards", "forceEmptyCards", "", "availableCards$delegate", "getAvailableCards", "()I", "availableCards", "<init>", "()V", "Companion", "a", "feature-vas_googleRelease"}, k = 1, mv = {1, 9, 0})
public final class PayCardFragment extends BaseFragment implements PayCardController.a {
private static final String AD_ID = "AD_ID";
private static final String AVAILABLE_CARDS = "AVAILABLE_CARDS";
private static final String FORCE_EMPTY_CARDS = "FORCE_EMPTY_CARDS";
private static final String INSTALLMENT_CARDS = "IS_INSTALLMENT_CARDS";
private static final String PRODUCT_ID = "PRODUCT_ID";
private static final String VAS_TYPE = "VAS_TYPE";
private final d80.j adID;
private final i6.c animator;
private final d80.j availableCards;
private final i6.c bPayCard;
public xo.a bumpTracker;
private final d80.j controller;
private final i6.c error;
private final d80.j forceEmptyCards;
private final d80.j isInstallmentCards;
public cb.b mediator;
private final d80.j payCardVM;
private final d80.j productID;
private final i6.c recycler;
private final d80.j vasType;
public ViewModelProvider.Factory viewModelFactory;
static final KProperty<Object>[] $$delegatedProperties = {o0.i(new g0(PayCardFragment.class, "animator", "getAnimator()Landroid/widget/ViewAnimator;", 0)), o0.i(new g0(PayCardFragment.class, "error", "getError()Lby/kufar/re/ui/widget/error/ErrorView;", 0)), o0.i(new g0(PayCardFragment.class, "recycler", "getRecycler()Landroidx/recyclerview/widget/RecyclerView;", 0)), o0.i(new g0(PayCardFragment.class, "bPayCard", "getBPayCard()Lby/kufar/re/ui/widget/button/ProgressButton;", 0))};
public static final Companion INSTANCE = new Companion(null);
public static final int $stable = 8;
@Metadata(d1 = {"\u00000\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\t\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\f\b\u0086\u0003\u0018\u00002\u00020\u0001B\t\b\u0002¢\u0006\u0004\b\u0017\u0010\u0018J?\u0010\u000e\u001a\u00020\r2\u0006\u0010\u0003\u001a\u00020\u00022\b\u0010\u0005\u001a\u0004\u0018\u00010\u00042\u0006\u0010\u0007\u001a\u00020\u00062\u0006\u0010\t\u001a\u00020\b2\u0006\u0010\u000b\u001a\u00020\n2\u0006\u0010\f\u001a\u00020\b¢\u0006\u0004\b\u000e\u0010\u000fR\u0014\u0010\u0010\u001a\u00020\u00028\u0002X\u0082T¢\u0006\u0006\n\u0004\b\u0010\u0010\u0011R\u0014\u0010\u0012\u001a\u00020\u00028\u0002X\u0082T¢\u0006\u0006\n\u0004\b\u0012\u0010\u0011R\u0014\u0010\u0013\u001a\u00020\u00028\u0002X\u0082T¢\u0006\u0006\n\u0004\b\u0013\u0010\u0011R\u0014\u0010\u0014\u001a\u00020\u00028\u0002X\u0082T¢\u0006\u0006\n\u0004\b\u0014\u0010\u0011R\u0014\u0010\u0015\u001a\u00020\u00028\u0002X\u0082T¢\u0006\u0006\n\u0004\b\u0015\u0010\u0011R\u0014\u0010\u0016\u001a\u00020\u00028\u0002X\u0082T¢\u0006\u0006\n\u0004\b\u0016\u0010\u0011¨\u0006\u0019"}, d2 = {"Lby/kufar/vas/ui/vas/bump/screen/payCard/PayCardFragment$a;", "", "", "productID", "", "adID", "Lan/a;", "vasType", "", "isInstallmentCard", "", "availableCards", "forceEmptyCards", "Lby/kufar/vas/ui/vas/bump/screen/payCard/PayCardFragment;", "a", "(Ljava/lang/String;Ljava/lang/Long;Lan/a;ZIZ)Lby/kufar/vas/ui/vas/bump/screen/payCard/PayCardFragment;", "AD_ID", "Ljava/lang/String;", PayCardFragment.AVAILABLE_CARDS, PayCardFragment.FORCE_EMPTY_CARDS, "INSTALLMENT_CARDS", "PRODUCT_ID", PayCardFragment.VAS_TYPE, "<init>", "()V", "feature-vas_googleRelease"}, k = 1, mv = {1, 9, 0})
public static final class Companion {
public Companion() {
}
public Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public final PayCardFragment a(String productID, Long adID, an.a vasType, boolean isInstallmentCard, int availableCards, boolean forceEmptyCards) {
kotlin.jvm.internal.s.j(productID, "productID");
kotlin.jvm.internal.s.j(vasType, "vasType");
PayCardFragment payCardFragment = new PayCardFragment();
payCardFragment.setArguments(BundleKt.bundleOf(d80.u.a("PRODUCT_ID", productID), d80.u.a("AD_ID", adID), d80.u.a(PayCardFragment.VAS_TYPE, vasType), d80.u.a(PayCardFragment.INSTALLMENT_CARDS, Boolean.valueOf(isInstallmentCard)), d80.u.a(PayCardFragment.AVAILABLE_CARDS, Integer.valueOf(availableCards)), d80.u.a(PayCardFragment.FORCE_EMPTY_CARDS, Boolean.valueOf(forceEmptyCards))));
return payCardFragment;
}
}
@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0002\u001a\u00020\u0001*\u00020\u0000H\n¢\u0006\u0004\b\u0002\u0010\u0003"}, d2 = {"Lby/kufar/vas/ui/vas/a;", "", "a", "(Lby/kufar/vas/ui/vas/a;)V"}, k = 3, mv = {1, 9, 0})
public static final class b extends kotlin.jvm.internal.u implements Function1<by.kufar.vas.ui.vas.a, Unit> {
public b() {
super(1);
}
public final void a(by.kufar.vas.ui.vas.a openVasFragmentOrThrow) {
kotlin.jvm.internal.s.j(openVasFragmentOrThrow, "$this$openVasFragmentOrThrow");
openVasFragmentOrThrow.openPayCardFragment(PayCardFragment.this.getProductID(), PayCardFragment.this.getAdID(), PayCardFragment.this.isInstallmentCards(), PayCardFragment.this.getAvailableCards(), true, PayCardFragment.this.getVasType());
}
@Override
public Unit invoke(by.kufar.vas.ui.vas.a aVar) {
a(aVar);
return Unit.f82492a;
}
}
@Metadata(k = 3, mv = {1, 9, 0}, xi = 48)
public class c extends kotlin.jvm.internal.p implements Function1<e.Url, Unit> {
public c(Object obj) {
super(1, obj, PayCardFragment.class, "openWebBepaidActivity", "openWebBepaidActivity(Lby/kufar/vas/ui/vas/bump/base/usecase/FormatBepaidWebUrlUseCase$Url;)V", 0);
}
public final void a(e.Url p02) {
kotlin.jvm.internal.s.j(p02, "p0");
((PayCardFragment) this.receiver).openWebBepaidActivity(p02);
}
@Override
public Unit invoke(e.Url url) {
a(url);
return Unit.f82492a;
}
}
@Metadata(k = 3, mv = {1, 9, 0}, xi = 48)
public class d extends kotlin.jvm.internal.p implements Function1<e.Url, Unit> {
public d(Object obj) {
super(1, obj, PayCardFragment.class, "openWebBepaidActivity", "openWebBepaidActivity(Lby/kufar/vas/ui/vas/bump/base/usecase/FormatBepaidWebUrlUseCase$Url;)V", 0);
}
public final void a(e.Url p02) {
kotlin.jvm.internal.s.j(p02, "p0");
((PayCardFragment) this.receiver).openWebBepaidActivity(p02);
}
@Override
public Unit invoke(e.Url url) {
a(url);
return Unit.f82492a;
}
}
@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0002\u001a\u00020\u0001*\u00020\u0000H\n¢\u0006\u0004\b\u0002\u0010\u0003"}, d2 = {"Lby/kufar/vas/ui/vas/a;", "", "a", "(Lby/kufar/vas/ui/vas/a;)V"}, k = 3, mv = {1, 9, 0})
public static final class e extends kotlin.jvm.internal.u implements Function1<by.kufar.vas.ui.vas.a, Unit> {
public final e.Url f20027d;
public e(e.Url url) {
super(1);
this.f20027d = url;
}
public final void a(by.kufar.vas.ui.vas.a openVasFragmentOrThrow) {
kotlin.jvm.internal.s.j(openVasFragmentOrThrow, "$this$openVasFragmentOrThrow");
openVasFragmentOrThrow.openBepaidWebActivity(this.f20027d);
}
@Override
public Unit invoke(by.kufar.vas.ui.vas.a aVar) {
a(aVar);
return Unit.f82492a;
}
}
@Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "Landroidx/lifecycle/ViewModelProvider$Factory;", "invoke"}, k = 3, mv = {1, 9, 0}, xi = 48)
public static final class f extends kotlin.jvm.internal.u implements Function0<ViewModelProvider.Factory> {
public f() {
super(0);
}
@Override
public final ViewModelProvider.Factory invoke() {
return PayCardFragment.this.getViewModelFactory();
}
}
@Metadata(k = 3, mv = {1, 9, 0}, xi = 48)
public static final class g implements Observer, kotlin.jvm.internal.m {
public final Function1 f20029b;
public g(Function1 function) {
kotlin.jvm.internal.s.j(function, "function");
this.f20029b = function;
}
public final boolean equals(Object obj) {
if (!(obj instanceof Observer) || !(obj instanceof kotlin.jvm.internal.m)) {
return false;
}
return kotlin.jvm.internal.s.e(getFunctionDelegate(), ((kotlin.jvm.internal.m) obj).getFunctionDelegate());
}
@Override
public final d80.f<?> getFunctionDelegate() {
return this.f20029b;
}
public final int hashCode() {
return getFunctionDelegate().hashCode();
}
@Override
public final void onChanged(Object obj) {
this.f20029b.invoke(obj);
}
}
@Metadata(d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0010\u0003\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0005\u001a\u00020\u00042\u001a\u0010\u0003\u001a\u0016\u0012\u0004\u0012\u00020\u0001 \u0002*\n\u0012\u0004\u0012\u00020\u0001\u0018\u00010\u00000\u0000H\n¢\u0006\u0004\b\u0005\u0010\u0006"}, d2 = {"Lby/kufar/core/android/arch/a;", "", "kotlin.jvm.PlatformType", "it", "", "c", "(Lby/kufar/core/android/arch/a;)V"}, k = 3, mv = {1, 9, 0})
public static final class h extends kotlin.jvm.internal.u implements Function1<by.kufar.core.android.arch.a<? extends Throwable>, Unit> {
@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0002\u001a\u00020\u0001*\u00020\u0000H\n¢\u0006\u0004\b\u0002\u0010\u0003"}, d2 = {"Lby/kufar/vas/ui/vas/a;", "", "a", "(Lby/kufar/vas/ui/vas/a;)V"}, k = 3, mv = {1, 9, 0})
public static final class a extends kotlin.jvm.internal.u implements Function1<by.kufar.vas.ui.vas.a, Unit> {
public final Throwable f20031d;
public a(Throwable th2) {
super(1);
this.f20031d = th2;
}
public final void a(by.kufar.vas.ui.vas.a openVasFragmentOrThrow) {
kotlin.jvm.internal.s.j(openVasFragmentOrThrow, "$this$openVasFragmentOrThrow");
openVasFragmentOrThrow.openCustomErrorDialog(((ap.a) this.f20031d).getCode().toString());
}
@Override
public Unit invoke(by.kufar.vas.ui.vas.a aVar) {
a(aVar);
return Unit.f82492a;
}
}
@Metadata(k = 3, mv = {1, 9, 0}, xi = 48)
public class b extends kotlin.jvm.internal.a implements Function1<by.kufar.vas.ui.vas.a, Unit> {
public static final b f20032b = new b();
public b() {
super(1, by.kufar.vas.ui.vas.a.class, "openSomethingGoesWrongDialog", "openSomethingGoesWrongDialog(ZZ)V", 0);
}
public final void a(by.kufar.vas.ui.vas.a p02) {
kotlin.jvm.internal.s.j(p02, "p0");
a.C0342a.c(p02, false, false, 3, null);
}
@Override
public Unit invoke(by.kufar.vas.ui.vas.a aVar) {
a(aVar);
return Unit.f82492a;
}
}
public h() {
super(1);
}
public static final void d(final PayCardFragment this$0) {
kotlin.jvm.internal.s.j(this$0, "this$0");
by.kufar.vas.ui.vas.b.a(this$0, b.f20032b);
this$0.getParentFragmentManager().setFragmentResultListener(SomethingGoesWrongDialog.REQUEST_KEY, this$0.getViewLifecycleOwner(), new FragmentResultListener() {
@Override
public final void onFragmentResult(String str, Bundle bundle) {
PayCardFragment.h.e(PayCardFragment.this, str, bundle);
}
});
}
public static final void e(PayCardFragment this$0, String str, Bundle bundle) {
kotlin.jvm.internal.s.j(this$0, "this$0");
kotlin.jvm.internal.s.j(str, "<anonymous parameter 0>");
kotlin.jvm.internal.s.j(bundle, "bundle");
String string = bundle.getString("RESULT_KEY");
if (string != null) {
int hashCode = string.hashCode();
if (hashCode != 1170973907) {
if (hashCode == 1266072432 && string.equals(SomethingGoesWrongDialog.ACTION_SELECT_ANOTHER_PAYMENT)) {
this$0.getParentFragmentManager().popBackStack();
return;
}
return;
}
if (string.equals(SomethingGoesWrongDialog.ACTION_TRY_AGAIN)) {
this$0.getBPayCard().e(false);
}
}
}
public final void c(by.kufar.core.android.arch.a<? extends Throwable> aVar) {
Throwable a11 = aVar.a();
if (a11 == null) {
return;
}
if (!(a11 instanceof ap.a) || ((ap.a) a11).getCode() == null) {
RecyclerView recycler = PayCardFragment.this.getRecycler();
final PayCardFragment payCardFragment = PayCardFragment.this;
recycler.post(new Runnable() {
@Override
public final void run() {
PayCardFragment.h.d(PayCardFragment.this);
}
});
return;
}
by.kufar.vas.ui.vas.b.a(PayCardFragment.this, new a(a11));
}
@Override
public Unit invoke(by.kufar.core.android.arch.a<? extends Throwable> aVar) {
c(aVar);
return Unit.f82492a;
}
}
@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\b\u0004\u0010\u0004\u001a\u00020\u00012\u001a\u0010\u0003\u001a\u0016\u0012\u0004\u0012\u00020\u0001 \u0002*\n\u0012\u0004\u0012\u00020\u0001\u0018\u00010\u00000\u0000H\n¢\u0006\u0004\b\u0004\u0010\u0005"}, d2 = {"Lby/kufar/core/android/arch/a;", "", "kotlin.jvm.PlatformType", "it", "a", "(Lby/kufar/core/android/arch/a;)V"}, k = 3, mv = {1, 9, 0})
public static final class i extends kotlin.jvm.internal.u implements Function1<by.kufar.core.android.arch.a<? extends Unit>, Unit> {
public i() {
super(1);
}
public final void a(by.kufar.core.android.arch.a<Unit> aVar) {
Context context;
if (aVar.a() != null && (context = PayCardFragment.this.getContext()) != null) {
context.startActivity(PaymentSdk.INSTANCE.getCardFormIntent(context));
}
}
@Override
public Unit invoke(by.kufar.core.android.arch.a<? extends Unit> aVar) {
a(aVar);
return Unit.f82492a;
}
}
@Metadata(d1 = {"\u0000\u000e\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0003H\n¢\u0006\u0002\b\u0004"}, d2 = {"<anonymous>", "", "it", "Landroid/view/View;", "invoke"}, k = 3, mv = {1, 9, 0}, xi = 48)
public static final class j extends kotlin.jvm.internal.u implements Function1<View, Unit> {
public j() {
super(1);
}
@Override
public Unit invoke(View view) {
invoke2(view);
return Unit.f82492a;
}
public final void invoke2(View it) {
kotlin.jvm.internal.s.j(it, "it");
PayCardVM.load$default(PayCardFragment.this.getPayCardVM(), PayCardFragment.this.getVasType(), PayCardFragment.this.getProductID(), PayCardFragment.this.getAdID(), PayCardFragment.this.isInstallmentCards(), true, false, 32, null);
}
}
@Metadata(d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0005\u001a\u00020\u00042\u001a\u0010\u0003\u001a\u0016\u0012\u0004\u0012\u00020\u0001 \u0002*\n\u0012\u0004\u0012\u00020\u0001\u0018\u00010\u00000\u0000H\n¢\u0006\u0004\b\u0005\u0010\u0006"}, d2 = {"Lby/kufar/core/android/arch/a;", "Lby/kufar/vas/ui/vas/bump/screen/payCard/PayCardVM$a;", "kotlin.jvm.PlatformType", "it", "", "b", "(Lby/kufar/core/android/arch/a;)V"}, k = 3, mv = {1, 9, 0})
public static final class k extends kotlin.jvm.internal.u implements Function1<by.kufar.core.android.arch.a<? extends PayCardVM.ProductIDAndOrderID>, Unit> {
@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0002\u001a\u00020\u0001*\u00020\u0000H\n¢\u0006\u0004\b\u0002\u0010\u0003"}, d2 = {"Lby/kufar/vas/ui/vas/a;", "", "a", "(Lby/kufar/vas/ui/vas/a;)V"}, k = 3, mv = {1, 9, 0})
public static final class a extends kotlin.jvm.internal.u implements Function1<by.kufar.vas.ui.vas.a, Unit> {
public final PayCardFragment f20036d;
public final PayCardVM.ProductIDAndOrderID f20037e;
public a(PayCardFragment payCardFragment, PayCardVM.ProductIDAndOrderID productIDAndOrderID) {
super(1);
this.f20036d = payCardFragment;
this.f20037e = productIDAndOrderID;
}
public final void a(by.kufar.vas.ui.vas.a openVasFragmentOrThrow) {
kotlin.jvm.internal.s.j(openVasFragmentOrThrow, "$this$openVasFragmentOrThrow");
openVasFragmentOrThrow.openSuccessfulUpSaleDialog(this.f20036d.getVasType(), this.f20037e.getProductID());
}
@Override
public Unit invoke(by.kufar.vas.ui.vas.a aVar) {
a(aVar);
return Unit.f82492a;
}
}
public k() {
super(1);
}
public static final void c(PayCardFragment this$0, PayCardVM.ProductIDAndOrderID content) {
kotlin.jvm.internal.s.j(this$0, "this$0");
kotlin.jvm.internal.s.j(content, "$content");
by.kufar.vas.ui.vas.b.a(this$0, new a(this$0, content));
}
public final void b(by.kufar.core.android.arch.a<PayCardVM.ProductIDAndOrderID> aVar) {
final PayCardVM.ProductIDAndOrderID a11 = aVar.a();
if (a11 != null) {
RecyclerView recycler = PayCardFragment.this.getRecycler();
final PayCardFragment payCardFragment = PayCardFragment.this;
recycler.post(new Runnable() {
@Override
public final void run() {
PayCardFragment.k.c(PayCardFragment.this, a11);
}
});
}
}
@Override
public Unit invoke(by.kufar.core.android.arch.a<? extends PayCardVM.ProductIDAndOrderID> aVar) {
b(aVar);
return Unit.f82492a;
}
}
@Metadata(d1 = {"\u0000\f\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001*\u00020\u0002H\n¢\u0006\u0002\b\u0003"}, d2 = {"<anonymous>", "", "Landroidx/activity/OnBackPressedCallback;", "invoke"}, k = 3, mv = {1, 9, 0}, xi = 48)
public static final class l extends kotlin.jvm.internal.u implements Function1<OnBackPressedCallback, Unit> {
public l() {
super(1);
}
@Override
public Unit invoke(OnBackPressedCallback onBackPressedCallback) {
invoke2(onBackPressedCallback);
return Unit.f82492a;
}
public final void invoke2(OnBackPressedCallback addCallback) {
kotlin.jvm.internal.s.j(addCallback, "$this$addCallback");
PayCardFragment.this.getBumpTracker().v(PayCardFragment.this.getVasType().getTitle(), PayCardFragment.this.isInstallmentCards());
PayCardFragment.this.getParentFragmentManager().popBackStack();
}
}
@Metadata(k = 3, mv = {1, 9, 0}, xi = 48)
public class m extends kotlin.jvm.internal.p implements Function1<PayCardVM.b, Unit> {
public m(Object obj) {
super(1, obj, PayCardFragment.class, "handleState", "handleState(Lby/kufar/vas/ui/vas/bump/screen/payCard/PayCardVM$State;)V", 0);
}
public final void a(PayCardVM.b p02) {
kotlin.jvm.internal.s.j(p02, "p0");
((PayCardFragment) this.receiver).handleState(p02);
}
@Override
public Unit invoke(PayCardVM.b bVar) {
a(bVar);
return Unit.f82492a;
}
}
@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0002\u001a\u00020\u0001*\u00020\u0000H\n¢\u0006\u0004\b\u0002\u0010\u0003"}, d2 = {"Lby/kufar/vas/ui/vas/a;", "", "a", "(Lby/kufar/vas/ui/vas/a;)V"}, k = 3, mv = {1, 9, 0})
public static final class n extends kotlin.jvm.internal.u implements Function1<by.kufar.vas.ui.vas.a, Unit> {
public n() {
super(1);
}
public final void a(by.kufar.vas.ui.vas.a openVasFragmentOrThrow) {
kotlin.jvm.internal.s.j(openVasFragmentOrThrow, "$this$openVasFragmentOrThrow");
openVasFragmentOrThrow.openPayCardTipDialog();
PayCardFragment.this.getBumpTracker().E(PayCardFragment.this.getVasType().getTitle());
}
@Override
public Unit invoke(by.kufar.vas.ui.vas.a aVar) {
a(aVar);
return Unit.f82492a;
}
}
@Metadata(d1 = {"\u0000\u0004\n\u0002\b\u0004\u0010\u0003\u001a\u00028\u0000\"\u0004\b\u0000\u0010\u0000H\n¢\u0006\u0004\b\u0001\u0010\u0002"}, d2 = {"T", "invoke", "()Ljava/lang/Object;", "<anonymous>"}, k = 3, mv = {1, 9, 0})
public static final class o extends kotlin.jvm.internal.u implements Function0<PayCardController> {
public o() {
super(0);
}
@Override
public final PayCardController invoke() {
Context requireContext = PayCardFragment.this.requireContext();
kotlin.jvm.internal.s.i(requireContext, "requireContext(...)");
return new PayCardController(requireContext, PayCardFragment.this);
}
}
@Metadata(d1 = {"\u0000\u0004\n\u0002\b\u0004\u0010\u0003\u001a\u00028\u0000\"\u0004\b\u0000\u0010\u0000H\n¢\u0006\u0004\b\u0001\u0010\u0002"}, d2 = {"T", "invoke", "()Ljava/lang/Object;", "<anonymous>"}, k = 3, mv = {1, 9, 0})
public static final class p extends kotlin.jvm.internal.u implements Function0<String> {
public p() {
super(0);
}
@Override
public final String invoke() {
String string;
Bundle arguments = PayCardFragment.this.getArguments();
if (arguments != null && (string = arguments.getString("PRODUCT_ID")) != null) {
kotlin.jvm.internal.s.g(string);
return string;
}
throw new IllegalStateException("BUMP_ID should be not null".toString());
}
}
@Metadata(d1 = {"\u0000\u0004\n\u0002\b\u0004\u0010\u0003\u001a\u00028\u0000\"\u0004\b\u0000\u0010\u0000H\n¢\u0006\u0004\b\u0001\u0010\u0002"}, d2 = {"T", "invoke", "()Ljava/lang/Object;", "<anonymous>"}, k = 3, mv = {1, 9, 0})
public static final class q extends kotlin.jvm.internal.u implements Function0<Long> {
public q() {
super(0);
}
@Override
public final Long invoke() {
Bundle arguments = PayCardFragment.this.getArguments();
if (arguments != null) {
kotlin.jvm.internal.s.g(arguments);
return s5.b.a(arguments, "AD_ID");
}
return null;
}
}
@Metadata(d1 = {"\u0000\u0004\n\u0002\b\u0004\u0010\u0003\u001a\u00028\u0000\"\u0004\b\u0000\u0010\u0000H\n¢\u0006\u0004\b\u0001\u0010\u0002"}, d2 = {"T", "invoke", "()Ljava/lang/Object;", "<anonymous>"}, k = 3, mv = {1, 9, 0})
public static final class r extends kotlin.jvm.internal.u implements Function0<an.a> {
public r() {
super(0);
}
@Override
public final an.a invoke() {
Serializable serializable;
Bundle arguments = PayCardFragment.this.getArguments();
an.a aVar = null;
if (arguments != null) {
serializable = arguments.getSerializable(PayCardFragment.VAS_TYPE);
} else {
serializable = null;
}
if (serializable instanceof an.a) {
aVar = (an.a) serializable;
}
if (aVar != null) {
return aVar;
}
throw new IllegalStateException("VAS_NAME should be not null".toString());
}
}
@Metadata(d1 = {"\u0000\u0004\n\u0002\b\u0004\u0010\u0003\u001a\u00028\u0000\"\u0004\b\u0000\u0010\u0000H\n¢\u0006\u0004\b\u0001\u0010\u0002"}, d2 = {"T", "invoke", "()Ljava/lang/Object;", "<anonymous>"}, k = 3, mv = {1, 9, 0})
public static final class s extends kotlin.jvm.internal.u implements Function0<Boolean> {
public s() {
super(0);
}
@Override
public final Boolean invoke() {
Bundle arguments = PayCardFragment.this.getArguments();
if (arguments != null) {
return Boolean.valueOf(arguments.getBoolean(PayCardFragment.INSTALLMENT_CARDS));
}
throw new IllegalStateException("INSTALLMENT_CARDS is null".toString());
}
}
@Metadata(d1 = {"\u0000\u0004\n\u0002\b\u0004\u0010\u0003\u001a\u00028\u0000\"\u0004\b\u0000\u0010\u0000H\n¢\u0006\u0004\b\u0001\u0010\u0002"}, d2 = {"T", "invoke", "()Ljava/lang/Object;", "<anonymous>"}, k = 3, mv = {1, 9, 0})
public static final class t extends kotlin.jvm.internal.u implements Function0<Boolean> {
public t() {
super(0);
}
@Override
public final Boolean invoke() {
Bundle arguments = PayCardFragment.this.getArguments();
if (arguments != null) {
return Boolean.valueOf(arguments.getBoolean(PayCardFragment.FORCE_EMPTY_CARDS));
}
throw new IllegalStateException("FORCE_EMPTY_CARDS is null".toString());
}
}
@Metadata(d1 = {"\u0000\u0004\n\u0002\b\u0004\u0010\u0003\u001a\u00028\u0000\"\u0004\b\u0000\u0010\u0000H\n¢\u0006\u0004\b\u0001\u0010\u0002"}, d2 = {"T", "invoke", "()Ljava/lang/Object;", "<anonymous>"}, k = 3, mv = {1, 9, 0})
public static final class u extends kotlin.jvm.internal.u implements Function0<Integer> {
public u() {
super(0);
}
@Override
public final Integer invoke() {
Bundle arguments = PayCardFragment.this.getArguments();
if (arguments != null) {
return Integer.valueOf(arguments.getInt(PayCardFragment.AVAILABLE_CARDS));
}
throw new IllegalStateException("AVAILABLE_CARDS is null".toString());
}
}
@Metadata(d1 = {"\u0000\u0010\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0000\u001a\u00020\u0001\"\n\b\u0000\u0010\u0002\u0018\u0001*\u00020\u0003H\n¢\u0006\u0002\b\u0004¨\u0006\u0005"}, d2 = {"<anonymous>", "Landroidx/fragment/app/Fragment;", "VM", "Landroidx/lifecycle/ViewModel;", "invoke", "androidx/fragment/app/FragmentViewModelLazyKt$viewModels$5"}, k = 3, mv = {1, 9, 0}, xi = 48)
public static final class v extends kotlin.jvm.internal.u implements Function0<Fragment> {
public final Fragment f20047d;
public v(Fragment fragment) {
super(0);
this.f20047d = fragment;
}
@Override
public final Fragment invoke() {
return this.f20047d;
}
}
@Metadata(d1 = {"\u0000\u0010\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0000\u001a\u00020\u0001\"\n\b\u0000\u0010\u0002\u0018\u0001*\u00020\u0003H\n¢\u0006\u0002\b\u0004¨\u0006\u0005"}, d2 = {"<anonymous>", "Landroidx/lifecycle/ViewModelStoreOwner;", "VM", "Landroidx/lifecycle/ViewModel;", "invoke", "androidx/fragment/app/FragmentViewModelLazyKt$viewModels$owner$4"}, k = 3, mv = {1, 9, 0}, xi = 48)
public static final class w extends kotlin.jvm.internal.u implements Function0<ViewModelStoreOwner> {
public final Function0 f20048d;
public w(Function0 function0) {
super(0);
this.f20048d = function0;
}
@Override
public final ViewModelStoreOwner invoke() {
return (ViewModelStoreOwner) this.f20048d.invoke();
}
}
@Metadata(d1 = {"\u0000\u0010\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0000\u001a\u00020\u0001\"\n\b\u0000\u0010\u0002\u0018\u0001*\u00020\u0003H\n¢\u0006\u0002\b\u0004¨\u0006\u0005"}, d2 = {"<anonymous>", "Landroidx/lifecycle/ViewModelStore;", "VM", "Landroidx/lifecycle/ViewModel;", "invoke", "androidx/fragment/app/FragmentViewModelLazyKt$viewModels$6"}, k = 3, mv = {1, 9, 0}, xi = 48)
public static final class x extends kotlin.jvm.internal.u implements Function0<ViewModelStore> {
public final d80.j f20049d;
public x(d80.j jVar) {
super(0);
this.f20049d = jVar;
}
@Override
public final ViewModelStore invoke() {
ViewModelStoreOwner m4202viewModels$lambda1;
m4202viewModels$lambda1 = FragmentViewModelLazyKt.m4202viewModels$lambda1(this.f20049d);
ViewModelStore viewModelStore = m4202viewModels$lambda1.getViewModelStore();
kotlin.jvm.internal.s.i(viewModelStore, "owner.viewModelStore");
return viewModelStore;
}
}
@Metadata(d1 = {"\u0000\u0010\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0000\u001a\u00020\u0001\"\n\b\u0000\u0010\u0002\u0018\u0001*\u00020\u0003H\n¢\u0006\u0002\b\u0004¨\u0006\u0005"}, d2 = {"<anonymous>", "Landroidx/lifecycle/viewmodel/CreationExtras;", "VM", "Landroidx/lifecycle/ViewModel;", "invoke", "androidx/fragment/app/FragmentViewModelLazyKt$viewModels$7"}, k = 3, mv = {1, 9, 0}, xi = 48)
public static final class y extends kotlin.jvm.internal.u implements Function0<CreationExtras> {
public final Function0 f20050d;
public final d80.j f20051e;
public y(Function0 function0, d80.j jVar) {
super(0);
this.f20050d = function0;
this.f20051e = jVar;
}
@Override
public final CreationExtras invoke() {
ViewModelStoreOwner m4202viewModels$lambda1;
CreationExtras creationExtras;
Function0 function0 = this.f20050d;
if (function0 != null && (creationExtras = (CreationExtras) function0.invoke()) != null) {
return creationExtras;
}
m4202viewModels$lambda1 = FragmentViewModelLazyKt.m4202viewModels$lambda1(this.f20051e);
HasDefaultViewModelProviderFactory hasDefaultViewModelProviderFactory = m4202viewModels$lambda1 instanceof HasDefaultViewModelProviderFactory ? (HasDefaultViewModelProviderFactory) m4202viewModels$lambda1 : null;
CreationExtras defaultViewModelCreationExtras = hasDefaultViewModelProviderFactory != null ? hasDefaultViewModelProviderFactory.getDefaultViewModelCreationExtras() : null;
return defaultViewModelCreationExtras == null ? CreationExtras.Empty.INSTANCE : defaultViewModelCreationExtras;
}
}
public PayCardFragment() {
d80.m mVar = d80.m.f73493d;
this.controller = d80.k.a(mVar, new o());
this.animator = bindView(R$id.f19431a);
this.error = bindView(R$id.L);
this.recycler = bindView(R$id.Q0);
f fVar = new f();
d80.j a11 = d80.k.a(mVar, new w(new v(this)));
this.payCardVM = FragmentViewModelLazyKt.createViewModelLazy(this, o0.b(PayCardVM.class), new x(a11), new y(null, a11), fVar);
this.bPayCard = bindView(R$id.f19483n);
this.productID = d80.k.a(mVar, new p());
this.adID = d80.k.a(mVar, new q());
this.vasType = d80.k.a(mVar, new r());
this.isInstallmentCards = d80.k.a(mVar, new s());
this.forceEmptyCards = d80.k.a(mVar, new t());
this.availableCards = d80.k.a(mVar, new u());
}
public final Long getAdID() {
return (Long) this.adID.getValue();
}
private final ViewAnimator getAnimator() {
return (ViewAnimator) this.animator.getValue(this, $$delegatedProperties[0]);
}
public final int getAvailableCards() {
return ((Number) this.availableCards.getValue()).intValue();
}
public final ProgressButton getBPayCard() {
return (ProgressButton) this.bPayCard.getValue(this, $$delegatedProperties[3]);
}
private final PayCardController getController() {
return (PayCardController) this.controller.getValue();
}
private final ErrorView getError() {
return (ErrorView) this.error.getValue(this, $$delegatedProperties[1]);
}
private final boolean getForceEmptyCards() {
return ((Boolean) this.forceEmptyCards.getValue()).booleanValue();
}
public final PayCardVM getPayCardVM() {
return (PayCardVM) this.payCardVM.getValue();
}
public final String getProductID() {
return (String) this.productID.getValue();
}
public final RecyclerView getRecycler() {
return (RecyclerView) this.recycler.getValue(this, $$delegatedProperties[2]);
}
public final an.a getVasType() {
return (an.a) this.vasType.getValue();
}
public final void handleState(PayCardVM.b state) {
boolean z11;
boolean z12;
boolean z13;
int i11 = -1;
int i12 = 0;
if (state instanceof PayCardVM.b.Data) {
ViewAnimator animator = getAnimator();
int i13 = R$id.E;
Iterator<View> it = ViewGroupKt.getChildren(animator).iterator();
int i14 = 0;
while (true) {
if (!it.hasNext()) {
break;
}
View next = it.next();
if (i14 < 0) {
e80.t.x();
}
if (next.getId() == i13) {
z13 = true;
} else {
z13 = false;
}
if (z13) {
i11 = i14;
break;
}
i14++;
}
if (animator.getDisplayedChild() != i11) {
if (i11 >= 0) {
animator.setDisplayedChild(i11);
} else {
throw new IllegalArgumentException("View with ID " + i13 + " not found.");
}
}
PayCardVM.b.Data data = (PayCardVM.b.Data) state;
getController().setItems(data.b());
ProgressButton bPayCard = getBPayCard();
if (!data.getIsReadyForPaying()) {
i12 = 8;
}
bPayCard.setVisibility(i12);
return;
}
if (state instanceof PayCardVM.b.C0345b) {
ViewAnimator animator2 = getAnimator();
int i15 = R$id.L;
Iterator<View> it2 = ViewGroupKt.getChildren(animator2).iterator();
int i16 = 0;
while (true) {
if (!it2.hasNext()) {
break;
}
View next2 = it2.next();
if (i16 < 0) {
e80.t.x();
}
if (next2.getId() == i15) {
z12 = true;
} else {
z12 = false;
}
if (z12) {
i11 = i16;
break;
}
i16++;
}
if (animator2.getDisplayedChild() != i11) {
if (i11 >= 0) {
animator2.setDisplayedChild(i11);
} else {
throw new IllegalArgumentException("View with ID " + i15 + " not found.");
}
}
getError().setupError(((PayCardVM.b.C0345b) state).getException());
return;
}
if (kotlin.jvm.internal.s.e(state, PayCardVM.b.c.f20057a)) {
ViewAnimator animator3 = getAnimator();
int i17 = R$id.I0;
Iterator<View> it3 = ViewGroupKt.getChildren(animator3).iterator();
int i18 = 0;
while (true) {
if (!it3.hasNext()) {
break;
}
View next3 = it3.next();
if (i18 < 0) {
e80.t.x();
}
if (next3.getId() == i17) {
z11 = true;
} else {
z11 = false;
}
if (z11) {
i11 = i18;
break;
}
i18++;
}
if (animator3.getDisplayedChild() != i11) {
if (i11 >= 0) {
animator3.setDisplayedChild(i11);
return;
}
throw new IllegalArgumentException("View with ID " + i17 + " not found.");
}
return;
}
throw new d80.n();
}
public final boolean isInstallmentCards() {
return ((Boolean) this.isInstallmentCards.getValue()).booleanValue();
}
public final void openWebBepaidActivity(e.Url url) {
by.kufar.vas.ui.vas.b.a(this, new e(url));
}
private final void setUpButtons() {
getPayCardVM().getShowErrorDialog().observe(getViewLifecycleOwner(), new g(new h()));
getPayCardVM().getShowPaymentBottomSheet().observe(getViewLifecycleOwner(), new g(new i()));
getError().setOnRetryListener(new j());
getPayCardVM().getShowPaymentSuccessfulDialog().observe(getViewLifecycleOwner(), new g(new k()));
getBPayCard().setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
PayCardFragment.setUpButtons$lambda$9(PayCardFragment.this, view);
}
});
}
public static final void setUpButtons$lambda$9(PayCardFragment this$0, View view) {
kotlin.jvm.internal.s.j(this$0, "this$0");
this$0.getBPayCard().e(true);
this$0.getPayCardVM().payCardToken(this$0.getAdID(), this$0.getProductID(), this$0.getVasType());
this$0.getBumpTracker().Q(this$0.getVasType().getTitle(), this$0.isInstallmentCards(), this$0.getAdID());
}
private final void setUpObservers() {
OnBackPressedDispatcher onBackPressedDispatcher;
FragmentActivity activity = getActivity();
if (activity != null && (onBackPressedDispatcher = activity.getOnBackPressedDispatcher()) != null) {
OnBackPressedDispatcherKt.addCallback$default(onBackPressedDispatcher, getViewLifecycleOwner(), false, new l(), 2, null);
}
}
private final void setUpRecycler() {
getRecycler().setAdapter(getController().getAdapter());
getRecycler().setHasFixedSize(true);
getRecycler().setItemAnimator(null);
getRecycler().setLayoutManager(new LinearLayoutManager(requireContext()));
getPayCardVM().getState().observe(getViewLifecycleOwner(), new g(new m(this)));
getRecycler().addItemDecoration(new VasOffsetItemDecorator(0, 0, 1, null));
getPayCardVM().load(getVasType(), getProductID(), getAdID(), isInstallmentCards(), false, getForceEmptyCards());
}
private final void setUpTitle() {
int i11;
hp.d dVar;
if (isInstallmentCards() && getAvailableCards() > 0) {
i11 = R$string.f19590d0;
} else if (isInstallmentCards()) {
i11 = R$string.f19584b0;
} else {
i11 = R$string.U;
}
KeyEventDispatcher.Component activity = getActivity();
if (activity instanceof hp.d) {
dVar = (hp.d) activity;
} else {
dVar = null;
}
if (dVar != null) {
d.a.a(dVar, i11, false, 2, null);
}
}
private final void showPayCardTipDialog() {
by.kufar.vas.ui.vas.b.a(this, new n());
}
public final xo.a getBumpTracker() {
xo.a aVar = this.bumpTracker;
if (aVar != null) {
return aVar;
}
kotlin.jvm.internal.s.B("bumpTracker");
return null;
}
public final cb.b getMediator() {
cb.b bVar = this.mediator;
if (bVar != null) {
return bVar;
}
kotlin.jvm.internal.s.B("mediator");
return null;
}
public final ViewModelProvider.Factory getViewModelFactory() {
ViewModelProvider.Factory factory = this.viewModelFactory;
if (factory != null) {
return factory;
}
kotlin.jvm.internal.s.B("viewModelFactory");
return null;
}
@Override
public void onAdCardClick() {
if (getContext() != null) {
if (isInstallmentCards()) {
by.kufar.vas.ui.vas.b.a(this, new b());
} else if (FeatureToggles.INSTANCE.getBEPAID_NATIVE_WIDGET().isEnabled()) {
getPayCardVM().payCard(getVasType(), getAdID(), getProductID(), ir.c.f80124e);
} else {
getPayCardVM().payWebBepaid(getAdID(), getProductID(), getVasType().getTitle(), null, new c(this));
}
getBumpTracker().c(getVasType().getTitle(), isInstallmentCards());
}
}
@Override
public void onCardClick(CardItem item) {
kotlin.jvm.internal.s.j(item, "item");
getPayCardVM().onCardClick(item);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
kotlin.jvm.internal.s.j(inflater, "inflater");
return inflater.inflate(R$layout.P, container, false);
}
@Override
public void onDetailsClick() {
Context context = getContext();
if (context != null) {
startActivity(WebViewActivity.Companion.b(WebViewActivity.INSTANCE, context, "https://support.kufar.by/hc/ru/articles/4408543563281?utm_source=android&utm_medium=safetoken&utm_campaign=bump", false, null, false, false, 60, null));
}
}
@Override
public void onInject() {
super.onInject();
by.kufar.vas.ui.vas.d.b(this).e(this);
}
@Override
public void onInstallmentCardClick(ir.c paymentType) {
kotlin.jvm.internal.s.j(paymentType, "paymentType");
if (FeatureToggles.INSTANCE.getBEPAID_NATIVE_WIDGET().isEnabled()) {
getPayCardVM().payCard(getVasType(), getAdID(), getProductID(), paymentType);
} else {
getPayCardVM().payWebBepaid(getAdID(), getProductID(), getVasType().getTitle(), paymentType.name(), new d(this));
}
getBumpTracker().f(getVasType().getTitle(), paymentType.name(), getAdID());
}
@Override
public void onTipClick() {
showPayCardTipDialog();
}
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
kotlin.jvm.internal.s.j(view, "view");
super.onViewCreated(view, savedInstanceState);
getBumpTracker().M(getVasType().getTitle(), getAdID(), isInstallmentCards());
setUpRecycler();
setUpButtons();
setUpTitle();
setUpObservers();
}
public final void setBumpTracker(xo.a aVar) {
kotlin.jvm.internal.s.j(aVar, "<set-?>");
this.bumpTracker = aVar;
}
public final void setMediator(cb.b bVar) {
kotlin.jvm.internal.s.j(bVar, "<set-?>");
this.mediator = bVar;
}
public final void setViewModelFactory(ViewModelProvider.Factory factory) {
kotlin.jvm.internal.s.j(factory, "<set-?>");
this.viewModelFactory = factory;
}
}