Initial import of ADIF API reverse-engineering toolkit
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package com.adif.elcanomovil.widget.configuration;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.FunctionReferenceImpl;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
@Metadata(k = 3, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public /* synthetic */ class ConfigureWidgetFragment$onViewCreated$1$1 extends FunctionReferenceImpl implements Function1<String, Unit> {
|
||||
public ConfigureWidgetFragment$onViewCreated$1$1(Object obj) {
|
||||
super(1, obj, ConfigureWidgetFragment.class, "handleSelectedStation", "handleSelectedStation(Ljava/lang/String;)V", 0);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public /* bridge */ /* synthetic */ Unit invoke(String str) {
|
||||
invoke2(str);
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
|
||||
/* renamed from: invoke, reason: avoid collision after fix types in other method */
|
||||
public final void invoke2(String p02) {
|
||||
Intrinsics.checkNotNullParameter(p02, "p0");
|
||||
((ConfigureWidgetFragment) this.receiver).handleSelectedStation(p02);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.adif.elcanomovil.widget.configuration;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.FunctionReferenceImpl;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
@Metadata(k = 3, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public /* synthetic */ class ConfigureWidgetFragment$onViewCreated$1$2 extends FunctionReferenceImpl implements Function1<String, Unit> {
|
||||
public ConfigureWidgetFragment$onViewCreated$1$2(Object obj) {
|
||||
super(1, obj, ConfigureWidgetFragment.class, "handleSelectedStationTo", "handleSelectedStationTo(Ljava/lang/String;)V", 0);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public /* bridge */ /* synthetic */ Unit invoke(String str) {
|
||||
invoke2(str);
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
|
||||
/* renamed from: invoke, reason: avoid collision after fix types in other method */
|
||||
public final void invoke2(String p02) {
|
||||
Intrinsics.checkNotNullParameter(p02, "p0");
|
||||
((ConfigureWidgetFragment) this.receiver).handleSelectedStationTo(p02);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.adif.elcanomovil.widget.configuration;
|
||||
|
||||
import androidx.lifecycle.Y;
|
||||
import kotlin.Function;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.FunctionAdapter;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
@Metadata(k = 3, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public final class ConfigureWidgetFragment$sam$androidx_lifecycle_Observer$0 implements Y, FunctionAdapter {
|
||||
private final /* synthetic */ Function1 function;
|
||||
|
||||
public ConfigureWidgetFragment$sam$androidx_lifecycle_Observer$0(Function1 function) {
|
||||
Intrinsics.checkNotNullParameter(function, "function");
|
||||
this.function = function;
|
||||
}
|
||||
|
||||
public final boolean equals(Object obj) {
|
||||
if ((obj instanceof Y) && (obj instanceof FunctionAdapter)) {
|
||||
return Intrinsics.areEqual(getFunctionDelegate(), ((FunctionAdapter) obj).getFunctionDelegate());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.internal.FunctionAdapter
|
||||
public final Function<?> getFunctionDelegate() {
|
||||
return this.function;
|
||||
}
|
||||
|
||||
public final int hashCode() {
|
||||
return getFunctionDelegate().hashCode();
|
||||
}
|
||||
|
||||
@Override // androidx.lifecycle.Y
|
||||
public final /* synthetic */ void onChanged(Object obj) {
|
||||
this.function.invoke(obj);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,412 @@
|
||||
package com.adif.elcanomovil.widget.configuration;
|
||||
|
||||
import D.m;
|
||||
import D1.a;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.fragment.app.K;
|
||||
import androidx.lifecycle.C0;
|
||||
import androidx.lifecycle.D0;
|
||||
import androidx.lifecycle.InterfaceC0200v;
|
||||
import androidx.lifecycle.J;
|
||||
import androidx.lifecycle.y0;
|
||||
import b1.InterfaceC0266a;
|
||||
import b1.f;
|
||||
import com.adif.elcanomovil.commonNavGraph.arguments.NavArguments;
|
||||
import com.adif.elcanomovil.commonNavGraph.extensions.NavigationExtensionsKt;
|
||||
import com.adif.elcanomovil.commonNavGraph.navigation.NavigationHandler;
|
||||
import com.adif.elcanomovil.commonViews.databinding.LoadingEmptyOrErrorCommonViewBinding;
|
||||
import com.adif.elcanomovil.domain.entities.TrainType;
|
||||
import com.adif.elcanomovil.uiDepartures.views.StationAction;
|
||||
import com.adif.elcanomovil.uiDepartures.views.StationHeaderView;
|
||||
import com.adif.elcanomovil.widget.ConfigActivityParent;
|
||||
import com.adif.elcanomovil.widget.R;
|
||||
import com.adif.elcanomovil.widget.databinding.WidgetConfigurationFragmentBinding;
|
||||
import com.google.android.gms.common.internal.ServiceSpecificExtraArgs;
|
||||
import com.google.android.material.button.MaterialButton;
|
||||
import dagger.hilt.android.AndroidEntryPoint;
|
||||
import g.AbstractActivityC0364k;
|
||||
import kotlin.Lazy;
|
||||
import kotlin.LazyKt;
|
||||
import kotlin.LazyThreadSafetyMode;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.jvm.functions.Function0;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.Reflection;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import l0.C0435a;
|
||||
import l0.c;
|
||||
import m3.d;
|
||||
import m3.l;
|
||||
import o0.AbstractC0544v;
|
||||
|
||||
@Metadata(d1 = {"\u0000H\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0007\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u0002\u0010\u0003J\u0017\u0010\u0007\u001a\u00020\u00062\u0006\u0010\u0005\u001a\u00020\u0004H\u0002¢\u0006\u0004\b\u0007\u0010\bJ\u0017\u0010\t\u001a\u00020\u00062\u0006\u0010\u0005\u001a\u00020\u0004H\u0002¢\u0006\u0004\b\t\u0010\bJ\u000f\u0010\n\u001a\u00020\u0006H\u0002¢\u0006\u0004\b\n\u0010\u0003J\u000f\u0010\u000b\u001a\u00020\u0006H\u0002¢\u0006\u0004\b\u000b\u0010\u0003J\u000f\u0010\f\u001a\u00020\u0006H\u0002¢\u0006\u0004\b\f\u0010\u0003J\u0017\u0010\u000f\u001a\u00020\u00062\u0006\u0010\u000e\u001a\u00020\rH\u0016¢\u0006\u0004\b\u000f\u0010\u0010J!\u0010\u0015\u001a\u00020\u00062\u0006\u0010\u0012\u001a\u00020\u00112\b\u0010\u0014\u001a\u0004\u0018\u00010\u0013H\u0016¢\u0006\u0004\b\u0015\u0010\u0016R\u0018\u0010\u0018\u001a\u0004\u0018\u00010\u00178\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\u0018\u0010\u0019R\u001b\u0010\u001f\u001a\u00020\u001a8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b\u001b\u0010\u001c\u001a\u0004\b\u001d\u0010\u001eR\u0018\u0010!\u001a\u0004\u0018\u00010 8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b!\u0010\"¨\u0006#"}, d2 = {"Lcom/adif/elcanomovil/widget/configuration/ConfigureWidgetFragment;", "Landroidx/fragment/app/K;", "<init>", "()V", "", "station", "", "handleSelectedStation", "(Ljava/lang/String;)V", "handleSelectedStationTo", "configureView", "configureObservers", "configureViewListeners", "Landroid/content/Context;", "context", "onAttach", "(Landroid/content/Context;)V", "Landroid/view/View;", "view", "Landroid/os/Bundle;", "savedInstanceState", "onViewCreated", "(Landroid/view/View;Landroid/os/Bundle;)V", "Lcom/adif/elcanomovil/widget/databinding/WidgetConfigurationFragmentBinding;", "binding", "Lcom/adif/elcanomovil/widget/databinding/WidgetConfigurationFragmentBinding;", "Lcom/adif/elcanomovil/widget/configuration/ConfigureWidgetViewModel;", "viewModel$delegate", "Lkotlin/Lazy;", "getViewModel", "()Lcom/adif/elcanomovil/widget/configuration/ConfigureWidgetViewModel;", "viewModel", "Lcom/adif/elcanomovil/widget/ConfigActivityParent;", ServiceSpecificExtraArgs.CastExtraArgs.LISTENER, "Lcom/adif/elcanomovil/widget/ConfigActivityParent;", "widget_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
@AndroidEntryPoint
|
||||
@SourceDebugExtension({"SMAP\nConfigureWidgetFragment.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ConfigureWidgetFragment.kt\ncom/adif/elcanomovil/widget/configuration/ConfigureWidgetFragment\n+ 2 FragmentViewModelLazy.kt\nandroidx/fragment/app/FragmentViewModelLazyKt\n*L\n1#1,131:1\n106#2,15:132\n*S KotlinDebug\n*F\n+ 1 ConfigureWidgetFragment.kt\ncom/adif/elcanomovil/widget/configuration/ConfigureWidgetFragment\n*L\n25#1:132,15\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class ConfigureWidgetFragment extends Hilt_ConfigureWidgetFragment {
|
||||
private WidgetConfigurationFragmentBinding binding;
|
||||
private ConfigActivityParent listener;
|
||||
|
||||
/* renamed from: viewModel$delegate, reason: from kotlin metadata */
|
||||
private final Lazy viewModel;
|
||||
|
||||
public ConfigureWidgetFragment() {
|
||||
super(R.layout.widget_configuration_fragment);
|
||||
final Function0<K> function0 = new Function0<K>() { // from class: com.adif.elcanomovil.widget.configuration.ConfigureWidgetFragment$special$$inlined$viewModels$default$1
|
||||
{
|
||||
super(0);
|
||||
}
|
||||
|
||||
/* JADX WARN: Can't rename method to resolve collision */
|
||||
@Override // kotlin.jvm.functions.Function0
|
||||
public final K invoke() {
|
||||
return K.this;
|
||||
}
|
||||
};
|
||||
final Lazy lazy = LazyKt.lazy(LazyThreadSafetyMode.NONE, (Function0) new Function0<D0>() { // from class: com.adif.elcanomovil.widget.configuration.ConfigureWidgetFragment$special$$inlined$viewModels$default$2
|
||||
{
|
||||
super(0);
|
||||
}
|
||||
|
||||
/* JADX WARN: Can't rename method to resolve collision */
|
||||
@Override // kotlin.jvm.functions.Function0
|
||||
public final D0 invoke() {
|
||||
return (D0) Function0.this.invoke();
|
||||
}
|
||||
});
|
||||
final Function0 function02 = null;
|
||||
this.viewModel = d.n(this, Reflection.getOrCreateKotlinClass(ConfigureWidgetViewModel.class), new Function0<C0>() { // from class: com.adif.elcanomovil.widget.configuration.ConfigureWidgetFragment$special$$inlined$viewModels$default$3
|
||||
{
|
||||
super(0);
|
||||
}
|
||||
|
||||
/* JADX WARN: Can't rename method to resolve collision */
|
||||
@Override // kotlin.jvm.functions.Function0
|
||||
public final C0 invoke() {
|
||||
return ((D0) Lazy.this.getValue()).getViewModelStore();
|
||||
}
|
||||
}, new Function0<c>() { // from class: com.adif.elcanomovil.widget.configuration.ConfigureWidgetFragment$special$$inlined$viewModels$default$4
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
{
|
||||
super(0);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function0
|
||||
public final c invoke() {
|
||||
c cVar;
|
||||
Function0 function03 = Function0.this;
|
||||
if (function03 != null && (cVar = (c) function03.invoke()) != null) {
|
||||
return cVar;
|
||||
}
|
||||
D0 d02 = (D0) lazy.getValue();
|
||||
InterfaceC0200v interfaceC0200v = d02 instanceof InterfaceC0200v ? (InterfaceC0200v) d02 : null;
|
||||
return interfaceC0200v != null ? interfaceC0200v.getDefaultViewModelCreationExtras() : C0435a.f7312b;
|
||||
}
|
||||
}, new Function0<y0>() { // from class: com.adif.elcanomovil.widget.configuration.ConfigureWidgetFragment$special$$inlined$viewModels$default$5
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
{
|
||||
super(0);
|
||||
}
|
||||
|
||||
/* JADX WARN: Can't rename method to resolve collision */
|
||||
@Override // kotlin.jvm.functions.Function0
|
||||
public final y0 invoke() {
|
||||
y0 defaultViewModelProviderFactory;
|
||||
D0 d02 = (D0) lazy.getValue();
|
||||
InterfaceC0200v interfaceC0200v = d02 instanceof InterfaceC0200v ? (InterfaceC0200v) d02 : null;
|
||||
if (interfaceC0200v != null && (defaultViewModelProviderFactory = interfaceC0200v.getDefaultViewModelProviderFactory()) != null) {
|
||||
return defaultViewModelProviderFactory;
|
||||
}
|
||||
y0 defaultViewModelProviderFactory2 = K.this.getDefaultViewModelProviderFactory();
|
||||
Intrinsics.checkNotNullExpressionValue(defaultViewModelProviderFactory2, "defaultViewModelProviderFactory");
|
||||
return defaultViewModelProviderFactory2;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private final void configureObservers() {
|
||||
InterfaceC0266a navigation = getViewModel().getNavigation();
|
||||
J viewLifecycleOwner = getViewLifecycleOwner();
|
||||
Intrinsics.checkNotNullExpressionValue(viewLifecycleOwner, "getViewLifecycleOwner(...)");
|
||||
((f) navigation).a(viewLifecycleOwner, new NavigationHandler(this));
|
||||
getViewModel().getViewData().e(getViewLifecycleOwner(), new ConfigureWidgetFragment$sam$androidx_lifecycle_Observer$0(new Function1<WidgetViewConfigData, Unit>() { // from class: com.adif.elcanomovil.widget.configuration.ConfigureWidgetFragment$configureObservers$1
|
||||
{
|
||||
super(1);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public /* bridge */ /* synthetic */ Unit invoke(WidgetViewConfigData widgetViewConfigData) {
|
||||
invoke2(widgetViewConfigData);
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
|
||||
/* JADX WARN: Code restructure failed: missing block: B:2:0x0002, code lost:
|
||||
|
||||
r10 = r10.this$0.binding;
|
||||
*/
|
||||
/* renamed from: invoke, reason: avoid collision after fix types in other method */
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public final void invoke2(com.adif.elcanomovil.widget.configuration.WidgetViewConfigData r11) {
|
||||
/*
|
||||
r10 = this;
|
||||
if (r11 == 0) goto L78
|
||||
com.adif.elcanomovil.widget.configuration.ConfigureWidgetFragment r10 = com.adif.elcanomovil.widget.configuration.ConfigureWidgetFragment.this
|
||||
com.adif.elcanomovil.widget.databinding.WidgetConfigurationFragmentBinding r10 = com.adif.elcanomovil.widget.configuration.ConfigureWidgetFragment.access$getBinding$p(r10)
|
||||
if (r10 == 0) goto L78
|
||||
com.adif.elcanomovil.uiDepartures.views.StationHeaderView r0 = r10.stationHeader
|
||||
if (r0 == 0) goto L78
|
||||
com.adif.elcanomovil.domain.entities.TrainType r1 = com.adif.elcanomovil.domain.entities.TrainType.CERCANIAS
|
||||
java.lang.Boolean r10 = r11.getStationIsRodalies()
|
||||
java.lang.Boolean r2 = java.lang.Boolean.TRUE
|
||||
boolean r10 = kotlin.jvm.internal.Intrinsics.areEqual(r10, r2)
|
||||
if (r10 == 0) goto L27
|
||||
java.lang.Boolean r10 = r11.getStationToIsRodalies()
|
||||
boolean r10 = kotlin.jvm.internal.Intrinsics.areEqual(r10, r2)
|
||||
if (r10 == 0) goto L27
|
||||
goto L48
|
||||
L27:
|
||||
java.lang.Boolean r10 = r11.getStationIsRodalies()
|
||||
boolean r10 = kotlin.jvm.internal.Intrinsics.areEqual(r10, r2)
|
||||
if (r10 == 0) goto L38
|
||||
java.lang.Boolean r10 = r11.getStationToIsRodalies()
|
||||
if (r10 != 0) goto L38
|
||||
goto L48
|
||||
L38:
|
||||
java.lang.Boolean r10 = r11.getStationIsRodalies()
|
||||
if (r10 != 0) goto L4b
|
||||
java.lang.Boolean r10 = r11.getStationToIsRodalies()
|
||||
boolean r10 = kotlin.jvm.internal.Intrinsics.areEqual(r10, r2)
|
||||
if (r10 == 0) goto L4b
|
||||
L48:
|
||||
r10 = 1
|
||||
L49:
|
||||
r2 = r10
|
||||
goto L4d
|
||||
L4b:
|
||||
r10 = 0
|
||||
goto L49
|
||||
L4d:
|
||||
com.adif.elcanomovil.uiDepartures.views.TrafficAvailability r3 = com.adif.elcanomovil.uiDepartures.views.TrafficAvailability.BOTH
|
||||
java.lang.String r10 = r11.getStationName()
|
||||
java.lang.String r4 = ""
|
||||
if (r10 != 0) goto L58
|
||||
r10 = r4
|
||||
L58:
|
||||
java.lang.String r5 = r11.getStationName()
|
||||
if (r5 != 0) goto L5f
|
||||
r5 = r4
|
||||
L5f:
|
||||
java.lang.String r6 = r11.getStationToName()
|
||||
if (r6 != 0) goto L67
|
||||
r7 = r4
|
||||
goto L68
|
||||
L67:
|
||||
r7 = r6
|
||||
L68:
|
||||
java.lang.String r11 = r11.getStationToName()
|
||||
if (r11 != 0) goto L70
|
||||
r8 = r4
|
||||
goto L71
|
||||
L70:
|
||||
r8 = r11
|
||||
L71:
|
||||
com.adif.elcanomovil.domain.entities.CirculationType r9 = com.adif.elcanomovil.domain.entities.CirculationType.BETWEEN_STATIONS
|
||||
r6 = 0
|
||||
r4 = r10
|
||||
r0.update(r1, r2, r3, r4, r5, r6, r7, r8, r9)
|
||||
L78:
|
||||
return
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.adif.elcanomovil.widget.configuration.ConfigureWidgetFragment$configureObservers$1.invoke2(com.adif.elcanomovil.widget.configuration.WidgetViewConfigData):void");
|
||||
}
|
||||
}));
|
||||
getViewModel().getShowCreateWidgetButton().e(getViewLifecycleOwner(), new ConfigureWidgetFragment$sam$androidx_lifecycle_Observer$0(new Function1<Boolean, Unit>() { // from class: com.adif.elcanomovil.widget.configuration.ConfigureWidgetFragment$configureObservers$2
|
||||
{
|
||||
super(1);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public /* bridge */ /* synthetic */ Unit invoke(Boolean bool) {
|
||||
invoke2(bool);
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
|
||||
/* renamed from: invoke, reason: avoid collision after fix types in other method */
|
||||
public final void invoke2(Boolean bool) {
|
||||
WidgetConfigurationFragmentBinding widgetConfigurationFragmentBinding;
|
||||
widgetConfigurationFragmentBinding = ConfigureWidgetFragment.this.binding;
|
||||
MaterialButton materialButton = widgetConfigurationFragmentBinding != null ? widgetConfigurationFragmentBinding.creationWidgetButton : null;
|
||||
if (materialButton == null) {
|
||||
return;
|
||||
}
|
||||
materialButton.setVisibility(!bool.booleanValue() ? 8 : 0);
|
||||
}
|
||||
}));
|
||||
getViewModel().getFinishCreateWidget().e(getViewLifecycleOwner(), new ConfigureWidgetFragment$sam$androidx_lifecycle_Observer$0(new Function1<Boolean, Unit>() { // from class: com.adif.elcanomovil.widget.configuration.ConfigureWidgetFragment$configureObservers$3
|
||||
{
|
||||
super(1);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public /* bridge */ /* synthetic */ Unit invoke(Boolean bool) {
|
||||
invoke2(bool);
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
|
||||
/* renamed from: invoke, reason: avoid collision after fix types in other method */
|
||||
public final void invoke2(Boolean bool) {
|
||||
ConfigActivityParent configActivityParent;
|
||||
configActivityParent = ConfigureWidgetFragment.this.listener;
|
||||
if (configActivityParent != null) {
|
||||
Context requireContext = ConfigureWidgetFragment.this.requireContext();
|
||||
Intrinsics.checkNotNullExpressionValue(requireContext, "requireContext(...)");
|
||||
configActivityParent.taskDone(requireContext);
|
||||
}
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
private final void configureView() {
|
||||
StationHeaderView stationHeaderView;
|
||||
StationHeaderView stationHeaderView2;
|
||||
LoadingEmptyOrErrorCommonViewBinding loadingEmptyOrErrorCommonViewBinding;
|
||||
Toolbar toolbar;
|
||||
WidgetConfigurationFragmentBinding widgetConfigurationFragmentBinding = this.binding;
|
||||
if (widgetConfigurationFragmentBinding != null && (toolbar = widgetConfigurationFragmentBinding.toolbar) != null) {
|
||||
AbstractActivityC0364k abstractActivityC0364k = (AbstractActivityC0364k) getActivity();
|
||||
if (abstractActivityC0364k != null) {
|
||||
abstractActivityC0364k.setSupportActionBar(toolbar);
|
||||
}
|
||||
Context context = getContext();
|
||||
toolbar.setTitle(context != null ? context.getString(R.string.config_widget_title) : null);
|
||||
}
|
||||
WidgetConfigurationFragmentBinding widgetConfigurationFragmentBinding2 = this.binding;
|
||||
if (widgetConfigurationFragmentBinding2 != null && (loadingEmptyOrErrorCommonViewBinding = widgetConfigurationFragmentBinding2.empty) != null) {
|
||||
loadingEmptyOrErrorCommonViewBinding.iconNoResults.setImageResource(R.drawable.ic_no_results);
|
||||
TextView textView = loadingEmptyOrErrorCommonViewBinding.title;
|
||||
Context context2 = getContext();
|
||||
textView.setText(context2 != null ? context2.getString(R.string.config_widget_message_title) : null);
|
||||
TextView textView2 = loadingEmptyOrErrorCommonViewBinding.message;
|
||||
Context context3 = getContext();
|
||||
textView2.setText(context3 != null ? context3.getString(R.string.circulation_no_station_to_message) : null);
|
||||
}
|
||||
WidgetConfigurationFragmentBinding widgetConfigurationFragmentBinding3 = this.binding;
|
||||
if (widgetConfigurationFragmentBinding3 != null && (stationHeaderView2 = widgetConfigurationFragmentBinding3.stationHeader) != null) {
|
||||
stationHeaderView2.hideSwith(true);
|
||||
}
|
||||
WidgetConfigurationFragmentBinding widgetConfigurationFragmentBinding4 = this.binding;
|
||||
if (widgetConfigurationFragmentBinding4 == null || (stationHeaderView = widgetConfigurationFragmentBinding4.stationHeader) == null) {
|
||||
return;
|
||||
}
|
||||
stationHeaderView.hideButtons(true);
|
||||
}
|
||||
|
||||
private final void configureViewListeners() {
|
||||
MaterialButton materialButton;
|
||||
StationHeaderView stationHeaderView;
|
||||
StationHeaderView stationHeaderView2;
|
||||
WidgetConfigurationFragmentBinding widgetConfigurationFragmentBinding = this.binding;
|
||||
if (widgetConfigurationFragmentBinding != null && (stationHeaderView2 = widgetConfigurationFragmentBinding.stationHeader) != null) {
|
||||
stationHeaderView2.setOnTypeSelectionListener(new Function1<TrainType, Unit>() { // from class: com.adif.elcanomovil.widget.configuration.ConfigureWidgetFragment$configureViewListeners$1
|
||||
{
|
||||
super(1);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public /* bridge */ /* synthetic */ Unit invoke(TrainType trainType) {
|
||||
invoke2(trainType);
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
|
||||
/* renamed from: invoke, reason: avoid collision after fix types in other method */
|
||||
public final void invoke2(TrainType it) {
|
||||
ConfigureWidgetViewModel viewModel;
|
||||
Intrinsics.checkNotNullParameter(it, "it");
|
||||
viewModel = ConfigureWidgetFragment.this.getViewModel();
|
||||
viewModel.handleTrainTypeChange(it == TrainType.CERCANIAS);
|
||||
}
|
||||
});
|
||||
}
|
||||
WidgetConfigurationFragmentBinding widgetConfigurationFragmentBinding2 = this.binding;
|
||||
if (widgetConfigurationFragmentBinding2 != null && (stationHeaderView = widgetConfigurationFragmentBinding2.stationHeader) != null) {
|
||||
stationHeaderView.setOnStationActionListener(new Function1<StationAction, Unit>() { // from class: com.adif.elcanomovil.widget.configuration.ConfigureWidgetFragment$configureViewListeners$2
|
||||
{
|
||||
super(1);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public /* bridge */ /* synthetic */ Unit invoke(StationAction stationAction) {
|
||||
invoke2(stationAction);
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
|
||||
/* renamed from: invoke, reason: avoid collision after fix types in other method */
|
||||
public final void invoke2(StationAction it) {
|
||||
ConfigureWidgetViewModel viewModel;
|
||||
Intrinsics.checkNotNullParameter(it, "it");
|
||||
viewModel = ConfigureWidgetFragment.this.getViewModel();
|
||||
viewModel.handleHeaderButtonTap(it);
|
||||
}
|
||||
});
|
||||
}
|
||||
WidgetConfigurationFragmentBinding widgetConfigurationFragmentBinding3 = this.binding;
|
||||
if (widgetConfigurationFragmentBinding3 == null || (materialButton = widgetConfigurationFragmentBinding3.creationWidgetButton) == null) {
|
||||
return;
|
||||
}
|
||||
materialButton.setOnClickListener(new a(this, 18));
|
||||
}
|
||||
|
||||
public static final void configureViewListeners$lambda$3(ConfigureWidgetFragment this$0, View view) {
|
||||
Intrinsics.checkNotNullParameter(this$0, "this$0");
|
||||
this$0.getViewModel().handleHeaderButtonTap(StationAction.CREATE_WIDGET);
|
||||
}
|
||||
|
||||
public final ConfigureWidgetViewModel getViewModel() {
|
||||
return (ConfigureWidgetViewModel) this.viewModel.getValue();
|
||||
}
|
||||
|
||||
public final void handleSelectedStation(String station) {
|
||||
getViewModel().changeStation(station);
|
||||
}
|
||||
|
||||
public final void handleSelectedStationTo(String station) {
|
||||
getViewModel().changeStationTo(station);
|
||||
}
|
||||
|
||||
@Override // com.adif.elcanomovil.widget.configuration.Hilt_ConfigureWidgetFragment, androidx.fragment.app.K
|
||||
public void onAttach(Context context) {
|
||||
Intrinsics.checkNotNullParameter(context, "context");
|
||||
super.onAttach(context);
|
||||
if (getActivity() instanceof ConfigActivityParent) {
|
||||
m activity = getActivity();
|
||||
Intrinsics.checkNotNull(activity, "null cannot be cast to non-null type com.adif.elcanomovil.widget.ConfigActivityParent");
|
||||
this.listener = (ConfigActivityParent) activity;
|
||||
}
|
||||
}
|
||||
|
||||
@Override // androidx.fragment.app.K
|
||||
public void onViewCreated(View view, Bundle savedInstanceState) {
|
||||
Intrinsics.checkNotNullParameter(view, "view");
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
this.binding = WidgetConfigurationFragmentBinding.bind(view);
|
||||
ConfigureWidgetViewModel viewModel = getViewModel();
|
||||
m activity = getActivity();
|
||||
Intrinsics.checkNotNull(activity, "null cannot be cast to non-null type com.adif.elcanomovil.widget.ConfigActivityParent");
|
||||
viewModel.setWidgetId(((ConfigActivityParent) activity).getAppWidgetId());
|
||||
configureView();
|
||||
configureViewListeners();
|
||||
configureObservers();
|
||||
AbstractC0544v n4 = l.n(this);
|
||||
NavigationExtensionsKt.onDestinationResult(n4, NavArguments.StationSelectionType.STATION.toString(), this, new ConfigureWidgetFragment$onViewCreated$1$1(this));
|
||||
NavigationExtensionsKt.onDestinationResult(n4, NavArguments.StationSelectionType.STATION_TO.toString(), this, new ConfigureWidgetFragment$onViewCreated$1$2(this));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,281 @@
|
||||
package com.adif.elcanomovil.widget.configuration;
|
||||
|
||||
import C.w;
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcelable;
|
||||
import com.adif.elcanomovil.commonNavGraph.R;
|
||||
import com.adif.elcanomovil.commonNavGraph.arguments.AlertActions;
|
||||
import com.adif.elcanomovil.commonNavGraph.arguments.AlertType;
|
||||
import com.google.android.gms.measurement.internal.a;
|
||||
import java.io.Serializable;
|
||||
import java.util.RandomAccess;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import o0.F;
|
||||
|
||||
@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0005\u0018\u0000 \u00052\u00020\u0001:\u0003\u0003\u0004\u0005B\u0007\b\u0002¢\u0006\u0002\u0010\u0002¨\u0006\u0006"}, d2 = {"Lcom/adif/elcanomovil/widget/configuration/ConfigureWidgetFragmentDirections;", "", "()V", "ActionDeparturesFragmentToSelectStationFragment", "ActionGlobalAlertDialog", "Companion", "common-nav-graph_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public final class ConfigureWidgetFragmentDirections {
|
||||
|
||||
/* renamed from: Companion, reason: from kotlin metadata */
|
||||
public static final Companion INSTANCE = new Companion(null);
|
||||
|
||||
@Metadata(d1 = {"\u0000.\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0002\b\b\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u0004\b\u0082\b\u0018\u00002\u00020\u0001B\u000f\u0012\u0006\u0010\u0003\u001a\u00020\u0002¢\u0006\u0004\b\u0004\u0010\u0005J\u0010\u0010\u0006\u001a\u00020\u0002HÆ\u0003¢\u0006\u0004\b\u0006\u0010\u0007J\u001a\u0010\b\u001a\u00020\u00002\b\b\u0002\u0010\u0003\u001a\u00020\u0002HÆ\u0001¢\u0006\u0004\b\b\u0010\tJ\u0010\u0010\n\u001a\u00020\u0002HÖ\u0001¢\u0006\u0004\b\n\u0010\u0007J\u0010\u0010\f\u001a\u00020\u000bHÖ\u0001¢\u0006\u0004\b\f\u0010\rJ\u001a\u0010\u0011\u001a\u00020\u00102\b\u0010\u000f\u001a\u0004\u0018\u00010\u000eHÖ\u0003¢\u0006\u0004\b\u0011\u0010\u0012R\u0017\u0010\u0003\u001a\u00020\u00028\u0006¢\u0006\f\n\u0004\b\u0003\u0010\u0013\u001a\u0004\b\u0014\u0010\u0007R\u001a\u0010\u0015\u001a\u00020\u000b8\u0016X\u0096\u0004¢\u0006\f\n\u0004\b\u0015\u0010\u0016\u001a\u0004\b\u0017\u0010\rR\u0014\u0010\u001b\u001a\u00020\u00188VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b\u0019\u0010\u001a¨\u0006\u001c"}, d2 = {"Lcom/adif/elcanomovil/widget/configuration/ConfigureWidgetFragmentDirections$ActionDeparturesFragmentToSelectStationFragment;", "Lo0/F;", "", "key", "<init>", "(Ljava/lang/String;)V", "component1", "()Ljava/lang/String;", "copy", "(Ljava/lang/String;)Lcom/adif/elcanomovil/widget/configuration/ConfigureWidgetFragmentDirections$ActionDeparturesFragmentToSelectStationFragment;", "toString", "", "hashCode", "()I", "", "other", "", "equals", "(Ljava/lang/Object;)Z", "Ljava/lang/String;", "getKey", "actionId", "I", "getActionId", "Landroid/os/Bundle;", "getArguments", "()Landroid/os/Bundle;", "arguments", "common-nav-graph_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public static final /* data */ class ActionDeparturesFragmentToSelectStationFragment implements F {
|
||||
private final int actionId;
|
||||
private final String key;
|
||||
|
||||
public ActionDeparturesFragmentToSelectStationFragment(String key) {
|
||||
Intrinsics.checkNotNullParameter(key, "key");
|
||||
this.key = key;
|
||||
this.actionId = R.id.action_departuresFragment_to_selectStationFragment;
|
||||
}
|
||||
|
||||
public static /* synthetic */ ActionDeparturesFragmentToSelectStationFragment copy$default(ActionDeparturesFragmentToSelectStationFragment actionDeparturesFragmentToSelectStationFragment, String str, int i, Object obj) {
|
||||
if ((i & 1) != 0) {
|
||||
str = actionDeparturesFragmentToSelectStationFragment.key;
|
||||
}
|
||||
return actionDeparturesFragmentToSelectStationFragment.copy(str);
|
||||
}
|
||||
|
||||
/* renamed from: component1, reason: from getter */
|
||||
public final String getKey() {
|
||||
return this.key;
|
||||
}
|
||||
|
||||
public final ActionDeparturesFragmentToSelectStationFragment copy(String key) {
|
||||
Intrinsics.checkNotNullParameter(key, "key");
|
||||
return new ActionDeparturesFragmentToSelectStationFragment(key);
|
||||
}
|
||||
|
||||
public boolean equals(Object other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
return (other instanceof ActionDeparturesFragmentToSelectStationFragment) && Intrinsics.areEqual(this.key, ((ActionDeparturesFragmentToSelectStationFragment) other).key);
|
||||
}
|
||||
|
||||
@Override // o0.F
|
||||
public int getActionId() {
|
||||
return this.actionId;
|
||||
}
|
||||
|
||||
@Override // o0.F
|
||||
public Bundle getArguments() {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("key", this.key);
|
||||
return bundle;
|
||||
}
|
||||
|
||||
public final String getKey() {
|
||||
return this.key;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return this.key.hashCode();
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return a.n(new StringBuilder("ActionDeparturesFragmentToSelectStationFragment(key="), this.key, ')');
|
||||
}
|
||||
}
|
||||
|
||||
@Metadata(d1 = {"\u0000>\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0010\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0010\u0000\n\u0002\b\u000f\n\u0002\u0018\u0002\n\u0002\b\u0004\b\u0082\b\u0018\u00002\u00020\u0001B7\u0012\u0006\u0010\u0003\u001a\u00020\u0002\u0012\u0006\u0010\u0004\u001a\u00020\u0002\u0012\u0006\u0010\u0006\u001a\u00020\u0005\u0012\u0006\u0010\u0007\u001a\u00020\u0005\u0012\u0006\u0010\t\u001a\u00020\b\u0012\u0006\u0010\u000b\u001a\u00020\n¢\u0006\u0004\b\f\u0010\rJ\u0010\u0010\u000e\u001a\u00020\u0002HÆ\u0003¢\u0006\u0004\b\u000e\u0010\u000fJ\u0010\u0010\u0010\u001a\u00020\u0002HÆ\u0003¢\u0006\u0004\b\u0010\u0010\u000fJ\u0010\u0010\u0011\u001a\u00020\u0005HÆ\u0003¢\u0006\u0004\b\u0011\u0010\u0012J\u0010\u0010\u0013\u001a\u00020\u0005HÆ\u0003¢\u0006\u0004\b\u0013\u0010\u0012J\u0010\u0010\u0014\u001a\u00020\bHÆ\u0003¢\u0006\u0004\b\u0014\u0010\u0015J\u0010\u0010\u0016\u001a\u00020\nHÆ\u0003¢\u0006\u0004\b\u0016\u0010\u0017JL\u0010\u0018\u001a\u00020\u00002\b\b\u0002\u0010\u0003\u001a\u00020\u00022\b\b\u0002\u0010\u0004\u001a\u00020\u00022\b\b\u0002\u0010\u0006\u001a\u00020\u00052\b\b\u0002\u0010\u0007\u001a\u00020\u00052\b\b\u0002\u0010\t\u001a\u00020\b2\b\b\u0002\u0010\u000b\u001a\u00020\nHÆ\u0001¢\u0006\u0004\b\u0018\u0010\u0019J\u0010\u0010\u001a\u001a\u00020\u0005HÖ\u0001¢\u0006\u0004\b\u001a\u0010\u0012J\u0010\u0010\u001c\u001a\u00020\u001bHÖ\u0001¢\u0006\u0004\b\u001c\u0010\u001dJ\u001a\u0010 \u001a\u00020\u00022\b\u0010\u001f\u001a\u0004\u0018\u00010\u001eHÖ\u0003¢\u0006\u0004\b \u0010!R\u0017\u0010\u0003\u001a\u00020\u00028\u0006¢\u0006\f\n\u0004\b\u0003\u0010\"\u001a\u0004\b#\u0010\u000fR\u0017\u0010\u0004\u001a\u00020\u00028\u0006¢\u0006\f\n\u0004\b\u0004\u0010\"\u001a\u0004\b\u0004\u0010\u000fR\u0017\u0010\u0006\u001a\u00020\u00058\u0006¢\u0006\f\n\u0004\b\u0006\u0010$\u001a\u0004\b%\u0010\u0012R\u0017\u0010\u0007\u001a\u00020\u00058\u0006¢\u0006\f\n\u0004\b\u0007\u0010$\u001a\u0004\b&\u0010\u0012R\u0017\u0010\t\u001a\u00020\b8\u0006¢\u0006\f\n\u0004\b\t\u0010'\u001a\u0004\b(\u0010\u0015R\u0017\u0010\u000b\u001a\u00020\n8\u0006¢\u0006\f\n\u0004\b\u000b\u0010)\u001a\u0004\b*\u0010\u0017R\u001a\u0010+\u001a\u00020\u001b8\u0016X\u0096\u0004¢\u0006\f\n\u0004\b+\u0010,\u001a\u0004\b-\u0010\u001dR\u0014\u00101\u001a\u00020.8VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b/\u00100¨\u00062"}, d2 = {"Lcom/adif/elcanomovil/widget/configuration/ConfigureWidgetFragmentDirections$ActionGlobalAlertDialog;", "Lo0/F;", "", "blockOnback", "isCancelable", "", "title", "message", "Lcom/adif/elcanomovil/commonNavGraph/arguments/AlertActions;", "actions", "Lcom/adif/elcanomovil/commonNavGraph/arguments/AlertType;", "type", "<init>", "(ZZLjava/lang/String;Ljava/lang/String;Lcom/adif/elcanomovil/commonNavGraph/arguments/AlertActions;Lcom/adif/elcanomovil/commonNavGraph/arguments/AlertType;)V", "component1", "()Z", "component2", "component3", "()Ljava/lang/String;", "component4", "component5", "()Lcom/adif/elcanomovil/commonNavGraph/arguments/AlertActions;", "component6", "()Lcom/adif/elcanomovil/commonNavGraph/arguments/AlertType;", "copy", "(ZZLjava/lang/String;Ljava/lang/String;Lcom/adif/elcanomovil/commonNavGraph/arguments/AlertActions;Lcom/adif/elcanomovil/commonNavGraph/arguments/AlertType;)Lcom/adif/elcanomovil/widget/configuration/ConfigureWidgetFragmentDirections$ActionGlobalAlertDialog;", "toString", "", "hashCode", "()I", "", "other", "equals", "(Ljava/lang/Object;)Z", "Z", "getBlockOnback", "Ljava/lang/String;", "getTitle", "getMessage", "Lcom/adif/elcanomovil/commonNavGraph/arguments/AlertActions;", "getActions", "Lcom/adif/elcanomovil/commonNavGraph/arguments/AlertType;", "getType", "actionId", "I", "getActionId", "Landroid/os/Bundle;", "getArguments", "()Landroid/os/Bundle;", "arguments", "common-nav-graph_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public static final /* data */ class ActionGlobalAlertDialog implements F {
|
||||
private final int actionId;
|
||||
private final AlertActions actions;
|
||||
private final boolean blockOnback;
|
||||
private final boolean isCancelable;
|
||||
private final String message;
|
||||
private final String title;
|
||||
private final AlertType type;
|
||||
|
||||
public ActionGlobalAlertDialog(boolean z3, boolean z4, String title, String message, AlertActions actions, AlertType type) {
|
||||
Intrinsics.checkNotNullParameter(title, "title");
|
||||
Intrinsics.checkNotNullParameter(message, "message");
|
||||
Intrinsics.checkNotNullParameter(actions, "actions");
|
||||
Intrinsics.checkNotNullParameter(type, "type");
|
||||
this.blockOnback = z3;
|
||||
this.isCancelable = z4;
|
||||
this.title = title;
|
||||
this.message = message;
|
||||
this.actions = actions;
|
||||
this.type = type;
|
||||
this.actionId = R.id.action_global_alertDialog;
|
||||
}
|
||||
|
||||
public static /* synthetic */ ActionGlobalAlertDialog copy$default(ActionGlobalAlertDialog actionGlobalAlertDialog, boolean z3, boolean z4, String str, String str2, AlertActions alertActions, AlertType alertType, int i, Object obj) {
|
||||
if ((i & 1) != 0) {
|
||||
z3 = actionGlobalAlertDialog.blockOnback;
|
||||
}
|
||||
if ((i & 2) != 0) {
|
||||
z4 = actionGlobalAlertDialog.isCancelable;
|
||||
}
|
||||
if ((i & 4) != 0) {
|
||||
str = actionGlobalAlertDialog.title;
|
||||
}
|
||||
if ((i & 8) != 0) {
|
||||
str2 = actionGlobalAlertDialog.message;
|
||||
}
|
||||
if ((i & 16) != 0) {
|
||||
alertActions = actionGlobalAlertDialog.actions;
|
||||
}
|
||||
if ((i & 32) != 0) {
|
||||
alertType = actionGlobalAlertDialog.type;
|
||||
}
|
||||
AlertActions alertActions2 = alertActions;
|
||||
AlertType alertType2 = alertType;
|
||||
return actionGlobalAlertDialog.copy(z3, z4, str, str2, alertActions2, alertType2);
|
||||
}
|
||||
|
||||
/* renamed from: component1, reason: from getter */
|
||||
public final boolean getBlockOnback() {
|
||||
return this.blockOnback;
|
||||
}
|
||||
|
||||
/* renamed from: component2, reason: from getter */
|
||||
public final boolean getIsCancelable() {
|
||||
return this.isCancelable;
|
||||
}
|
||||
|
||||
/* renamed from: component3, reason: from getter */
|
||||
public final String getTitle() {
|
||||
return this.title;
|
||||
}
|
||||
|
||||
/* renamed from: component4, reason: from getter */
|
||||
public final String getMessage() {
|
||||
return this.message;
|
||||
}
|
||||
|
||||
/* renamed from: component5, reason: from getter */
|
||||
public final AlertActions getActions() {
|
||||
return this.actions;
|
||||
}
|
||||
|
||||
/* renamed from: component6, reason: from getter */
|
||||
public final AlertType getType() {
|
||||
return this.type;
|
||||
}
|
||||
|
||||
public final ActionGlobalAlertDialog copy(boolean blockOnback, boolean isCancelable, String title, String message, AlertActions actions, AlertType type) {
|
||||
Intrinsics.checkNotNullParameter(title, "title");
|
||||
Intrinsics.checkNotNullParameter(message, "message");
|
||||
Intrinsics.checkNotNullParameter(actions, "actions");
|
||||
Intrinsics.checkNotNullParameter(type, "type");
|
||||
return new ActionGlobalAlertDialog(blockOnback, isCancelable, title, message, actions, type);
|
||||
}
|
||||
|
||||
public boolean equals(Object other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
if (!(other instanceof ActionGlobalAlertDialog)) {
|
||||
return false;
|
||||
}
|
||||
ActionGlobalAlertDialog actionGlobalAlertDialog = (ActionGlobalAlertDialog) other;
|
||||
return this.blockOnback == actionGlobalAlertDialog.blockOnback && this.isCancelable == actionGlobalAlertDialog.isCancelable && Intrinsics.areEqual(this.title, actionGlobalAlertDialog.title) && Intrinsics.areEqual(this.message, actionGlobalAlertDialog.message) && Intrinsics.areEqual(this.actions, actionGlobalAlertDialog.actions) && this.type == actionGlobalAlertDialog.type;
|
||||
}
|
||||
|
||||
@Override // o0.F
|
||||
public int getActionId() {
|
||||
return this.actionId;
|
||||
}
|
||||
|
||||
public final AlertActions getActions() {
|
||||
return this.actions;
|
||||
}
|
||||
|
||||
@Override // o0.F
|
||||
public Bundle getArguments() {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putBoolean("blockOnback", this.blockOnback);
|
||||
bundle.putBoolean("isCancelable", this.isCancelable);
|
||||
bundle.putString("title", this.title);
|
||||
bundle.putString("message", this.message);
|
||||
if (Parcelable.class.isAssignableFrom(AlertActions.class)) {
|
||||
RandomAccess randomAccess = this.actions;
|
||||
Intrinsics.checkNotNull(randomAccess, "null cannot be cast to non-null type android.os.Parcelable");
|
||||
bundle.putParcelable("actions", (Parcelable) randomAccess);
|
||||
} else {
|
||||
if (!Serializable.class.isAssignableFrom(AlertActions.class)) {
|
||||
throw new UnsupportedOperationException(AlertActions.class.getName().concat(" must implement Parcelable or Serializable or must be an Enum."));
|
||||
}
|
||||
AlertActions alertActions = this.actions;
|
||||
Intrinsics.checkNotNull(alertActions, "null cannot be cast to non-null type java.io.Serializable");
|
||||
bundle.putSerializable("actions", alertActions);
|
||||
}
|
||||
if (Parcelable.class.isAssignableFrom(AlertType.class)) {
|
||||
Object obj = this.type;
|
||||
Intrinsics.checkNotNull(obj, "null cannot be cast to non-null type android.os.Parcelable");
|
||||
bundle.putParcelable("type", (Parcelable) obj);
|
||||
return bundle;
|
||||
}
|
||||
if (!Serializable.class.isAssignableFrom(AlertType.class)) {
|
||||
throw new UnsupportedOperationException(AlertType.class.getName().concat(" must implement Parcelable or Serializable or must be an Enum."));
|
||||
}
|
||||
AlertType alertType = this.type;
|
||||
Intrinsics.checkNotNull(alertType, "null cannot be cast to non-null type java.io.Serializable");
|
||||
bundle.putSerializable("type", alertType);
|
||||
return bundle;
|
||||
}
|
||||
|
||||
public final boolean getBlockOnback() {
|
||||
return this.blockOnback;
|
||||
}
|
||||
|
||||
public final String getMessage() {
|
||||
return this.message;
|
||||
}
|
||||
|
||||
public final String getTitle() {
|
||||
return this.title;
|
||||
}
|
||||
|
||||
public final AlertType getType() {
|
||||
return this.type;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return this.type.hashCode() + ((this.actions.hashCode() + a.d(this.message, a.d(this.title, w.c(Boolean.hashCode(this.blockOnback) * 31, 31, this.isCancelable), 31), 31)) * 31);
|
||||
}
|
||||
|
||||
public final boolean isCancelable() {
|
||||
return this.isCancelable;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "ActionGlobalAlertDialog(blockOnback=" + this.blockOnback + ", isCancelable=" + this.isCancelable + ", title=" + this.title + ", message=" + this.message + ", actions=" + this.actions + ", type=" + this.type + ')';
|
||||
}
|
||||
}
|
||||
|
||||
@Metadata(d1 = {"\u00000\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0006\b\u0086\u0003\u0018\u00002\u00020\u0001B\t\b\u0002¢\u0006\u0004\b\u0002\u0010\u0003J=\u0010\u000f\u001a\u00020\u000e2\u0006\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0006\u001a\u00020\u00042\u0006\u0010\b\u001a\u00020\u00072\u0006\u0010\t\u001a\u00020\u00072\u0006\u0010\u000b\u001a\u00020\n2\u0006\u0010\r\u001a\u00020\f¢\u0006\u0004\b\u000f\u0010\u0010J\u0015\u0010\u0012\u001a\u00020\u000e2\u0006\u0010\u0011\u001a\u00020\u0007¢\u0006\u0004\b\u0012\u0010\u0013¨\u0006\u0014"}, d2 = {"Lcom/adif/elcanomovil/widget/configuration/ConfigureWidgetFragmentDirections$Companion;", "", "<init>", "()V", "", "blockOnback", "isCancelable", "", "title", "message", "Lcom/adif/elcanomovil/commonNavGraph/arguments/AlertActions;", "actions", "Lcom/adif/elcanomovil/commonNavGraph/arguments/AlertType;", "type", "Lo0/F;", "actionGlobalAlertDialog", "(ZZLjava/lang/String;Ljava/lang/String;Lcom/adif/elcanomovil/commonNavGraph/arguments/AlertActions;Lcom/adif/elcanomovil/commonNavGraph/arguments/AlertType;)Lo0/F;", "key", "actionDeparturesFragmentToSelectStationFragment", "(Ljava/lang/String;)Lo0/F;", "common-nav-graph_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class Companion {
|
||||
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this();
|
||||
}
|
||||
|
||||
public final F actionDeparturesFragmentToSelectStationFragment(String key) {
|
||||
Intrinsics.checkNotNullParameter(key, "key");
|
||||
return new ActionDeparturesFragmentToSelectStationFragment(key);
|
||||
}
|
||||
|
||||
public final F actionGlobalAlertDialog(boolean blockOnback, boolean isCancelable, String title, String message, AlertActions actions, AlertType type) {
|
||||
Intrinsics.checkNotNullParameter(title, "title");
|
||||
Intrinsics.checkNotNullParameter(message, "message");
|
||||
Intrinsics.checkNotNullParameter(actions, "actions");
|
||||
Intrinsics.checkNotNullParameter(type, "type");
|
||||
return new ActionGlobalAlertDialog(blockOnback, isCancelable, title, message, actions, type);
|
||||
}
|
||||
|
||||
private Companion() {
|
||||
}
|
||||
}
|
||||
|
||||
private ConfigureWidgetFragmentDirections() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.adif.elcanomovil.widget.configuration;
|
||||
|
||||
import dagger.hilt.InstallIn;
|
||||
import dagger.hilt.android.components.FragmentComponent;
|
||||
import dagger.hilt.codegen.OriginatingElement;
|
||||
import dagger.hilt.internal.GeneratedEntryPoint;
|
||||
|
||||
@OriginatingElement(topLevelClass = ConfigureWidgetFragment.class)
|
||||
@GeneratedEntryPoint
|
||||
@InstallIn({FragmentComponent.class})
|
||||
/* loaded from: classes3.dex */
|
||||
public interface ConfigureWidgetFragment_GeneratedInjector {
|
||||
void injectConfigureWidgetFragment(ConfigureWidgetFragment configureWidgetFragment);
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
package com.adif.elcanomovil.widget.configuration;
|
||||
|
||||
import androidx.lifecycle.X;
|
||||
import com.adif.elcanomovil.domain.entities.station.Station;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.ResultKt;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.intrinsics.IntrinsicsKt;
|
||||
import kotlin.coroutines.jvm.internal.Boxing;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlinx.coroutines.CoroutineScope;
|
||||
|
||||
@Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u0001*\u00020\u0002H\u008a@"}, d2 = {"<anonymous>", "", "Lkotlinx/coroutines/CoroutineScope;"}, k = 3, mv = {1, 9, 0}, xi = 48)
|
||||
@DebugMetadata(c = "com.adif.elcanomovil.widget.configuration.ConfigureWidgetViewModel$changeStation$1", f = "ConfigureWidgetViewModel.kt", i = {}, l = {64}, m = "invokeSuspend", n = {}, s = {})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class ConfigureWidgetViewModel$changeStation$1 extends SuspendLambda implements Function2<CoroutineScope, Continuation<? super Unit>, Object> {
|
||||
final /* synthetic */ String $stationCode;
|
||||
int label;
|
||||
final /* synthetic */ ConfigureWidgetViewModel this$0;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public ConfigureWidgetViewModel$changeStation$1(ConfigureWidgetViewModel configureWidgetViewModel, String str, Continuation<? super ConfigureWidgetViewModel$changeStation$1> continuation) {
|
||||
super(2, continuation);
|
||||
this.this$0 = configureWidgetViewModel;
|
||||
this.$stationCode = str;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
||||
return new ConfigureWidgetViewModel$changeStation$1(this.this$0, this.$stationCode, continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
X x3;
|
||||
X x4;
|
||||
X x5;
|
||||
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
|
||||
int i = this.label;
|
||||
if (i == 0) {
|
||||
ResultKt.throwOnFailure(obj);
|
||||
ConfigureWidgetViewModel configureWidgetViewModel = this.this$0;
|
||||
String str = this.$stationCode;
|
||||
this.label = 1;
|
||||
obj = configureWidgetViewModel.loadStationInfo(str, this);
|
||||
if (obj == coroutine_suspended) {
|
||||
return coroutine_suspended;
|
||||
}
|
||||
} else {
|
||||
if (i != 1) {
|
||||
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
|
||||
}
|
||||
ResultKt.throwOnFailure(obj);
|
||||
}
|
||||
Station station = (Station) obj;
|
||||
if (station != null) {
|
||||
ConfigureWidgetViewModel configureWidgetViewModel2 = this.this$0;
|
||||
x3 = configureWidgetViewModel2._viewData;
|
||||
WidgetViewConfigData widgetViewConfigData = (WidgetViewConfigData) x3.d();
|
||||
if (widgetViewConfigData != null) {
|
||||
widgetViewConfigData.setStationCode(station.getStationCode());
|
||||
}
|
||||
WidgetViewConfigData widgetViewConfigData2 = (WidgetViewConfigData) configureWidgetViewModel2.getViewData().d();
|
||||
if (widgetViewConfigData2 != null) {
|
||||
widgetViewConfigData2.setStationName(station.getShortName());
|
||||
}
|
||||
WidgetViewConfigData widgetViewConfigData3 = (WidgetViewConfigData) configureWidgetViewModel2.getViewData().d();
|
||||
if (widgetViewConfigData3 != null) {
|
||||
widgetViewConfigData3.setStationIsRodalies(Boxing.boxBoolean(Intrinsics.areEqual(station.getCommuterNetwork(), "RODALIES_CATALUNYA")));
|
||||
}
|
||||
configureWidgetViewModel2.checkEnableCreateWidgetButton();
|
||||
x4 = configureWidgetViewModel2._viewData;
|
||||
x5 = configureWidgetViewModel2._viewData;
|
||||
x4.k(x5.d());
|
||||
}
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(CoroutineScope coroutineScope, Continuation<? super Unit> continuation) {
|
||||
return ((ConfigureWidgetViewModel$changeStation$1) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
package com.adif.elcanomovil.widget.configuration;
|
||||
|
||||
import androidx.lifecycle.X;
|
||||
import com.adif.elcanomovil.domain.entities.station.Station;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.ResultKt;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.intrinsics.IntrinsicsKt;
|
||||
import kotlin.coroutines.jvm.internal.Boxing;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlinx.coroutines.CoroutineScope;
|
||||
|
||||
@Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u0001*\u00020\u0002H\u008a@"}, d2 = {"<anonymous>", "", "Lkotlinx/coroutines/CoroutineScope;"}, k = 3, mv = {1, 9, 0}, xi = 48)
|
||||
@DebugMetadata(c = "com.adif.elcanomovil.widget.configuration.ConfigureWidgetViewModel$changeStationTo$1", f = "ConfigureWidgetViewModel.kt", i = {}, l = {74}, m = "invokeSuspend", n = {}, s = {})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class ConfigureWidgetViewModel$changeStationTo$1 extends SuspendLambda implements Function2<CoroutineScope, Continuation<? super Unit>, Object> {
|
||||
final /* synthetic */ String $stationCode;
|
||||
int label;
|
||||
final /* synthetic */ ConfigureWidgetViewModel this$0;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public ConfigureWidgetViewModel$changeStationTo$1(ConfigureWidgetViewModel configureWidgetViewModel, String str, Continuation<? super ConfigureWidgetViewModel$changeStationTo$1> continuation) {
|
||||
super(2, continuation);
|
||||
this.this$0 = configureWidgetViewModel;
|
||||
this.$stationCode = str;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
||||
return new ConfigureWidgetViewModel$changeStationTo$1(this.this$0, this.$stationCode, continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
X x3;
|
||||
X x4;
|
||||
X x5;
|
||||
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
|
||||
int i = this.label;
|
||||
if (i == 0) {
|
||||
ResultKt.throwOnFailure(obj);
|
||||
ConfigureWidgetViewModel configureWidgetViewModel = this.this$0;
|
||||
String str = this.$stationCode;
|
||||
this.label = 1;
|
||||
obj = configureWidgetViewModel.loadStationInfo(str, this);
|
||||
if (obj == coroutine_suspended) {
|
||||
return coroutine_suspended;
|
||||
}
|
||||
} else {
|
||||
if (i != 1) {
|
||||
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
|
||||
}
|
||||
ResultKt.throwOnFailure(obj);
|
||||
}
|
||||
Station station = (Station) obj;
|
||||
if (station != null) {
|
||||
ConfigureWidgetViewModel configureWidgetViewModel2 = this.this$0;
|
||||
x3 = configureWidgetViewModel2._viewData;
|
||||
WidgetViewConfigData widgetViewConfigData = (WidgetViewConfigData) x3.d();
|
||||
if (widgetViewConfigData != null) {
|
||||
widgetViewConfigData.setStationToCode(station.getStationCode());
|
||||
}
|
||||
WidgetViewConfigData widgetViewConfigData2 = (WidgetViewConfigData) configureWidgetViewModel2.getViewData().d();
|
||||
if (widgetViewConfigData2 != null) {
|
||||
widgetViewConfigData2.setStationToName(station.getShortName());
|
||||
}
|
||||
WidgetViewConfigData widgetViewConfigData3 = (WidgetViewConfigData) configureWidgetViewModel2.getViewData().d();
|
||||
if (widgetViewConfigData3 != null) {
|
||||
widgetViewConfigData3.setStationToIsRodalies(Boxing.boxBoolean(Intrinsics.areEqual(station.getCommuterNetwork(), "RODALIES_CATALUNYA")));
|
||||
}
|
||||
configureWidgetViewModel2.checkEnableCreateWidgetButton();
|
||||
x4 = configureWidgetViewModel2._viewData;
|
||||
x5 = configureWidgetViewModel2._viewData;
|
||||
x4.k(x5.d());
|
||||
}
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(CoroutineScope coroutineScope, Continuation<? super Unit> continuation) {
|
||||
return ((ConfigureWidgetViewModel$changeStationTo$1) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,314 @@
|
||||
package com.adif.elcanomovil.widget.configuration;
|
||||
|
||||
import androidx.lifecycle.Q;
|
||||
import androidx.lifecycle.X;
|
||||
import androidx.lifecycle.q0;
|
||||
import androidx.lifecycle.w0;
|
||||
import b1.InterfaceC0266a;
|
||||
import b1.f;
|
||||
import com.adif.elcanomovil.commonNavGraph.arguments.NavArguments;
|
||||
import com.adif.elcanomovil.commonNavGraph.navigation.Navigation;
|
||||
import com.adif.elcanomovil.domain.entities.station.Station;
|
||||
import com.adif.elcanomovil.domain.usecases.stations.GetStationByIdUseCase;
|
||||
import com.adif.elcanomovil.serviceStorage.preferences.PreferenceStorage;
|
||||
import com.adif.elcanomovil.uiDepartures.views.StationAction;
|
||||
import dagger.hilt.android.lifecycle.HiltViewModel;
|
||||
import javax.inject.Inject;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlinx.coroutines.BuildersKt;
|
||||
import kotlinx.coroutines.Dispatchers;
|
||||
import kotlinx.coroutines.Job;
|
||||
|
||||
@HiltViewModel
|
||||
@Metadata(d1 = {"\u0000t\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\f\n\u0002\u0010\b\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\b\u0007\u0018\u00002\u00020\u0001B\u0019\b\u0007\u0012\u0006\u0010\u0003\u001a\u00020\u0002\u0012\u0006\u0010\u0005\u001a\u00020\u0004¢\u0006\u0004\b\u0006\u0010\u0007J\u001a\u0010\u000b\u001a\u0004\u0018\u00010\n2\u0006\u0010\t\u001a\u00020\bH\u0082@¢\u0006\u0004\b\u000b\u0010\fJ\u000f\u0010\u000e\u001a\u00020\rH\u0002¢\u0006\u0004\b\u000e\u0010\u000fJ\u000f\u0010\u0010\u001a\u00020\rH\u0002¢\u0006\u0004\b\u0010\u0010\u000fJ\u000f\u0010\u0011\u001a\u00020\rH\u0002¢\u0006\u0004\b\u0011\u0010\u000fJ\u000f\u0010\u0012\u001a\u00020\rH\u0002¢\u0006\u0004\b\u0012\u0010\u000fJ\u000f\u0010\u0013\u001a\u00020\rH\u0002¢\u0006\u0004\b\u0013\u0010\u000fJ\u0015\u0010\u0015\u001a\u00020\u00142\u0006\u0010\t\u001a\u00020\b¢\u0006\u0004\b\u0015\u0010\u0016J\u0015\u0010\u0017\u001a\u00020\u00142\u0006\u0010\t\u001a\u00020\b¢\u0006\u0004\b\u0017\u0010\u0016J\u0015\u0010\u001a\u001a\u00020\r2\u0006\u0010\u0019\u001a\u00020\u0018¢\u0006\u0004\b\u001a\u0010\u001bJ\u0015\u0010\u001e\u001a\u00020\r2\u0006\u0010\u001d\u001a\u00020\u001c¢\u0006\u0004\b\u001e\u0010\u001fR\u0014\u0010\u0003\u001a\u00020\u00028\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0003\u0010 R\u0014\u0010\u0005\u001a\u00020\u00048\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0005\u0010!R\u001e\u0010$\u001a\n\u0012\u0006\u0012\u0004\u0018\u00010#0\"8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b$\u0010%R\u001f\u0010'\u001a\n\u0012\u0006\u0012\u0004\u0018\u00010#0&8\u0006¢\u0006\f\n\u0004\b'\u0010(\u001a\u0004\b)\u0010*R\u001c\u0010+\u001a\b\u0012\u0004\u0012\u00020\u001c0\"8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b+\u0010%R\u001d\u0010,\u001a\b\u0012\u0004\u0012\u00020\u001c0&8\u0006¢\u0006\f\n\u0004\b,\u0010(\u001a\u0004\b-\u0010*R\u001c\u0010.\u001a\b\u0012\u0004\u0012\u00020\u001c0\"8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b.\u0010%R\u001d\u0010/\u001a\b\u0012\u0004\u0012\u00020\u001c0&8\u0006¢\u0006\f\n\u0004\b/\u0010(\u001a\u0004\b0\u0010*R\u0016\u00101\u001a\u00020\u001c8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b1\u00102R\"\u00104\u001a\u0002038\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b4\u00105\u001a\u0004\b6\u00107\"\u0004\b8\u00109R\u001a\u0010<\u001a\b\u0012\u0004\u0012\u00020;0:8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b<\u0010=R\u001d\u0010?\u001a\b\u0012\u0004\u0012\u00020;0>8\u0006¢\u0006\f\n\u0004\b?\u0010@\u001a\u0004\bA\u0010B¨\u0006C"}, d2 = {"Lcom/adif/elcanomovil/widget/configuration/ConfigureWidgetViewModel;", "Landroidx/lifecycle/w0;", "Lcom/adif/elcanomovil/serviceStorage/preferences/PreferenceStorage;", "preferenceStorage", "Lcom/adif/elcanomovil/domain/usecases/stations/GetStationByIdUseCase;", "getStationByIdUseCase", "<init>", "(Lcom/adif/elcanomovil/serviceStorage/preferences/PreferenceStorage;Lcom/adif/elcanomovil/domain/usecases/stations/GetStationByIdUseCase;)V", "", "stationCode", "Lcom/adif/elcanomovil/domain/entities/station/Station;", "loadStationInfo", "(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "", "checkEnableCreateWidgetButton", "()V", "handleSearchButtonTap", "handleSearchToButtonTap", "createWidget", "switchStation", "Lkotlinx/coroutines/Job;", "changeStation", "(Ljava/lang/String;)Lkotlinx/coroutines/Job;", "changeStationTo", "Lcom/adif/elcanomovil/uiDepartures/views/StationAction;", "action", "handleHeaderButtonTap", "(Lcom/adif/elcanomovil/uiDepartures/views/StationAction;)V", "", "it", "handleTrainTypeChange", "(Z)V", "Lcom/adif/elcanomovil/serviceStorage/preferences/PreferenceStorage;", "Lcom/adif/elcanomovil/domain/usecases/stations/GetStationByIdUseCase;", "Landroidx/lifecycle/X;", "Lcom/adif/elcanomovil/widget/configuration/WidgetViewConfigData;", "_viewData", "Landroidx/lifecycle/X;", "Landroidx/lifecycle/Q;", "viewData", "Landroidx/lifecycle/Q;", "getViewData", "()Landroidx/lifecycle/Q;", "_showCreateWidgetButton", "showCreateWidgetButton", "getShowCreateWidgetButton", "_finishCreateWidget", "finishCreateWidget", "getFinishCreateWidget", "isCercanias", "Z", "", "widgetId", "I", "getWidgetId", "()I", "setWidgetId", "(I)V", "Lb1/f;", "Lcom/adif/elcanomovil/commonNavGraph/navigation/Navigation;", "navigationFlow", "Lb1/f;", "Lb1/a;", "navigation", "Lb1/a;", "getNavigation", "()Lb1/a;", "widget_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public final class ConfigureWidgetViewModel extends w0 {
|
||||
private X _finishCreateWidget;
|
||||
private X _showCreateWidgetButton;
|
||||
private X _viewData;
|
||||
private final Q finishCreateWidget;
|
||||
private final GetStationByIdUseCase getStationByIdUseCase;
|
||||
private boolean isCercanias;
|
||||
private final InterfaceC0266a navigation;
|
||||
private final f navigationFlow;
|
||||
private final PreferenceStorage preferenceStorage;
|
||||
private final Q showCreateWidgetButton;
|
||||
private final Q viewData;
|
||||
private int widgetId;
|
||||
|
||||
@Metadata(k = 3, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public /* synthetic */ class WhenMappings {
|
||||
public static final /* synthetic */ int[] $EnumSwitchMapping$0;
|
||||
|
||||
static {
|
||||
int[] iArr = new int[StationAction.values().length];
|
||||
try {
|
||||
iArr[StationAction.SEARCH.ordinal()] = 1;
|
||||
} catch (NoSuchFieldError unused) {
|
||||
}
|
||||
try {
|
||||
iArr[StationAction.SEARCH_TO.ordinal()] = 2;
|
||||
} catch (NoSuchFieldError unused2) {
|
||||
}
|
||||
try {
|
||||
iArr[StationAction.CREATE_WIDGET.ordinal()] = 3;
|
||||
} catch (NoSuchFieldError unused3) {
|
||||
}
|
||||
try {
|
||||
iArr[StationAction.SWITCH_STATIONS.ordinal()] = 4;
|
||||
} catch (NoSuchFieldError unused4) {
|
||||
}
|
||||
$EnumSwitchMapping$0 = iArr;
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX WARN: Type inference failed for: r10v1, types: [androidx.lifecycle.X, androidx.lifecycle.Q] */
|
||||
/* JADX WARN: Type inference failed for: r10v2, types: [androidx.lifecycle.X, androidx.lifecycle.Q] */
|
||||
/* JADX WARN: Type inference failed for: r10v3, types: [androidx.lifecycle.X, androidx.lifecycle.Q] */
|
||||
@Inject
|
||||
public ConfigureWidgetViewModel(PreferenceStorage preferenceStorage, GetStationByIdUseCase getStationByIdUseCase) {
|
||||
Intrinsics.checkNotNullParameter(preferenceStorage, "preferenceStorage");
|
||||
Intrinsics.checkNotNullParameter(getStationByIdUseCase, "getStationByIdUseCase");
|
||||
this.preferenceStorage = preferenceStorage;
|
||||
this.getStationByIdUseCase = getStationByIdUseCase;
|
||||
?? q4 = new Q();
|
||||
this._viewData = q4;
|
||||
this.viewData = q4;
|
||||
?? q5 = new Q();
|
||||
this._showCreateWidgetButton = q5;
|
||||
this.showCreateWidgetButton = q5;
|
||||
?? q6 = new Q();
|
||||
this._finishCreateWidget = q6;
|
||||
this.finishCreateWidget = q6;
|
||||
this.isCercanias = true;
|
||||
f fVar = new f();
|
||||
this.navigationFlow = fVar;
|
||||
this.navigation = fVar;
|
||||
this._viewData.j(new WidgetViewConfigData(null, null, null, null, null, null, 45, null));
|
||||
X x3 = this._viewData;
|
||||
x3.k(x3.d());
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final void checkEnableCreateWidgetButton() {
|
||||
String stationToCode;
|
||||
String stationName;
|
||||
String stationToName;
|
||||
WidgetViewConfigData widgetViewConfigData = (WidgetViewConfigData) this._viewData.d();
|
||||
if (widgetViewConfigData != null) {
|
||||
X x3 = this._showCreateWidgetButton;
|
||||
String stationCode = widgetViewConfigData.getStationCode();
|
||||
x3.k(Boolean.valueOf(stationCode != null && stationCode.length() > 0 && (stationToCode = widgetViewConfigData.getStationToCode()) != null && stationToCode.length() > 0 && (stationName = widgetViewConfigData.getStationName()) != null && stationName.length() > 0 && (stationToName = widgetViewConfigData.getStationToName()) != null && stationToName.length() > 0));
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX WARN: Removed duplicated region for block: B:12:0x003a A[Catch: Exception -> 0x000f, TryCatch #0 {Exception -> 0x000f, blocks: (B:2:0x0000, B:4:0x0008, B:7:0x0017, B:9:0x002a, B:10:0x0030, B:12:0x003a, B:13:0x0040, B:15:0x004a, B:16:0x0050, B:18:0x005a, B:19:0x005e, B:21:0x0072, B:23:0x0080, B:25:0x008a, B:29:0x0099, B:38:0x0012), top: B:1:0x0000 }] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:15:0x004a A[Catch: Exception -> 0x000f, TryCatch #0 {Exception -> 0x000f, blocks: (B:2:0x0000, B:4:0x0008, B:7:0x0017, B:9:0x002a, B:10:0x0030, B:12:0x003a, B:13:0x0040, B:15:0x004a, B:16:0x0050, B:18:0x005a, B:19:0x005e, B:21:0x0072, B:23:0x0080, B:25:0x008a, B:29:0x0099, B:38:0x0012), top: B:1:0x0000 }] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:18:0x005a A[Catch: Exception -> 0x000f, TryCatch #0 {Exception -> 0x000f, blocks: (B:2:0x0000, B:4:0x0008, B:7:0x0017, B:9:0x002a, B:10:0x0030, B:12:0x003a, B:13:0x0040, B:15:0x004a, B:16:0x0050, B:18:0x005a, B:19:0x005e, B:21:0x0072, B:23:0x0080, B:25:0x008a, B:29:0x0099, B:38:0x0012), top: B:1:0x0000 }] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:21:0x0072 A[Catch: Exception -> 0x000f, TryCatch #0 {Exception -> 0x000f, blocks: (B:2:0x0000, B:4:0x0008, B:7:0x0017, B:9:0x002a, B:10:0x0030, B:12:0x003a, B:13:0x0040, B:15:0x004a, B:16:0x0050, B:18:0x005a, B:19:0x005e, B:21:0x0072, B:23:0x0080, B:25:0x008a, B:29:0x0099, B:38:0x0012), top: B:1:0x0000 }] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:23:0x0080 A[Catch: Exception -> 0x000f, TryCatch #0 {Exception -> 0x000f, blocks: (B:2:0x0000, B:4:0x0008, B:7:0x0017, B:9:0x002a, B:10:0x0030, B:12:0x003a, B:13:0x0040, B:15:0x004a, B:16:0x0050, B:18:0x005a, B:19:0x005e, B:21:0x0072, B:23:0x0080, B:25:0x008a, B:29:0x0099, B:38:0x0012), top: B:1:0x0000 }] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:34:0x007d */
|
||||
/* JADX WARN: Removed duplicated region for block: B:35:0x004f */
|
||||
/* JADX WARN: Removed duplicated region for block: B:36:0x003f */
|
||||
/* JADX WARN: Removed duplicated region for block: B:37:0x002f */
|
||||
/* JADX WARN: Removed duplicated region for block: B:9:0x002a A[Catch: Exception -> 0x000f, TryCatch #0 {Exception -> 0x000f, blocks: (B:2:0x0000, B:4:0x0008, B:7:0x0017, B:9:0x002a, B:10:0x0030, B:12:0x003a, B:13:0x0040, B:15:0x004a, B:16:0x0050, B:18:0x005a, B:19:0x005e, B:21:0x0072, B:23:0x0080, B:25:0x008a, B:29:0x0099, B:38:0x0012), top: B:1:0x0000 }] */
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
private final void createWidget() {
|
||||
/*
|
||||
r13 = this;
|
||||
com.adif.elcanomovil.serviceStorage.preferences.PreferenceStorage r0 = r13.preferenceStorage // Catch: java.lang.Exception -> Lf
|
||||
java.util.Map r0 = r0.getWidgetInfo() // Catch: java.lang.Exception -> Lf
|
||||
if (r0 == 0) goto L12
|
||||
java.util.Map r0 = kotlin.collections.MapsKt.toMutableMap(r0) // Catch: java.lang.Exception -> Lf
|
||||
if (r0 != 0) goto L17
|
||||
goto L12
|
||||
Lf:
|
||||
r0 = move-exception
|
||||
goto Lad
|
||||
L12:
|
||||
java.util.HashMap r0 = new java.util.HashMap // Catch: java.lang.Exception -> Lf
|
||||
r0.<init>() // Catch: java.lang.Exception -> Lf
|
||||
L17:
|
||||
int r1 = r13.widgetId // Catch: java.lang.Exception -> Lf
|
||||
java.lang.Integer r1 = java.lang.Integer.valueOf(r1) // Catch: java.lang.Exception -> Lf
|
||||
com.adif.elcanomovil.serviceStorage.model.FavouriteEntity r2 = new com.adif.elcanomovil.serviceStorage.model.FavouriteEntity // Catch: java.lang.Exception -> Lf
|
||||
androidx.lifecycle.Q r3 = r13.viewData // Catch: java.lang.Exception -> Lf
|
||||
java.lang.Object r3 = r3.d() // Catch: java.lang.Exception -> Lf
|
||||
com.adif.elcanomovil.widget.configuration.WidgetViewConfigData r3 = (com.adif.elcanomovil.widget.configuration.WidgetViewConfigData) r3 // Catch: java.lang.Exception -> Lf
|
||||
r4 = 0
|
||||
if (r3 == 0) goto L2f
|
||||
java.lang.String r3 = r3.getStationCode() // Catch: java.lang.Exception -> Lf
|
||||
goto L30
|
||||
L2f:
|
||||
r3 = r4
|
||||
L30:
|
||||
androidx.lifecycle.Q r5 = r13.viewData // Catch: java.lang.Exception -> Lf
|
||||
java.lang.Object r5 = r5.d() // Catch: java.lang.Exception -> Lf
|
||||
com.adif.elcanomovil.widget.configuration.WidgetViewConfigData r5 = (com.adif.elcanomovil.widget.configuration.WidgetViewConfigData) r5 // Catch: java.lang.Exception -> Lf
|
||||
if (r5 == 0) goto L3f
|
||||
java.lang.String r5 = r5.getStationName() // Catch: java.lang.Exception -> Lf
|
||||
goto L40
|
||||
L3f:
|
||||
r5 = r4
|
||||
L40:
|
||||
androidx.lifecycle.Q r6 = r13.viewData // Catch: java.lang.Exception -> Lf
|
||||
java.lang.Object r6 = r6.d() // Catch: java.lang.Exception -> Lf
|
||||
com.adif.elcanomovil.widget.configuration.WidgetViewConfigData r6 = (com.adif.elcanomovil.widget.configuration.WidgetViewConfigData) r6 // Catch: java.lang.Exception -> Lf
|
||||
if (r6 == 0) goto L4f
|
||||
java.lang.String r6 = r6.getStationToCode() // Catch: java.lang.Exception -> Lf
|
||||
goto L50
|
||||
L4f:
|
||||
r6 = r4
|
||||
L50:
|
||||
androidx.lifecycle.Q r7 = r13.viewData // Catch: java.lang.Exception -> Lf
|
||||
java.lang.Object r7 = r7.d() // Catch: java.lang.Exception -> Lf
|
||||
com.adif.elcanomovil.widget.configuration.WidgetViewConfigData r7 = (com.adif.elcanomovil.widget.configuration.WidgetViewConfigData) r7 // Catch: java.lang.Exception -> Lf
|
||||
if (r7 == 0) goto L5e
|
||||
java.lang.String r4 = r7.getStationToName() // Catch: java.lang.Exception -> Lf
|
||||
L5e:
|
||||
r7 = r4
|
||||
java.lang.String r8 = ""
|
||||
boolean r4 = r13.isCercanias // Catch: java.lang.Exception -> Lf
|
||||
java.lang.Boolean r9 = java.lang.Boolean.valueOf(r4) // Catch: java.lang.Exception -> Lf
|
||||
androidx.lifecycle.Q r4 = r13.viewData // Catch: java.lang.Exception -> Lf
|
||||
java.lang.Object r4 = r4.d() // Catch: java.lang.Exception -> Lf
|
||||
com.adif.elcanomovil.widget.configuration.WidgetViewConfigData r4 = (com.adif.elcanomovil.widget.configuration.WidgetViewConfigData) r4 // Catch: java.lang.Exception -> Lf
|
||||
r10 = 0
|
||||
if (r4 == 0) goto L7d
|
||||
java.lang.Boolean r4 = r4.getStationIsRodalies() // Catch: java.lang.Exception -> Lf
|
||||
java.lang.Boolean r11 = java.lang.Boolean.TRUE // Catch: java.lang.Exception -> Lf
|
||||
boolean r4 = kotlin.jvm.internal.Intrinsics.areEqual(r4, r11) // Catch: java.lang.Exception -> Lf
|
||||
goto L7e
|
||||
L7d:
|
||||
r4 = r10
|
||||
L7e:
|
||||
if (r4 == 0) goto L99
|
||||
androidx.lifecycle.Q r4 = r13.viewData // Catch: java.lang.Exception -> Lf
|
||||
java.lang.Object r4 = r4.d() // Catch: java.lang.Exception -> Lf
|
||||
com.adif.elcanomovil.widget.configuration.WidgetViewConfigData r4 = (com.adif.elcanomovil.widget.configuration.WidgetViewConfigData) r4 // Catch: java.lang.Exception -> Lf
|
||||
if (r4 == 0) goto L95
|
||||
java.lang.Boolean r4 = r4.getStationToIsRodalies() // Catch: java.lang.Exception -> Lf
|
||||
java.lang.Boolean r11 = java.lang.Boolean.TRUE // Catch: java.lang.Exception -> Lf
|
||||
boolean r4 = kotlin.jvm.internal.Intrinsics.areEqual(r4, r11) // Catch: java.lang.Exception -> Lf
|
||||
goto L96
|
||||
L95:
|
||||
r4 = r10
|
||||
L96:
|
||||
if (r4 == 0) goto L99
|
||||
r10 = 1
|
||||
L99:
|
||||
java.lang.Boolean r10 = java.lang.Boolean.valueOf(r10) // Catch: java.lang.Exception -> Lf
|
||||
r12 = 0
|
||||
r4 = r3
|
||||
r3 = 0
|
||||
r11 = 1
|
||||
r2.<init>(r3, r4, r5, r6, r7, r8, r9, r10, r11, r12) // Catch: java.lang.Exception -> Lf
|
||||
r0.put(r1, r2) // Catch: java.lang.Exception -> Lf
|
||||
com.adif.elcanomovil.serviceStorage.preferences.PreferenceStorage r1 = r13.preferenceStorage // Catch: java.lang.Exception -> Lf
|
||||
r1.setWidgetInfo(r0) // Catch: java.lang.Exception -> Lf
|
||||
goto Lb0
|
||||
Lad:
|
||||
m3.l.g(r0)
|
||||
Lb0:
|
||||
androidx.lifecycle.X r13 = r13._finishCreateWidget
|
||||
java.lang.Boolean r0 = java.lang.Boolean.TRUE
|
||||
r13.j(r0)
|
||||
return
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.adif.elcanomovil.widget.configuration.ConfigureWidgetViewModel.createWidget():void");
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
private final void handleSearchButtonTap() {
|
||||
this.navigationFlow.b(new Navigation.Direction(ConfigureWidgetFragmentDirections.INSTANCE.actionDeparturesFragmentToSelectStationFragment(NavArguments.StationSelectionType.STATION.toString()), null, 2, 0 == true ? 1 : 0));
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
private final void handleSearchToButtonTap() {
|
||||
this.navigationFlow.b(new Navigation.Direction(ConfigureWidgetFragmentDirections.INSTANCE.actionDeparturesFragmentToSelectStationFragment(NavArguments.StationSelectionType.STATION_TO.toString()), null, 2, 0 == true ? 1 : 0));
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final Object loadStationInfo(String str, Continuation<? super Station> continuation) {
|
||||
return this.getStationByIdUseCase.invoke(str, continuation);
|
||||
}
|
||||
|
||||
private final void switchStation() {
|
||||
WidgetViewConfigData widgetViewConfigData = (WidgetViewConfigData) this._viewData.d();
|
||||
if (widgetViewConfigData != null) {
|
||||
WidgetViewConfigData widgetViewConfigData2 = (WidgetViewConfigData) this._viewData.d();
|
||||
String stationCode = widgetViewConfigData2 != null ? widgetViewConfigData2.getStationCode() : null;
|
||||
WidgetViewConfigData widgetViewConfigData3 = (WidgetViewConfigData) this._viewData.d();
|
||||
String stationName = widgetViewConfigData3 != null ? widgetViewConfigData3.getStationName() : null;
|
||||
widgetViewConfigData.setStationCode(widgetViewConfigData.getStationToCode());
|
||||
widgetViewConfigData.setStationName(widgetViewConfigData.getStationToName());
|
||||
widgetViewConfigData.setStationToName(stationName);
|
||||
widgetViewConfigData.setStationToCode(stationCode);
|
||||
X x3 = this._viewData;
|
||||
x3.k(x3.d());
|
||||
}
|
||||
}
|
||||
|
||||
public final Job changeStation(String stationCode) {
|
||||
Intrinsics.checkNotNullParameter(stationCode, "stationCode");
|
||||
return BuildersKt.launch$default(q0.j(this), Dispatchers.getIO(), null, new ConfigureWidgetViewModel$changeStation$1(this, stationCode, null), 2, null);
|
||||
}
|
||||
|
||||
public final Job changeStationTo(String stationCode) {
|
||||
Intrinsics.checkNotNullParameter(stationCode, "stationCode");
|
||||
return BuildersKt.launch$default(q0.j(this), Dispatchers.getIO(), null, new ConfigureWidgetViewModel$changeStationTo$1(this, stationCode, null), 2, null);
|
||||
}
|
||||
|
||||
public final Q getFinishCreateWidget() {
|
||||
return this.finishCreateWidget;
|
||||
}
|
||||
|
||||
public final InterfaceC0266a getNavigation() {
|
||||
return this.navigation;
|
||||
}
|
||||
|
||||
public final Q getShowCreateWidgetButton() {
|
||||
return this.showCreateWidgetButton;
|
||||
}
|
||||
|
||||
public final Q getViewData() {
|
||||
return this.viewData;
|
||||
}
|
||||
|
||||
public final int getWidgetId() {
|
||||
return this.widgetId;
|
||||
}
|
||||
|
||||
public final void handleHeaderButtonTap(StationAction action) {
|
||||
Intrinsics.checkNotNullParameter(action, "action");
|
||||
int i = WhenMappings.$EnumSwitchMapping$0[action.ordinal()];
|
||||
if (i == 1) {
|
||||
handleSearchButtonTap();
|
||||
return;
|
||||
}
|
||||
if (i == 2) {
|
||||
handleSearchToButtonTap();
|
||||
} else if (i == 3) {
|
||||
createWidget();
|
||||
} else {
|
||||
if (i != 4) {
|
||||
return;
|
||||
}
|
||||
switchStation();
|
||||
}
|
||||
}
|
||||
|
||||
public final void handleTrainTypeChange(boolean it) {
|
||||
this.isCercanias = it;
|
||||
}
|
||||
|
||||
public final void setWidgetId(int i) {
|
||||
this.widgetId = i;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.adif.elcanomovil.widget.configuration;
|
||||
|
||||
import com.adif.elcanomovil.domain.usecases.stations.GetStationByIdUseCase;
|
||||
import com.adif.elcanomovil.serviceStorage.preferences.PreferenceStorage;
|
||||
import dagger.internal.DaggerGenerated;
|
||||
import dagger.internal.Factory;
|
||||
import dagger.internal.QualifierMetadata;
|
||||
import dagger.internal.ScopeMetadata;
|
||||
import javax.inject.Provider;
|
||||
|
||||
@ScopeMetadata
|
||||
@DaggerGenerated
|
||||
@QualifierMetadata
|
||||
/* loaded from: classes3.dex */
|
||||
public final class ConfigureWidgetViewModel_Factory implements Factory<ConfigureWidgetViewModel> {
|
||||
private final Provider<GetStationByIdUseCase> getStationByIdUseCaseProvider;
|
||||
private final Provider<PreferenceStorage> preferenceStorageProvider;
|
||||
|
||||
public ConfigureWidgetViewModel_Factory(Provider<PreferenceStorage> provider, Provider<GetStationByIdUseCase> provider2) {
|
||||
this.preferenceStorageProvider = provider;
|
||||
this.getStationByIdUseCaseProvider = provider2;
|
||||
}
|
||||
|
||||
public static ConfigureWidgetViewModel_Factory create(Provider<PreferenceStorage> provider, Provider<GetStationByIdUseCase> provider2) {
|
||||
return new ConfigureWidgetViewModel_Factory(provider, provider2);
|
||||
}
|
||||
|
||||
public static ConfigureWidgetViewModel newInstance(PreferenceStorage preferenceStorage, GetStationByIdUseCase getStationByIdUseCase) {
|
||||
return new ConfigureWidgetViewModel(preferenceStorage, getStationByIdUseCase);
|
||||
}
|
||||
|
||||
@Override // javax.inject.Provider
|
||||
public ConfigureWidgetViewModel get() {
|
||||
return newInstance(this.preferenceStorageProvider.get(), this.getStationByIdUseCaseProvider.get());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.adif.elcanomovil.widget.configuration;
|
||||
|
||||
import androidx.lifecycle.w0;
|
||||
import dagger.Binds;
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
import dagger.hilt.InstallIn;
|
||||
import dagger.hilt.android.components.ActivityRetainedComponent;
|
||||
import dagger.hilt.android.components.ViewModelComponent;
|
||||
import dagger.hilt.android.internal.lifecycle.HiltViewModelMap;
|
||||
import dagger.hilt.codegen.OriginatingElement;
|
||||
import dagger.multibindings.IntoMap;
|
||||
import dagger.multibindings.IntoSet;
|
||||
import dagger.multibindings.StringKey;
|
||||
|
||||
@OriginatingElement(topLevelClass = ConfigureWidgetViewModel.class)
|
||||
/* loaded from: classes3.dex */
|
||||
public final class ConfigureWidgetViewModel_HiltModules {
|
||||
|
||||
@Module
|
||||
@InstallIn({ViewModelComponent.class})
|
||||
/* loaded from: classes3.dex */
|
||||
public static abstract class BindsModule {
|
||||
private BindsModule() {
|
||||
}
|
||||
|
||||
@Binds
|
||||
@StringKey("com.adif.elcanomovil.widget.configuration.ConfigureWidgetViewModel")
|
||||
@HiltViewModelMap
|
||||
@IntoMap
|
||||
public abstract w0 binds(ConfigureWidgetViewModel configureWidgetViewModel);
|
||||
}
|
||||
|
||||
@Module
|
||||
@InstallIn({ActivityRetainedComponent.class})
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class KeyModule {
|
||||
private KeyModule() {
|
||||
}
|
||||
|
||||
@Provides
|
||||
@HiltViewModelMap.KeySet
|
||||
@IntoSet
|
||||
public static String provide() {
|
||||
return "com.adif.elcanomovil.widget.configuration.ConfigureWidgetViewModel";
|
||||
}
|
||||
}
|
||||
|
||||
private ConfigureWidgetViewModel_HiltModules() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.adif.elcanomovil.widget.configuration;
|
||||
|
||||
import com.adif.elcanomovil.widget.configuration.ConfigureWidgetViewModel_HiltModules;
|
||||
import dagger.internal.DaggerGenerated;
|
||||
import dagger.internal.Factory;
|
||||
import dagger.internal.Preconditions;
|
||||
import dagger.internal.QualifierMetadata;
|
||||
import dagger.internal.ScopeMetadata;
|
||||
|
||||
@ScopeMetadata
|
||||
@DaggerGenerated
|
||||
@QualifierMetadata({"dagger.hilt.android.internal.lifecycle.HiltViewModelMap.KeySet"})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class ConfigureWidgetViewModel_HiltModules_KeyModule_ProvideFactory implements Factory<String> {
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class InstanceHolder {
|
||||
private static final ConfigureWidgetViewModel_HiltModules_KeyModule_ProvideFactory INSTANCE = new ConfigureWidgetViewModel_HiltModules_KeyModule_ProvideFactory();
|
||||
|
||||
private InstanceHolder() {
|
||||
}
|
||||
}
|
||||
|
||||
public static ConfigureWidgetViewModel_HiltModules_KeyModule_ProvideFactory create() {
|
||||
return InstanceHolder.INSTANCE;
|
||||
}
|
||||
|
||||
public static String provide() {
|
||||
return (String) Preconditions.checkNotNullFromProvides(ConfigureWidgetViewModel_HiltModules.KeyModule.provide());
|
||||
}
|
||||
|
||||
@Override // javax.inject.Provider
|
||||
public String get() {
|
||||
return provide();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
package com.adif.elcanomovil.widget.configuration;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.ContextWrapper;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import androidx.fragment.app.K;
|
||||
import androidx.lifecycle.y0;
|
||||
import dagger.hilt.android.flags.FragmentGetContextFix;
|
||||
import dagger.hilt.android.internal.lifecycle.DefaultViewModelFactories;
|
||||
import dagger.hilt.android.internal.managers.FragmentComponentManager;
|
||||
import dagger.hilt.internal.GeneratedComponentManagerHolder;
|
||||
import dagger.hilt.internal.Preconditions;
|
||||
import dagger.hilt.internal.UnsafeCasts;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public abstract class Hilt_ConfigureWidgetFragment extends K implements GeneratedComponentManagerHolder {
|
||||
private ContextWrapper componentContext;
|
||||
private volatile FragmentComponentManager componentManager;
|
||||
private final Object componentManagerLock;
|
||||
private boolean disableGetContextFix;
|
||||
private boolean injected;
|
||||
|
||||
public Hilt_ConfigureWidgetFragment() {
|
||||
this.componentManagerLock = new Object();
|
||||
this.injected = false;
|
||||
}
|
||||
|
||||
private void initializeComponentContext() {
|
||||
if (this.componentContext == null) {
|
||||
this.componentContext = FragmentComponentManager.createContextWrapper(super.getContext(), this);
|
||||
this.disableGetContextFix = FragmentGetContextFix.isFragmentGetContextFixDisabled(super.getContext());
|
||||
}
|
||||
}
|
||||
|
||||
public FragmentComponentManager createComponentManager() {
|
||||
return new FragmentComponentManager(this);
|
||||
}
|
||||
|
||||
@Override // dagger.hilt.internal.GeneratedComponentManager
|
||||
public final Object generatedComponent() {
|
||||
return componentManager().generatedComponent();
|
||||
}
|
||||
|
||||
@Override // androidx.fragment.app.K
|
||||
public Context getContext() {
|
||||
if (super.getContext() == null && !this.disableGetContextFix) {
|
||||
return null;
|
||||
}
|
||||
initializeComponentContext();
|
||||
return this.componentContext;
|
||||
}
|
||||
|
||||
@Override // androidx.fragment.app.K, androidx.lifecycle.InterfaceC0200v
|
||||
public y0 getDefaultViewModelProviderFactory() {
|
||||
return DefaultViewModelFactories.getFragmentFactory(this, super.getDefaultViewModelProviderFactory());
|
||||
}
|
||||
|
||||
public void inject() {
|
||||
if (this.injected) {
|
||||
return;
|
||||
}
|
||||
this.injected = true;
|
||||
((ConfigureWidgetFragment_GeneratedInjector) generatedComponent()).injectConfigureWidgetFragment((ConfigureWidgetFragment) UnsafeCasts.unsafeCast(this));
|
||||
}
|
||||
|
||||
@Override // androidx.fragment.app.K
|
||||
public void onAttach(Context context) {
|
||||
super.onAttach(context);
|
||||
initializeComponentContext();
|
||||
inject();
|
||||
}
|
||||
|
||||
@Override // androidx.fragment.app.K
|
||||
public LayoutInflater onGetLayoutInflater(Bundle bundle) {
|
||||
LayoutInflater onGetLayoutInflater = super.onGetLayoutInflater(bundle);
|
||||
return onGetLayoutInflater.cloneInContext(FragmentComponentManager.createContextWrapper(onGetLayoutInflater, this));
|
||||
}
|
||||
|
||||
@Override // dagger.hilt.internal.GeneratedComponentManagerHolder
|
||||
public final FragmentComponentManager componentManager() {
|
||||
if (this.componentManager == null) {
|
||||
synchronized (this.componentManagerLock) {
|
||||
try {
|
||||
if (this.componentManager == null) {
|
||||
this.componentManager = createComponentManager();
|
||||
}
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
}
|
||||
return this.componentManager;
|
||||
}
|
||||
|
||||
public Hilt_ConfigureWidgetFragment(int i) {
|
||||
super(i);
|
||||
this.componentManagerLock = new Object();
|
||||
this.injected = false;
|
||||
}
|
||||
|
||||
@Override // androidx.fragment.app.K
|
||||
public void onAttach(Activity activity) {
|
||||
super.onAttach(activity);
|
||||
ContextWrapper contextWrapper = this.componentContext;
|
||||
Preconditions.checkState(contextWrapper == null || FragmentComponentManager.findActivity(contextWrapper) == activity, "onAttach called multiple times with different Context! Hilt Fragments should not be retained.", new Object[0]);
|
||||
initializeComponentContext();
|
||||
inject();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,169 @@
|
||||
package com.adif.elcanomovil.widget.configuration;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
@Metadata(d1 = {"\u0000\"\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b \n\u0002\u0010\b\n\u0002\b\u0002\b\u0086\b\u0018\u00002\u00020\u0001BM\u0012\n\b\u0002\u0010\u0002\u001a\u0004\u0018\u00010\u0003\u0012\n\b\u0002\u0010\u0004\u001a\u0004\u0018\u00010\u0003\u0012\n\b\u0002\u0010\u0005\u001a\u0004\u0018\u00010\u0006\u0012\n\b\u0002\u0010\u0007\u001a\u0004\u0018\u00010\u0003\u0012\n\b\u0002\u0010\b\u001a\u0004\u0018\u00010\u0003\u0012\n\b\u0002\u0010\t\u001a\u0004\u0018\u00010\u0006¢\u0006\u0002\u0010\nJ\u000b\u0010\u001c\u001a\u0004\u0018\u00010\u0003HÆ\u0003J\u000b\u0010\u001d\u001a\u0004\u0018\u00010\u0003HÆ\u0003J\u0010\u0010\u001e\u001a\u0004\u0018\u00010\u0006HÆ\u0003¢\u0006\u0002\u0010\u0010J\u000b\u0010\u001f\u001a\u0004\u0018\u00010\u0003HÆ\u0003J\u000b\u0010 \u001a\u0004\u0018\u00010\u0003HÆ\u0003J\u0010\u0010!\u001a\u0004\u0018\u00010\u0006HÆ\u0003¢\u0006\u0002\u0010\u0010JV\u0010\"\u001a\u00020\u00002\n\b\u0002\u0010\u0002\u001a\u0004\u0018\u00010\u00032\n\b\u0002\u0010\u0004\u001a\u0004\u0018\u00010\u00032\n\b\u0002\u0010\u0005\u001a\u0004\u0018\u00010\u00062\n\b\u0002\u0010\u0007\u001a\u0004\u0018\u00010\u00032\n\b\u0002\u0010\b\u001a\u0004\u0018\u00010\u00032\n\b\u0002\u0010\t\u001a\u0004\u0018\u00010\u0006HÆ\u0001¢\u0006\u0002\u0010#J\u0013\u0010$\u001a\u00020\u00062\b\u0010%\u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u0010&\u001a\u00020'HÖ\u0001J\t\u0010(\u001a\u00020\u0003HÖ\u0001R\u001c\u0010\u0002\u001a\u0004\u0018\u00010\u0003X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u000b\u0010\f\"\u0004\b\r\u0010\u000eR\u001e\u0010\u0005\u001a\u0004\u0018\u00010\u0006X\u0086\u000e¢\u0006\u0010\n\u0002\u0010\u0013\u001a\u0004\b\u000f\u0010\u0010\"\u0004\b\u0011\u0010\u0012R\u001c\u0010\u0004\u001a\u0004\u0018\u00010\u0003X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0014\u0010\f\"\u0004\b\u0015\u0010\u000eR\u001c\u0010\u0007\u001a\u0004\u0018\u00010\u0003X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0016\u0010\f\"\u0004\b\u0017\u0010\u000eR\u001e\u0010\t\u001a\u0004\u0018\u00010\u0006X\u0086\u000e¢\u0006\u0010\n\u0002\u0010\u0013\u001a\u0004\b\u0018\u0010\u0010\"\u0004\b\u0019\u0010\u0012R\u001c\u0010\b\u001a\u0004\u0018\u00010\u0003X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u001a\u0010\f\"\u0004\b\u001b\u0010\u000e¨\u0006)"}, d2 = {"Lcom/adif/elcanomovil/widget/configuration/WidgetViewConfigData;", "", "stationCode", "", "stationName", "stationIsRodalies", "", "stationToCode", "stationToName", "stationToIsRodalies", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;)V", "getStationCode", "()Ljava/lang/String;", "setStationCode", "(Ljava/lang/String;)V", "getStationIsRodalies", "()Ljava/lang/Boolean;", "setStationIsRodalies", "(Ljava/lang/Boolean;)V", "Ljava/lang/Boolean;", "getStationName", "setStationName", "getStationToCode", "setStationToCode", "getStationToIsRodalies", "setStationToIsRodalies", "getStationToName", "setStationToName", "component1", "component2", "component3", "component4", "component5", "component6", "copy", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;)Lcom/adif/elcanomovil/widget/configuration/WidgetViewConfigData;", "equals", "other", "hashCode", "", "toString", "widget_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public final /* data */ class WidgetViewConfigData {
|
||||
private String stationCode;
|
||||
private Boolean stationIsRodalies;
|
||||
private String stationName;
|
||||
private String stationToCode;
|
||||
private Boolean stationToIsRodalies;
|
||||
private String stationToName;
|
||||
|
||||
public WidgetViewConfigData() {
|
||||
this(null, null, null, null, null, null, 63, null);
|
||||
}
|
||||
|
||||
public static /* synthetic */ WidgetViewConfigData copy$default(WidgetViewConfigData widgetViewConfigData, String str, String str2, Boolean bool, String str3, String str4, Boolean bool2, int i, Object obj) {
|
||||
if ((i & 1) != 0) {
|
||||
str = widgetViewConfigData.stationCode;
|
||||
}
|
||||
if ((i & 2) != 0) {
|
||||
str2 = widgetViewConfigData.stationName;
|
||||
}
|
||||
if ((i & 4) != 0) {
|
||||
bool = widgetViewConfigData.stationIsRodalies;
|
||||
}
|
||||
if ((i & 8) != 0) {
|
||||
str3 = widgetViewConfigData.stationToCode;
|
||||
}
|
||||
if ((i & 16) != 0) {
|
||||
str4 = widgetViewConfigData.stationToName;
|
||||
}
|
||||
if ((i & 32) != 0) {
|
||||
bool2 = widgetViewConfigData.stationToIsRodalies;
|
||||
}
|
||||
String str5 = str4;
|
||||
Boolean bool3 = bool2;
|
||||
return widgetViewConfigData.copy(str, str2, bool, str3, str5, bool3);
|
||||
}
|
||||
|
||||
/* renamed from: component1, reason: from getter */
|
||||
public final String getStationCode() {
|
||||
return this.stationCode;
|
||||
}
|
||||
|
||||
/* renamed from: component2, reason: from getter */
|
||||
public final String getStationName() {
|
||||
return this.stationName;
|
||||
}
|
||||
|
||||
/* renamed from: component3, reason: from getter */
|
||||
public final Boolean getStationIsRodalies() {
|
||||
return this.stationIsRodalies;
|
||||
}
|
||||
|
||||
/* renamed from: component4, reason: from getter */
|
||||
public final String getStationToCode() {
|
||||
return this.stationToCode;
|
||||
}
|
||||
|
||||
/* renamed from: component5, reason: from getter */
|
||||
public final String getStationToName() {
|
||||
return this.stationToName;
|
||||
}
|
||||
|
||||
/* renamed from: component6, reason: from getter */
|
||||
public final Boolean getStationToIsRodalies() {
|
||||
return this.stationToIsRodalies;
|
||||
}
|
||||
|
||||
public final WidgetViewConfigData copy(String stationCode, String stationName, Boolean stationIsRodalies, String stationToCode, String stationToName, Boolean stationToIsRodalies) {
|
||||
return new WidgetViewConfigData(stationCode, stationName, stationIsRodalies, stationToCode, stationToName, stationToIsRodalies);
|
||||
}
|
||||
|
||||
public boolean equals(Object other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
if (!(other instanceof WidgetViewConfigData)) {
|
||||
return false;
|
||||
}
|
||||
WidgetViewConfigData widgetViewConfigData = (WidgetViewConfigData) other;
|
||||
return Intrinsics.areEqual(this.stationCode, widgetViewConfigData.stationCode) && Intrinsics.areEqual(this.stationName, widgetViewConfigData.stationName) && Intrinsics.areEqual(this.stationIsRodalies, widgetViewConfigData.stationIsRodalies) && Intrinsics.areEqual(this.stationToCode, widgetViewConfigData.stationToCode) && Intrinsics.areEqual(this.stationToName, widgetViewConfigData.stationToName) && Intrinsics.areEqual(this.stationToIsRodalies, widgetViewConfigData.stationToIsRodalies);
|
||||
}
|
||||
|
||||
public final String getStationCode() {
|
||||
return this.stationCode;
|
||||
}
|
||||
|
||||
public final Boolean getStationIsRodalies() {
|
||||
return this.stationIsRodalies;
|
||||
}
|
||||
|
||||
public final String getStationName() {
|
||||
return this.stationName;
|
||||
}
|
||||
|
||||
public final String getStationToCode() {
|
||||
return this.stationToCode;
|
||||
}
|
||||
|
||||
public final Boolean getStationToIsRodalies() {
|
||||
return this.stationToIsRodalies;
|
||||
}
|
||||
|
||||
public final String getStationToName() {
|
||||
return this.stationToName;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
String str = this.stationCode;
|
||||
int hashCode = (str == null ? 0 : str.hashCode()) * 31;
|
||||
String str2 = this.stationName;
|
||||
int hashCode2 = (hashCode + (str2 == null ? 0 : str2.hashCode())) * 31;
|
||||
Boolean bool = this.stationIsRodalies;
|
||||
int hashCode3 = (hashCode2 + (bool == null ? 0 : bool.hashCode())) * 31;
|
||||
String str3 = this.stationToCode;
|
||||
int hashCode4 = (hashCode3 + (str3 == null ? 0 : str3.hashCode())) * 31;
|
||||
String str4 = this.stationToName;
|
||||
int hashCode5 = (hashCode4 + (str4 == null ? 0 : str4.hashCode())) * 31;
|
||||
Boolean bool2 = this.stationToIsRodalies;
|
||||
return hashCode5 + (bool2 != null ? bool2.hashCode() : 0);
|
||||
}
|
||||
|
||||
public final void setStationCode(String str) {
|
||||
this.stationCode = str;
|
||||
}
|
||||
|
||||
public final void setStationIsRodalies(Boolean bool) {
|
||||
this.stationIsRodalies = bool;
|
||||
}
|
||||
|
||||
public final void setStationName(String str) {
|
||||
this.stationName = str;
|
||||
}
|
||||
|
||||
public final void setStationToCode(String str) {
|
||||
this.stationToCode = str;
|
||||
}
|
||||
|
||||
public final void setStationToIsRodalies(Boolean bool) {
|
||||
this.stationToIsRodalies = bool;
|
||||
}
|
||||
|
||||
public final void setStationToName(String str) {
|
||||
this.stationToName = str;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "WidgetViewConfigData(stationCode=" + this.stationCode + ", stationName=" + this.stationName + ", stationIsRodalies=" + this.stationIsRodalies + ", stationToCode=" + this.stationToCode + ", stationToName=" + this.stationToName + ", stationToIsRodalies=" + this.stationToIsRodalies + ')';
|
||||
}
|
||||
|
||||
public WidgetViewConfigData(String str, String str2, Boolean bool, String str3, String str4, Boolean bool2) {
|
||||
this.stationCode = str;
|
||||
this.stationName = str2;
|
||||
this.stationIsRodalies = bool;
|
||||
this.stationToCode = str3;
|
||||
this.stationToName = str4;
|
||||
this.stationToIsRodalies = bool2;
|
||||
}
|
||||
|
||||
public /* synthetic */ WidgetViewConfigData(String str, String str2, Boolean bool, String str3, String str4, Boolean bool2, int i, DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this((i & 1) != 0 ? null : str, (i & 2) != 0 ? null : str2, (i & 4) != 0 ? null : bool, (i & 8) != 0 ? null : str3, (i & 16) != 0 ? null : str4, (i & 32) != 0 ? null : bool2);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user