Kufar v3.2.0版本的 MD5 值为:6a4d203db1c561c7e3bcd50d23fed59f
以下内容为反编译后的 VipFragment2.java 源代码,内容仅作参考
package by.kufar.vas.ui.vas.vip;
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.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.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.vas.a;
import by.kufar.vas.ui.vas.bump.base.VasOffsetItemDecorator;
import by.kufar.vas.ui.vas.vip.VipVM2;
import by.kufar.vas.ui.vas.vip.adapter.VipController2;
import d80.u;
import db.s0;
import e80.t;
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 np.m;
@StabilityInferred(parameters = 0)
@Metadata(d1 = {"\u0000\u009a\u0001\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\t\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u0003\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\u0003\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\u0004\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0012\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u0007\b\u0007\u0018\u0000 g2\u00020\u00012\u00020\u0002:\u0001hB\u0007¢\u0006\u0004\be\u0010fJ\b\u0010\u0004\u001a\u00020\u0003H\u0002J,\u0010\f\u001a\u00020\u00032\u0006\u0010\u0006\u001a\u00020\u00052\u0006\u0010\b\u001a\u00020\u00072\b\u0010\t\u001a\u0004\u0018\u00010\u00052\b\b\u0002\u0010\u000b\u001a\u00020\nH\u0002J\u0010\u0010\u000e\u001a\u00020\u00032\u0006\u0010\r\u001a\u00020\u0007H\u0002J\b\u0010\u000f\u001a\u00020\u0003H\u0002J\b\u0010\u0010\u001a\u00020\u0003H\u0002J\b\u0010\u0011\u001a\u00020\u0003H\u0002J\u0010\u0010\u0014\u001a\u00020\u00032\u0006\u0010\u0013\u001a\u00020\u0012H\u0002J\b\u0010\u0015\u001a\u00020\u0003H\u0016J&\u0010\u001d\u001a\u0004\u0018\u00010\u001c2\u0006\u0010\u0017\u001a\u00020\u00162\b\u0010\u0019\u001a\u0004\u0018\u00010\u00182\b\u0010\u001b\u001a\u0004\u0018\u00010\u001aH\u0016J\u001a\u0010\u001f\u001a\u00020\u00032\u0006\u0010\u001e\u001a\u00020\u001c2\b\u0010\u001b\u001a\u0004\u0018\u00010\u001aH\u0016J\b\u0010 \u001a\u00020\u0003H\u0016J \u0010!\u001a\u00020\u00032\u0006\u0010\u0006\u001a\u00020\u00052\u0006\u0010\b\u001a\u00020\u00072\u0006\u0010\t\u001a\u00020\u0005H\u0016J\u0010\u0010$\u001a\u00020\u00032\u0006\u0010#\u001a\u00020\"H\u0016J\b\u0010%\u001a\u00020\u0003H\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\b0\u00101\"\u0004\b2\u00103R\u001b\u00109\u001a\u0002048BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b5\u00106\u001a\u0004\b7\u00108R\u001b\u0010>\u001a\u00020:8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b;\u00106\u001a\u0004\b<\u0010=R\u001b\u0010C\u001a\u00020?8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b@\u00106\u001a\u0004\bA\u0010BR\u0016\u0010E\u001a\u00020D8\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\bE\u0010FR\u001b\u0010L\u001a\u00020G8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\bH\u0010I\u001a\u0004\bJ\u0010KR\u001d\u0010\u0006\u001a\u0004\u0018\u00010\u00058BX\u0082\u0084\u0002¢\u0006\f\n\u0004\bM\u0010I\u001a\u0004\bN\u0010OR\u001d\u0010\b\u001a\u0004\u0018\u00010\u00078BX\u0082\u0084\u0002¢\u0006\f\n\u0004\bP\u0010I\u001a\u0004\bQ\u0010RR\u001d\u0010U\u001a\u0004\u0018\u00010\u00078BX\u0082\u0084\u0002¢\u0006\f\n\u0004\bS\u0010I\u001a\u0004\bT\u0010RR\u001b\u0010Y\u001a\u00020\u00078BX\u0082\u0084\u0002¢\u0006\f\n\u0004\bV\u0010I\u001a\u0004\bW\u0010XR\u001d\u0010^\u001a\u0004\u0018\u00010Z8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b[\u0010I\u001a\u0004\b\\\u0010]R\u001b\u0010`\u001a\u00020\n8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b_\u0010I\u001a\u0004\b`\u0010aR\u0014\u0010c\u001a\u00020b8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\bc\u0010d¨\u0006i"}, d2 = {"Lby/kufar/vas/ui/vas/vip/VipFragment2;", "Lby/kufar/core/android/fragment/BaseFragment;", "Lby/kufar/vas/ui/vas/vip/adapter/VipController2$a;", "", "loadSingleProduct", "", "productID", "", "adID", "subType", "", "addToBackStack", "openPaymentsFragment", "subCategory", "showBumpTipDialog", "setUpListeners", "setUpTitle", "setUpRecycler", "Lby/kufar/vas/ui/vas/vip/VipVM2$a;", "state", "handleState", "onInject", "Landroid/view/LayoutInflater;", "inflater", "Landroid/view/ViewGroup;", "container", "Landroid/os/Bundle;", "savedInstanceState", "Landroid/view/View;", "onCreateView", "view", "onViewCreated", "onKufarDeliveryClick", "onVipViewClick", "Lnp/m$a;", "data", "onHeaderClick", "onReadMoreTipsClick", "Landroidx/lifecycle/ViewModelProvider$Factory;", "viewModelFactory", "Landroidx/lifecycle/ViewModelProvider$Factory;", "getViewModelFactory", "()Landroidx/lifecycle/ViewModelProvider$Factory;", "setViewModelFactory", "(Landroidx/lifecycle/ViewModelProvider$Factory;)V", "Lxo/a;", "bumpTracker", "Lxo/a;", "getBumpTracker", "()Lxo/a;", "setBumpTracker", "(Lxo/a;)V", "Landroid/widget/ViewAnimator;", "animator$delegate", "Li6/c;", "getAnimator", "()Landroid/widget/ViewAnimator;", "animator", "Landroidx/recyclerview/widget/RecyclerView;", "recycler$delegate", "getRecycler", "()Landroidx/recyclerview/widget/RecyclerView;", "recycler", "Lby/kufar/re/ui/widget/error/ErrorView;", "error$delegate", "getError", "()Lby/kufar/re/ui/widget/error/ErrorView;", "error", "Lby/kufar/vas/ui/vas/vip/adapter/VipController2;", "controller", "Lby/kufar/vas/ui/vas/vip/adapter/VipController2;", "Lby/kufar/vas/ui/vas/vip/VipVM2;", "vipVM$delegate", "Ld80/j;", "getVipVM", "()Lby/kufar/vas/ui/vas/vip/VipVM2;", "vipVM", "productID$delegate", "getProductID", "()Ljava/lang/String;", "adID$delegate", "getAdID", "()Ljava/lang/Long;", "listID$delegate", "getListID", "listID", "similarAdsCount$delegate", "getSimilarAdsCount", "()J", "similarAdsCount", "Ldb/s0$a;", "comesFrom$delegate", "getComesFrom", "()Ldb/s0$a;", "comesFrom", "isDeliveryEnabled$delegate", "isDeliveryEnabled", "()Z", "Lan/a;", "vasType", "Lan/a;", "<init>", "()V", "Companion", "a", "feature-vas_googleRelease"}, k = 1, mv = {1, 9, 0})
public final class VipFragment2 extends BaseFragment implements VipController2.a {
private static final String AD_ID = "AD_ID";
private static final String KEY_COMES_FROM = "KEY_COMES_FROM";
private static final String KEY_DELIVERY_ENABLED = "KEY_DELIVERY_ENABLED";
private static final String KEY_SIMILAR_ADS = "KEY_SIMILAR_ADS";
private static final String LIST_ID = "LIST_ID";
private static final String PRODUCT_ID = "PRODUCT_ID";
private final d80.j adID;
public xo.a bumpTracker;
private final d80.j comesFrom;
private VipController2 controller;
private final d80.j isDeliveryEnabled;
private final d80.j listID;
private final d80.j productID;
private final d80.j similarAdsCount;
private final an.a vasType;
public ViewModelProvider.Factory viewModelFactory;
private final d80.j vipVM;
static final KProperty<Object>[] $$delegatedProperties = {o0.i(new g0(VipFragment2.class, "animator", "getAnimator()Landroid/widget/ViewAnimator;", 0)), o0.i(new g0(VipFragment2.class, "recycler", "getRecycler()Landroidx/recyclerview/widget/RecyclerView;", 0)), o0.i(new g0(VipFragment2.class, "error", "getError()Lby/kufar/re/ui/widget/error/ErrorView;", 0))};
public static final Companion INSTANCE = new Companion(null);
public static final int $stable = 8;
private final i6.c animator = bindView(R$id.f19431a);
private final i6.c recycler = bindView(R$id.Q0);
private final i6.c error = bindView(R$id.L);
@Metadata(d1 = {"\u0000,\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\t\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\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\u0016\u0010\u0017JG\u0010\r\u001a\u00020\f2\b\u0010\u0003\u001a\u0004\u0018\u00010\u00022\b\u0010\u0004\u001a\u0004\u0018\u00010\u00022\b\u0010\u0006\u001a\u0004\u0018\u00010\u00052\b\u0010\b\u001a\u0004\u0018\u00010\u00072\u0006\u0010\n\u001a\u00020\t2\b\u0010\u000b\u001a\u0004\u0018\u00010\u0002¢\u0006\u0004\b\r\u0010\u000eR\u0014\u0010\u000f\u001a\u00020\u00058\u0002X\u0082T¢\u0006\u0006\n\u0004\b\u000f\u0010\u0010R\u0014\u0010\u0011\u001a\u00020\u00058\u0002X\u0082T¢\u0006\u0006\n\u0004\b\u0011\u0010\u0010R\u0014\u0010\u0012\u001a\u00020\u00058\u0002X\u0082T¢\u0006\u0006\n\u0004\b\u0012\u0010\u0010R\u0014\u0010\u0013\u001a\u00020\u00058\u0002X\u0082T¢\u0006\u0006\n\u0004\b\u0013\u0010\u0010R\u0014\u0010\u0014\u001a\u00020\u00058\u0002X\u0082T¢\u0006\u0006\n\u0004\b\u0014\u0010\u0010R\u0014\u0010\u0015\u001a\u00020\u00058\u0002X\u0082T¢\u0006\u0006\n\u0004\b\u0015\u0010\u0010¨\u0006\u0018"}, d2 = {"Lby/kufar/vas/ui/vas/vip/VipFragment2$a;", "", "", "listId", "adId", "", "productID", "Ldb/s0$a;", "comesFrom", "", "isDeliveryEnabled", "similarAdsCount", "Landroidx/fragment/app/Fragment;", "a", "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/String;Ldb/s0$a;ZLjava/lang/Long;)Landroidx/fragment/app/Fragment;", "AD_ID", "Ljava/lang/String;", VipFragment2.KEY_COMES_FROM, VipFragment2.KEY_DELIVERY_ENABLED, VipFragment2.KEY_SIMILAR_ADS, VipFragment2.LIST_ID, "PRODUCT_ID", "<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 Fragment a(Long listId, Long adId, String productID, s0.a comesFrom, boolean isDeliveryEnabled, Long similarAdsCount) {
VipFragment2 vipFragment2 = new VipFragment2();
vipFragment2.setArguments(BundleKt.bundleOf(u.a(VipFragment2.LIST_ID, listId), u.a("AD_ID", adId), u.a(VipFragment2.KEY_COMES_FROM, comesFrom), u.a(VipFragment2.KEY_DELIVERY_ENABLED, Boolean.valueOf(isDeliveryEnabled)), u.a(VipFragment2.KEY_SIMILAR_ADS, similarAdsCount)));
return vipFragment2;
}
}
@Metadata(k = 3, mv = {1, 9, 0}, xi = 48)
public class b {
public static final int[] $EnumSwitchMapping$0;
static {
int[] iArr = new int[s0.a.values().length];
try {
iArr[s0.a.f73655b.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
iArr[s0.a.f73656c.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
$EnumSwitchMapping$0 = iArr;
}
}
@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 c extends kotlin.jvm.internal.u implements Function1<by.kufar.vas.ui.vas.a, Unit> {
public final String f20806e;
public final long f20807f;
public final boolean f20808g;
public final String f20809h;
public c(String str, long j11, boolean z11, String str2) {
super(1);
this.f20806e = str;
this.f20807f = j11;
this.f20808g = z11;
this.f20809h = str2;
}
public final void a(by.kufar.vas.ui.vas.a openVasFragmentOrThrow) {
kotlin.jvm.internal.s.j(openVasFragmentOrThrow, "$this$openVasFragmentOrThrow");
boolean isDeliveryEnabled = VipFragment2.this.isDeliveryEnabled();
a.C0342a.b(openVasFragmentOrThrow, this.f20806e, this.f20807f, this.f20808g, null, VipFragment2.this.vasType, isDeliveryEnabled, 8, null);
if (this.f20809h != null) {
VipFragment2.this.getBumpTracker().k(this.f20809h, this.f20807f);
}
}
@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 static final class d implements Observer, kotlin.jvm.internal.m {
public final Function1 f20810b;
public d(Function1 function) {
kotlin.jvm.internal.s.j(function, "function");
this.f20810b = 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.f20810b;
}
public final int hashCode() {
return getFunctionDelegate().hashCode();
}
@Override
public final void onChanged(Object obj) {
this.f20810b.invoke(obj);
}
}
@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 e extends kotlin.jvm.internal.u implements Function1<View, Unit> {
public e() {
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");
VipFragment2.this.getVipVM().load(VipFragment2.this.vasType, VipFragment2.this.getAdID(), VipFragment2.this.getListID(), true, VipFragment2.this.getComesFrom(), VipFragment2.this.isDeliveryEnabled(), VipFragment2.this.getSimilarAdsCount());
}
}
@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 f extends kotlin.jvm.internal.u implements Function1<OnBackPressedCallback, Unit> {
public f() {
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");
VipFragment2.this.getBumpTracker().t();
FragmentActivity activity = VipFragment2.this.getActivity();
if (activity != null) {
activity.finish();
}
}
}
@Metadata(k = 3, mv = {1, 9, 0}, xi = 48)
public class g extends kotlin.jvm.internal.p implements Function1<VipVM2.a, Unit> {
public g(Object obj) {
super(1, obj, VipFragment2.class, "handleState", "handleState(Lby/kufar/vas/ui/vas/vip/VipVM2$State;)V", 0);
}
public final void a(VipVM2.a p02) {
kotlin.jvm.internal.s.j(p02, "p0");
((VipFragment2) this.receiver).handleState(p02);
}
@Override
public Unit invoke(VipVM2.a aVar) {
a(aVar);
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 h extends kotlin.jvm.internal.u implements Function1<by.kufar.vas.ui.vas.a, Unit> {
public final long f20813d;
public final VipFragment2 f20814e;
public h(long j11, VipFragment2 vipFragment2) {
super(1);
this.f20813d = j11;
this.f20814e = vipFragment2;
}
public final void a(by.kufar.vas.ui.vas.a openVasFragmentOrThrow) {
kotlin.jvm.internal.s.j(openVasFragmentOrThrow, "$this$openVasFragmentOrThrow");
openVasFragmentOrThrow.openBumpTipDialog(this.f20813d, this.f20814e.vasType);
this.f20814e.getBumpTracker().C();
}
@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 i extends kotlin.jvm.internal.u implements Function0<String> {
public i() {
super(0);
}
@Override
public final String invoke() {
Bundle arguments = VipFragment2.this.getArguments();
if (arguments != null) {
return arguments.getString("PRODUCT_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 j extends kotlin.jvm.internal.u implements Function0<Long> {
public j() {
super(0);
}
@Override
public final Long invoke() {
Bundle arguments = VipFragment2.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 k extends kotlin.jvm.internal.u implements Function0<Long> {
public k() {
super(0);
}
@Override
public final Long invoke() {
Bundle arguments = VipFragment2.this.getArguments();
if (arguments != null) {
kotlin.jvm.internal.s.g(arguments);
return s5.b.a(arguments, VipFragment2.LIST_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 l extends kotlin.jvm.internal.u implements Function0<Long> {
public l() {
super(0);
}
@Override
public final Long invoke() {
long j11;
Bundle arguments = VipFragment2.this.getArguments();
if (arguments != null) {
j11 = arguments.getLong(VipFragment2.KEY_SIMILAR_ADS);
} else {
j11 = 0;
}
return Long.valueOf(j11);
}
}
@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 m extends kotlin.jvm.internal.u implements Function0<s0.a> {
public m() {
super(0);
}
@Override
public final s0.a invoke() {
Serializable serializable;
Bundle arguments = VipFragment2.this.getArguments();
if (arguments != null) {
serializable = arguments.getSerializable(VipFragment2.KEY_COMES_FROM);
} else {
serializable = null;
}
if (!(serializable instanceof s0.a)) {
return null;
}
return (s0.a) serializable;
}
}
@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 n extends kotlin.jvm.internal.u implements Function0<Boolean> {
public n() {
super(0);
}
@Override
public final Boolean invoke() {
boolean z11;
Bundle arguments = VipFragment2.this.getArguments();
if (arguments != null) {
z11 = arguments.getBoolean(VipFragment2.KEY_DELIVERY_ENABLED);
} else {
z11 = false;
}
return Boolean.valueOf(z11);
}
}
@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 o extends kotlin.jvm.internal.u implements Function0<Fragment> {
public final Fragment f20821d;
public o(Fragment fragment) {
super(0);
this.f20821d = fragment;
}
@Override
public final Fragment invoke() {
return this.f20821d;
}
}
@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 p extends kotlin.jvm.internal.u implements Function0<ViewModelStoreOwner> {
public final Function0 f20822d;
public p(Function0 function0) {
super(0);
this.f20822d = function0;
}
@Override
public final ViewModelStoreOwner invoke() {
return (ViewModelStoreOwner) this.f20822d.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 q extends kotlin.jvm.internal.u implements Function0<ViewModelStore> {
public final d80.j f20823d;
public q(d80.j jVar) {
super(0);
this.f20823d = jVar;
}
@Override
public final ViewModelStore invoke() {
ViewModelStoreOwner m4202viewModels$lambda1;
m4202viewModels$lambda1 = FragmentViewModelLazyKt.m4202viewModels$lambda1(this.f20823d);
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 r extends kotlin.jvm.internal.u implements Function0<CreationExtras> {
public final Function0 f20824d;
public final d80.j f20825e;
public r(Function0 function0, d80.j jVar) {
super(0);
this.f20824d = function0;
this.f20825e = jVar;
}
@Override
public final CreationExtras invoke() {
ViewModelStoreOwner m4202viewModels$lambda1;
CreationExtras creationExtras;
Function0 function0 = this.f20824d;
if (function0 != null && (creationExtras = (CreationExtras) function0.invoke()) != null) {
return creationExtras;
}
m4202viewModels$lambda1 = FragmentViewModelLazyKt.m4202viewModels$lambda1(this.f20825e);
HasDefaultViewModelProviderFactory hasDefaultViewModelProviderFactory = m4202viewModels$lambda1 instanceof HasDefaultViewModelProviderFactory ? (HasDefaultViewModelProviderFactory) m4202viewModels$lambda1 : null;
CreationExtras defaultViewModelCreationExtras = hasDefaultViewModelProviderFactory != null ? hasDefaultViewModelProviderFactory.getDefaultViewModelCreationExtras() : null;
return defaultViewModelCreationExtras == null ? CreationExtras.Empty.INSTANCE : defaultViewModelCreationExtras;
}
}
@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 s extends kotlin.jvm.internal.u implements Function0<ViewModelProvider.Factory> {
public s() {
super(0);
}
@Override
public final ViewModelProvider.Factory invoke() {
return VipFragment2.this.getViewModelFactory();
}
}
public VipFragment2() {
s sVar = new s();
o oVar = new o(this);
d80.m mVar = d80.m.f73493d;
d80.j a11 = d80.k.a(mVar, new p(oVar));
this.vipVM = FragmentViewModelLazyKt.createViewModelLazy(this, o0.b(VipVM2.class), new q(a11), new r(null, a11), sVar);
this.productID = d80.k.a(mVar, new i());
this.adID = d80.k.a(mVar, new j());
this.listID = d80.k.a(mVar, new k());
this.similarAdsCount = d80.k.a(mVar, new l());
this.comesFrom = d80.k.a(mVar, new m());
this.isDeliveryEnabled = d80.k.a(mVar, new n());
this.vasType = an.a.f751e;
}
public final Long getAdID() {
return (Long) this.adID.getValue();
}
private final ViewAnimator getAnimator() {
return (ViewAnimator) this.animator.getValue(this, $$delegatedProperties[0]);
}
public final s0.a getComesFrom() {
return (s0.a) this.comesFrom.getValue();
}
private final ErrorView getError() {
return (ErrorView) this.error.getValue(this, $$delegatedProperties[2]);
}
public final Long getListID() {
return (Long) this.listID.getValue();
}
private final String getProductID() {
return (String) this.productID.getValue();
}
private final RecyclerView getRecycler() {
return (RecyclerView) this.recycler.getValue(this, $$delegatedProperties[1]);
}
public final long getSimilarAdsCount() {
return ((Number) this.similarAdsCount.getValue()).longValue();
}
public final VipVM2 getVipVM() {
return (VipVM2) this.vipVM.getValue();
}
public final void handleState(VipVM2.a state) {
boolean z11;
boolean z12;
boolean z13;
int i11 = -1;
if (state instanceof VipVM2.a.C0375a) {
ViewAnimator animator = getAnimator();
int i12 = R$id.Q0;
Iterator<View> it = ViewGroupKt.getChildren(animator).iterator();
int i13 = 0;
while (true) {
if (!it.hasNext()) {
break;
}
View next = it.next();
if (i13 < 0) {
t.x();
}
if (next.getId() == i12) {
z13 = true;
} else {
z13 = false;
}
if (z13) {
i11 = i13;
break;
}
i13++;
}
if (animator.getDisplayedChild() != i11) {
if (i11 >= 0) {
animator.setDisplayedChild(i11);
} else {
throw new IllegalArgumentException("View with ID " + i12 + " not found.");
}
}
VipController2 vipController2 = this.controller;
if (vipController2 == null) {
kotlin.jvm.internal.s.B("controller");
vipController2 = null;
}
vipController2.setItems(((VipVM2.a.C0375a) state).a());
getBumpTracker().L(getAdID());
return;
}
if (state instanceof VipVM2.a.b) {
ViewAnimator animator2 = getAnimator();
int i14 = R$id.L;
Iterator<View> it2 = ViewGroupKt.getChildren(animator2).iterator();
int i15 = 0;
while (true) {
if (!it2.hasNext()) {
break;
}
View next2 = it2.next();
if (i15 < 0) {
t.x();
}
if (next2.getId() == i14) {
z12 = true;
} else {
z12 = false;
}
if (z12) {
i11 = i15;
break;
}
i15++;
}
if (animator2.getDisplayedChild() != i11) {
if (i11 >= 0) {
animator2.setDisplayedChild(i11);
} else {
throw new IllegalArgumentException("View with ID " + i14 + " not found.");
}
}
getError().setupError(((VipVM2.a.b) state).getException());
return;
}
if (kotlin.jvm.internal.s.e(state, VipVM2.a.c.f20829a)) {
ViewAnimator animator3 = getAnimator();
int i16 = R$id.I0;
Iterator<View> it3 = ViewGroupKt.getChildren(animator3).iterator();
int i17 = 0;
while (true) {
if (!it3.hasNext()) {
break;
}
View next3 = it3.next();
if (i17 < 0) {
t.x();
}
if (next3.getId() == i16) {
z11 = true;
} else {
z11 = false;
}
if (z11) {
i11 = i17;
break;
}
i17++;
}
if (animator3.getDisplayedChild() != i11) {
if (i11 >= 0) {
animator3.setDisplayedChild(i11);
return;
}
throw new IllegalArgumentException("View with ID " + i16 + " not found.");
}
return;
}
throw new d80.n();
}
public final boolean isDeliveryEnabled() {
return ((Boolean) this.isDeliveryEnabled.getValue()).booleanValue();
}
private final void loadSingleProduct() {
String productID = getProductID();
Long adID = getAdID();
if (productID != null && adID != null) {
openPaymentsFragment(productID, adID.longValue(), null, false);
}
}
private final void openPaymentsFragment(String productID, long adID, String subType, boolean addToBackStack) {
by.kufar.vas.ui.vas.b.a(this, new c(productID, adID, addToBackStack, subType));
}
public static void openPaymentsFragment$default(VipFragment2 vipFragment2, String str, long j11, String str2, boolean z11, int i11, Object obj) {
boolean z12;
if ((i11 & 8) != 0) {
z12 = true;
} else {
z12 = z11;
}
vipFragment2.openPaymentsFragment(str, j11, str2, z12);
}
private final void setUpListeners() {
OnBackPressedDispatcher onBackPressedDispatcher;
getError().setOnRetryListener(new e());
FragmentActivity activity = getActivity();
if (activity != null && (onBackPressedDispatcher = activity.getOnBackPressedDispatcher()) != null) {
OnBackPressedDispatcherKt.addCallback$default(onBackPressedDispatcher, getViewLifecycleOwner(), false, new f(), 2, null);
}
}
private final void setUpRecycler() {
this.controller = new VipController2(this);
RecyclerView recycler = getRecycler();
VipController2 vipController2 = this.controller;
if (vipController2 == null) {
kotlin.jvm.internal.s.B("controller");
vipController2 = null;
}
recycler.setAdapter(vipController2.getAdapter());
getRecycler().setHasFixedSize(true);
getRecycler().addItemDecoration(new VasOffsetItemDecorator(16, 0));
getRecycler().setLayoutManager(new LinearLayoutManager(requireContext()));
getVipVM().getState().observe(getViewLifecycleOwner(), new d(new g(this)));
getVipVM().load(this.vasType, getAdID(), getListID(), false, getComesFrom(), isDeliveryEnabled(), getSimilarAdsCount());
}
private final void setUpTitle() {
int i11;
int i12;
hp.d dVar;
s0.a comesFrom = getComesFrom();
if (comesFrom == null) {
i11 = -1;
} else {
i11 = b.$EnumSwitchMapping$0[comesFrom.ordinal()];
}
boolean z11 = true;
if (i11 != -1) {
if (i11 != 1) {
if (i11 == 2) {
i12 = R$string.T0;
} else {
throw new d80.n();
}
} else {
i12 = R$string.T0;
}
} else {
i12 = R$string.P0;
}
KeyEventDispatcher.Component activity = getActivity();
if (activity instanceof hp.d) {
dVar = (hp.d) activity;
} else {
dVar = null;
}
if (dVar != null) {
if (getComesFrom() == null) {
z11 = false;
}
dVar.setToolbarTitle(i12, z11);
}
}
private final void showBumpTipDialog(long subCategory) {
by.kufar.vas.ui.vas.b.a(this, new h(subCategory, this));
}
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 ViewModelProvider.Factory getViewModelFactory() {
ViewModelProvider.Factory factory = this.viewModelFactory;
if (factory != null) {
return factory;
}
kotlin.jvm.internal.s.B("viewModelFactory");
return null;
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
kotlin.jvm.internal.s.j(inflater, "inflater");
return inflater.inflate(R$layout.f19568v0, container, false);
}
@Override
public void onHeaderClick(m.Data data) {
kotlin.jvm.internal.s.j(data, "data");
showBumpTipDialog(data.getSubCategory());
}
@Override
public void onInject() {
super.onInject();
by.kufar.vas.ui.vas.d.b(this).s(this);
}
@Override
public void onKufarDeliveryClick() {
Context context = getContext();
if (context == null) {
return;
}
startActivity(WebViewActivity.Companion.b(WebViewActivity.INSTANCE, context, "https://support.kufar.by/hc/ru/articles/360019765637?utm_source=Web&utm_medium=HowDeliveryWorksLink&utm_campaign=3rdStepOfAdCreationFree", false, null, false, false, 60, null));
}
@Override
public void onReadMoreTipsClick() {
Context context = getContext();
if (context == null) {
return;
}
startActivity(WebViewActivity.Companion.b(WebViewActivity.INSTANCE, context, "https://support.kufar.by/hc/ru/articles/360003117578-%D0%9A%D0%B0%D0%BA-%D0%BD%D0%B5-%D1%81%D1%82%D0%B0%D1%82%D1%8C-%D0%B6%D0%B5%D1%80%D1%82%D0%B2%D0%BE%D0%B9-%D0%BC%D0%BE%D1%88%D0%B5%D0%BD%D0%BD%D0%B8%D0%BA%D0%BE%D0%B2?utm_source=kufar&utm_medium=android&utm_campaign=safety_ad_insertion", false, null, false, false, 60, null));
}
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
kotlin.jvm.internal.s.j(view, "view");
super.onViewCreated(view, savedInstanceState);
loadSingleProduct();
setUpRecycler();
setUpTitle();
setUpListeners();
}
@Override
public void onVipViewClick(String productID, long adID, String subType) {
kotlin.jvm.internal.s.j(productID, "productID");
kotlin.jvm.internal.s.j(subType, "subType");
openPaymentsFragment$default(this, productID, adID, subType, false, 8, null);
}
public final void setBumpTracker(xo.a aVar) {
kotlin.jvm.internal.s.j(aVar, "<set-?>");
this.bumpTracker = aVar;
}
public final void setViewModelFactory(ViewModelProvider.Factory factory) {
kotlin.jvm.internal.s.j(factory, "<set-?>");
this.viewModelFactory = factory;
}
}