package com.discord.stores; import android.content.Context; import com.discord.models.domain.ModelPaymentSource; import com.discord.models.domain.PaymentSourceRaw; import com.discord.stores.StorePaymentSources; import com.discord.utilities.error.Error; import com.discord.utilities.rx.ObservableExtensionsKt; import d0.z.d.m; import d0.z.d.o; import j0.k.b; import java.util.List; import kotlin.Unit; import kotlin.jvm.functions.Function0; import kotlin.jvm.functions.Function1; import rx.Observable; /* compiled from: StorePaymentSources.kt */ public final class StorePaymentSources$fetchPaymentSources$1 extends o implements Function0 { public final /* synthetic */ StorePaymentSources this$0; /* compiled from: StorePaymentSources.kt */ /* renamed from: com.discord.stores.StorePaymentSources$fetchPaymentSources$1$1 reason: invalid class name */ public static final class AnonymousClass1 implements b, List> { public final /* synthetic */ StorePaymentSources$fetchPaymentSources$1 this$0; public AnonymousClass1(StorePaymentSources$fetchPaymentSources$1 storePaymentSources$fetchPaymentSources$1) { this.this$0 = storePaymentSources$fetchPaymentSources$1; } /* 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 // j0.k.b public /* bridge */ /* synthetic */ List call(List list) { return call((List) list); } public final List call(List list) { StorePaymentSources storePaymentSources = this.this$0.this$0; m.checkNotNullExpressionValue(list, "it"); return StorePaymentSources.access$ensureDefaultPaymentSource(storePaymentSources, list); } } /* compiled from: StorePaymentSources.kt */ /* renamed from: com.discord.stores.StorePaymentSources$fetchPaymentSources$1$2 reason: invalid class name */ public static final class AnonymousClass2 extends o implements Function1, Unit> { public final /* synthetic */ StorePaymentSources$fetchPaymentSources$1 this$0; /* compiled from: StorePaymentSources.kt */ /* renamed from: com.discord.stores.StorePaymentSources$fetchPaymentSources$1$2$1 reason: invalid class name */ public static final class AnonymousClass1 extends o implements Function0 { public final /* synthetic */ List $paymentSources; public final /* synthetic */ AnonymousClass2 this$0; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public AnonymousClass1(AnonymousClass2 r1, List list) { super(0); this.this$0 = r1; this.$paymentSources = list; } @Override // kotlin.jvm.functions.Function0 /* renamed from: invoke */ public final void mo1invoke() { StorePaymentSources storePaymentSources = this.this$0.this$0.this$0; List list = this.$paymentSources; m.checkNotNullExpressionValue(list, "paymentSources"); StorePaymentSources.access$handlePaymentSourcesFetchSuccess(storePaymentSources, list); } } /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public AnonymousClass2(StorePaymentSources$fetchPaymentSources$1 storePaymentSources$fetchPaymentSources$1) { super(1); this.this$0 = storePaymentSources$fetchPaymentSources$1; } /* 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(List list) { invoke(list); return Unit.a; } public final void invoke(List list) { StorePaymentSources.access$getDispatcher$p(this.this$0.this$0).schedule(new AnonymousClass1(this, list)); } } /* compiled from: StorePaymentSources.kt */ /* renamed from: com.discord.stores.StorePaymentSources$fetchPaymentSources$1$3 reason: invalid class name */ public static final class AnonymousClass3 extends o implements Function1 { public final /* synthetic */ StorePaymentSources$fetchPaymentSources$1 this$0; /* compiled from: StorePaymentSources.kt */ /* renamed from: com.discord.stores.StorePaymentSources$fetchPaymentSources$1$3$1 reason: invalid class name */ public static final class AnonymousClass1 extends o implements Function0 { public final /* synthetic */ AnonymousClass3 this$0; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public AnonymousClass1(AnonymousClass3 r1) { super(0); this.this$0 = r1; } @Override // kotlin.jvm.functions.Function0 /* renamed from: invoke */ public final void mo1invoke() { StorePaymentSources.access$handlePaymentSourcesFetchFailure(this.this$0.this$0.this$0); } } /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public AnonymousClass3(StorePaymentSources$fetchPaymentSources$1 storePaymentSources$fetchPaymentSources$1) { super(1); this.this$0 = storePaymentSources$fetchPaymentSources$1; } /* 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(Error error) { invoke(error); return Unit.a; } public final void invoke(Error error) { m.checkNotNullParameter(error, "it"); StorePaymentSources.access$getDispatcher$p(this.this$0.this$0).schedule(new AnonymousClass1(this)); } } /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public StorePaymentSources$fetchPaymentSources$1(StorePaymentSources storePaymentSources) { super(0); this.this$0 = storePaymentSources; } @Override // kotlin.jvm.functions.Function0 /* renamed from: invoke */ public final void mo1invoke() { if (!(StorePaymentSources.access$getPaymentSourcesState$p(this.this$0) instanceof StorePaymentSources.PaymentSourcesState.Loading)) { StorePaymentSources.access$handlePaymentSourcesFetchStart(this.this$0); Observable F = ObservableExtensionsKt.restSubscribeOn$default(StorePaymentSources.access$getRestAPI$p(this.this$0).getPaymentSources(), false, 1, null).F(new AnonymousClass1(this)); m.checkNotNullExpressionValue(F, "restAPI\n .getPa…efaultPaymentSource(it) }"); ObservableExtensionsKt.appSubscribe$default(F, this.this$0.getClass(), (Context) null, (Function1) null, new AnonymousClass3(this), (Function0) null, (Function0) null, new AnonymousClass2(this), 54, (Object) null); } } }