Initial import of ADIF API reverse-engineering toolkit

This commit is contained in:
2025-12-16 08:37:56 +01:00
commit 60388529c1
11486 changed files with 1086536 additions and 0 deletions

View File

@@ -0,0 +1,110 @@
package com.adif.elcanomovil.uiSelectStation.main;
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: classes2.dex */
public abstract class Hilt_SelectStationFragment extends K implements GeneratedComponentManagerHolder {
private ContextWrapper componentContext;
private volatile FragmentComponentManager componentManager;
private final Object componentManagerLock;
private boolean disableGetContextFix;
private boolean injected;
public Hilt_SelectStationFragment() {
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;
((SelectStationFragment_GeneratedInjector) generatedComponent()).injectSelectStationFragment((SelectStationFragment) 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_SelectStationFragment(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();
}
}

View File

@@ -0,0 +1,48 @@
package com.adif.elcanomovil.uiSelectStation.main;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.recyclerview.widget.I0;
import androidx.recyclerview.widget.Z;
import com.adif.elcanomovil.domain.entities.station.Station;
import com.adif.elcanomovil.uiSelectStation.R;
import com.google.android.gms.measurement.api.AppMeasurementSdk;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
@Metadata(d1 = {"\u00006\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0002\b\t\u0018\u00002\u000e\u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\u00030\u0001B.\u0012%\u0010\n\u001a!\u0012\u0013\u0012\u00110\u0002¢\u0006\f\b\u0005\u0012\b\b\u0006\u0012\u0004\b\b(\u0007\u0012\u0004\u0012\u00020\b0\u0004j\u0002`\\u0006\u0004\b\u000b\u0010\fJ\u001f\u0010\u0011\u001a\u00020\u00032\u0006\u0010\u000e\u001a\u00020\r2\u0006\u0010\u0010\u001a\u00020\u000fH\u0016¢\u0006\u0004\b\u0011\u0010\u0012J\u001f\u0010\u0015\u001a\u00020\b2\u0006\u0010\u0013\u001a\u00020\u00032\u0006\u0010\u0014\u001a\u00020\u000fH\u0016¢\u0006\u0004\b\u0015\u0010\u0016R3\u0010\n\u001a!\u0012\u0013\u0012\u00110\u0002¢\u0006\f\b\u0005\u0012\b\b\u0006\u0012\u0004\b\b(\u0007\u0012\u0004\u0012\u00020\b0\u0004j\u0002`\t8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\n\u0010\u0017¨\u0006\u0018"}, d2 = {"Lcom/adif/elcanomovil/uiSelectStation/main/SelectStationAdapter;", "Landroidx/recyclerview/widget/Z;", "Lcom/adif/elcanomovil/domain/entities/station/Station;", "Landroidx/recyclerview/widget/I0;", "Lkotlin/Function1;", "Lkotlin/ParameterName;", AppMeasurementSdk.ConditionalUserProperty.NAME, "station", "", "Lcom/adif/elcanomovil/uiSelectStation/main/OnStationSelected;", "onTap", "<init>", "(Lkotlin/jvm/functions/Function1;)V", "Landroid/view/ViewGroup;", "parent", "", "viewType", "onCreateViewHolder", "(Landroid/view/ViewGroup;I)Landroidx/recyclerview/widget/I0;", "holder", "position", "onBindViewHolder", "(Landroidx/recyclerview/widget/I0;I)V", "Lkotlin/jvm/functions/Function1;", "ui-select-station_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
/* loaded from: classes2.dex */
public final class SelectStationAdapter extends Z {
private final Function1<Station, Unit> onTap;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r0v1, types: [java.lang.Object, androidx.recyclerview.widget.d] */
public SelectStationAdapter(Function1<? super Station, Unit> onTap) {
super(new Object());
Intrinsics.checkNotNullParameter(onTap, "onTap");
this.onTap = onTap;
}
@Override // androidx.recyclerview.widget.AbstractC0220h0
public void onBindViewHolder(I0 holder, int position) {
Intrinsics.checkNotNullParameter(holder, "holder");
Station station = (Station) getItem(position);
if (holder instanceof StationViewHolder) {
Intrinsics.checkNotNull(station);
((StationViewHolder) holder).bind(station);
}
}
@Override // androidx.recyclerview.widget.AbstractC0220h0
public I0 onCreateViewHolder(ViewGroup parent, int viewType) {
Intrinsics.checkNotNullParameter(parent, "parent");
View inflate = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_station_option, parent, false);
Function1<Station, Unit> function1 = this.onTap;
Intrinsics.checkNotNull(inflate);
return new StationViewHolder(function1, inflate);
}
}

View File

@@ -0,0 +1,9 @@
package com.adif.elcanomovil.uiSelectStation.main;
import com.google.android.gms.measurement.api.AppMeasurementSdk;
import kotlin.Metadata;
@Metadata(d1 = {"\u0000\u0018\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0000*@\u0010\u0000\"\u001d\u0012\u0013\u0012\u00110\u0002¢\u0006\f\b\u0003\u0012\b\b\u0004\u0012\u0004\b\b(\u0005\u0012\u0004\u0012\u00020\u00060\u00012\u001d\u0012\u0013\u0012\u00110\u0002¢\u0006\f\b\u0003\u0012\b\b\u0004\u0012\u0004\b\b(\u0005\u0012\u0004\u0012\u00020\u00060\u0001¨\u0006\u0007"}, d2 = {"OnStationSelected", "Lkotlin/Function1;", "Lcom/adif/elcanomovil/domain/entities/station/Station;", "Lkotlin/ParameterName;", AppMeasurementSdk.ConditionalUserProperty.NAME, "station", "", "ui-select-station_proNon_corporateRelease"}, k = 2, mv = {1, 9, 0}, xi = 48)
/* loaded from: classes2.dex */
public final class SelectStationAdapterKt {
}

View File

@@ -0,0 +1,547 @@
package com.adif.elcanomovil.uiSelectStation.main;
import android.graphics.Rect;
import android.os.Bundle;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import androidx.fragment.app.K;
import androidx.lifecycle.C;
import androidx.lifecycle.C0;
import androidx.lifecycle.D0;
import androidx.lifecycle.InterfaceC0200v;
import androidx.lifecycle.J;
import androidx.lifecycle.q0;
import androidx.lifecycle.y0;
import androidx.recyclerview.widget.AbstractC0232n0;
import androidx.recyclerview.widget.E0;
import androidx.recyclerview.widget.RecyclerView;
import com.adif.elcanomovil.commonNavGraph.arguments.NavArguments;
import com.adif.elcanomovil.commonNavGraph.extensions.NavigationExtensionsKt;
import com.adif.elcanomovil.commonViews.UserStationsView;
import com.adif.elcanomovil.commonViews.data.StationOptionViewEntity;
import com.adif.elcanomovil.commonViews.data.StationViewEntity;
import com.adif.elcanomovil.domain.entities.station.Station;
import com.adif.elcanomovil.uiSelectStation.R;
import com.adif.elcanomovil.uiSelectStation.databinding.FragmentSelectStationBinding;
import com.adif.elcanomovil.uiSelectStation.main.SelectStationViewState;
import com.google.android.gms.measurement.api.AppMeasurementSdk;
import com.google.android.material.textfield.TextInputEditText;
import dagger.hilt.android.AndroidEntryPoint;
import java.util.List;
import kotlin.Lazy;
import kotlin.LazyKt;
import kotlin.LazyThreadSafetyMode;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.collections.CollectionsKt;
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 kotlinx.coroutines.BuildersKt__Builders_commonKt;
import kotlinx.coroutines.flow.Flow;
import kotlinx.coroutines.flow.FlowKt;
import l0.C0435a;
import o0.C0531h;
@Metadata(d1 = {"\u0000|\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0002\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\u0005\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0005\b\u0007\u0018\u0000 <2\u00020\u0001:\u0001<B\u0007¢\u0006\u0004\b\u0002\u0010\u0003J\u000f\u0010\u0005\u001a\u00020\u0004H\u0002¢\u0006\u0004\b\u0005\u0010\u0003J\u0017\u0010\b\u001a\u00020\u00042\u0006\u0010\u0007\u001a\u00020\u0006H\u0002¢\u0006\u0004\b\b\u0010\tJ\u001d\u0010\r\u001a\u00020\u00042\f\u0010\f\u001a\b\u0012\u0004\u0012\u00020\u000b0\nH\u0002¢\u0006\u0004\b\r\u0010\u000eJ\u000f\u0010\u000f\u001a\u00020\u0004H\u0002¢\u0006\u0004\b\u000f\u0010\u0003J\u000f\u0010\u0010\u001a\u00020\u0004H\u0002¢\u0006\u0004\b\u0010\u0010\u0003J\u000f\u0010\u0011\u001a\u00020\u0004H\u0002¢\u0006\u0004\b\u0011\u0010\u0003J\u0019\u0010\u0014\u001a\u00020\u00042\b\u0010\u0013\u001a\u0004\u0018\u00010\u0012H\u0002¢\u0006\u0004\b\u0014\u0010\u0015J#\u0010\u0019\u001a\u00020\u00042\b\u0010\u0017\u001a\u0004\u0018\u00010\u00162\b\u0010\u0018\u001a\u0004\u0018\u00010\u0016H\u0002¢\u0006\u0004\b\u0019\u0010\u001aJ\u0019\u0010\u001c\u001a\u00020\u00042\b\u0010\u0013\u001a\u0004\u0018\u00010\u001bH\u0002¢\u0006\u0004\b\u001c\u0010\u001dJ!\u0010\"\u001a\u00020\u00042\u0006\u0010\u001f\u001a\u00020\u001e2\b\u0010!\u001a\u0004\u0018\u00010 H\u0016¢\u0006\u0004\b\"\u0010#R\u0016\u0010%\u001a\u00020$8\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\b%\u0010&R\u001b\u0010,\u001a\u00020'8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b(\u0010)\u001a\u0004\b*\u0010+R\u001b\u00102\u001a\u00020-8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b.\u0010/\u001a\u0004\b0\u00101R3\u0010\u0014\u001a!\u0012\u0013\u0012\u00110\u000b¢\u0006\f\b4\u0012\b\b5\u0012\u0004\b\b(\u0013\u0012\u0004\u0012\u00020\u000403j\u0002`68\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0014\u00107R\u0016\u00109\u001a\u0002088\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\b9\u0010:R\u0016\u0010;\u001a\u0002088\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\b;\u0010:¨\u0006="}, d2 = {"Lcom/adif/elcanomovil/uiSelectStation/main/SelectStationFragment;", "Landroidx/fragment/app/K;", "<init>", "()V", "", "configureViews", "Lcom/adif/elcanomovil/uiSelectStation/main/SelectStationViewState$MainSearch;", "mainSearch", "showMainSearch", "(Lcom/adif/elcanomovil/uiSelectStation/main/SelectStationViewState$MainSearch;)V", "", "Lcom/adif/elcanomovil/domain/entities/station/Station;", "stations", "showSearchResults", "(Ljava/util/List;)V", "showNoResults", "configureObservers", "configureViewListeners", "", "station", "onTapStation", "(Ljava/lang/String;)V", "Lcom/adif/elcanomovil/commonViews/data/StationViewEntity;", "homeStation", "workStation", "updateUserStationsViews", "(Lcom/adif/elcanomovil/commonViews/data/StationViewEntity;Lcom/adif/elcanomovil/commonViews/data/StationViewEntity;)V", "Lcom/adif/elcanomovil/commonViews/data/StationOptionViewEntity;", "updateUserNearStationViews", "(Lcom/adif/elcanomovil/commonViews/data/StationOptionViewEntity;)V", "Landroid/view/View;", "view", "Landroid/os/Bundle;", "savedInstanceState", "onViewCreated", "(Landroid/view/View;Landroid/os/Bundle;)V", "Lcom/adif/elcanomovil/uiSelectStation/databinding/FragmentSelectStationBinding;", "binding", "Lcom/adif/elcanomovil/uiSelectStation/databinding/FragmentSelectStationBinding;", "Lcom/adif/elcanomovil/uiSelectStation/main/SelectStationFragmentArgs;", "args$delegate", "Lo0/h;", "getArgs", "()Lcom/adif/elcanomovil/uiSelectStation/main/SelectStationFragmentArgs;", "args", "Lcom/adif/elcanomovil/uiSelectStation/main/SelectStationViewModel;", "viewModel$delegate", "Lkotlin/Lazy;", "getViewModel", "()Lcom/adif/elcanomovil/uiSelectStation/main/SelectStationViewModel;", "viewModel", "Lkotlin/Function1;", "Lkotlin/ParameterName;", AppMeasurementSdk.ConditionalUserProperty.NAME, "Lcom/adif/elcanomovil/uiSelectStation/main/OnStationSelected;", "Lkotlin/jvm/functions/Function1;", "Lcom/adif/elcanomovil/uiSelectStation/main/SelectStationAdapter;", "searchResultsAdapter", "Lcom/adif/elcanomovil/uiSelectStation/main/SelectStationAdapter;", "recentSearchesAdapter", "Companion", "ui-select-station_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
@AndroidEntryPoint
@SourceDebugExtension({"SMAP\nSelectStationFragment.kt\nKotlin\n*S Kotlin\n*F\n+ 1 SelectStationFragment.kt\ncom/adif/elcanomovil/uiSelectStation/main/SelectStationFragment\n+ 2 FragmentNavArgsLazy.kt\nandroidx/navigation/fragment/FragmentNavArgsLazyKt\n+ 3 FragmentViewModelLazy.kt\nandroidx/fragment/app/FragmentViewModelLazyKt\n*L\n1#1,177:1\n42#2,3:178\n106#3,15:181\n*S KotlinDebug\n*F\n+ 1 SelectStationFragment.kt\ncom/adif/elcanomovil/uiSelectStation/main/SelectStationFragment\n*L\n32#1:178,3\n34#1:181,15\n*E\n"})
/* loaded from: classes2.dex */
public final class SelectStationFragment extends Hilt_SelectStationFragment {
private static final long DEBOUNCE_TIME = 1000;
private static final int DIVIDER_HEIGHT = 16;
/* renamed from: args$delegate, reason: from kotlin metadata */
private final C0531h args;
private FragmentSelectStationBinding binding;
private final Function1<Station, Unit> onTapStation;
private SelectStationAdapter recentSearchesAdapter;
private SelectStationAdapter searchResultsAdapter;
/* renamed from: viewModel$delegate, reason: from kotlin metadata */
private final Lazy viewModel;
public SelectStationFragment() {
super(R.layout.fragment_select_station);
this.args = new C0531h(Reflection.getOrCreateKotlinClass(SelectStationFragmentArgs.class), new Function0<Bundle>() { // from class: com.adif.elcanomovil.uiSelectStation.main.SelectStationFragment$special$$inlined$navArgs$1
{
super(0);
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // kotlin.jvm.functions.Function0
public final Bundle invoke() {
Bundle arguments = K.this.getArguments();
if (arguments != null) {
return arguments;
}
throw new IllegalStateException("Fragment " + K.this + " has null arguments");
}
});
final Function0<K> function0 = new Function0<K>() { // from class: com.adif.elcanomovil.uiSelectStation.main.SelectStationFragment$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.uiSelectStation.main.SelectStationFragment$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 = m3.d.n(this, Reflection.getOrCreateKotlinClass(SelectStationViewModel.class), new Function0<C0>() { // from class: com.adif.elcanomovil.uiSelectStation.main.SelectStationFragment$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<l0.c>() { // from class: com.adif.elcanomovil.uiSelectStation.main.SelectStationFragment$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 l0.c invoke() {
l0.c cVar;
Function0 function03 = Function0.this;
if (function03 != null && (cVar = (l0.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.uiSelectStation.main.SelectStationFragment$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;
}
});
this.onTapStation = new f(this, 2);
}
private final void configureObservers() {
J viewLifecycleOwner = getViewLifecycleOwner();
Intrinsics.checkNotNullExpressionValue(viewLifecycleOwner, "getViewLifecycleOwner(...)");
BuildersKt__Builders_commonKt.launch$default(q0.h(viewLifecycleOwner), null, null, new d(this, null), 3, null);
}
private final void configureViewListeners() {
FragmentSelectStationBinding fragmentSelectStationBinding = this.binding;
FragmentSelectStationBinding fragmentSelectStationBinding2 = null;
if (fragmentSelectStationBinding == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
fragmentSelectStationBinding = null;
}
fragmentSelectStationBinding.btnBack.setOnClickListener(new D1.a(this, 14));
FragmentSelectStationBinding fragmentSelectStationBinding3 = this.binding;
if (fragmentSelectStationBinding3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
fragmentSelectStationBinding3 = null;
}
RecyclerView recyclerView = fragmentSelectStationBinding3.layoutSearchResultsView;
SelectStationAdapter selectStationAdapter = this.searchResultsAdapter;
if (selectStationAdapter == null) {
Intrinsics.throwUninitializedPropertyAccessException("searchResultsAdapter");
selectStationAdapter = null;
}
recyclerView.setAdapter(selectStationAdapter);
FragmentSelectStationBinding fragmentSelectStationBinding4 = this.binding;
if (fragmentSelectStationBinding4 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
fragmentSelectStationBinding4 = null;
}
RecyclerView recyclerView2 = fragmentSelectStationBinding4.layoutRecentSearchesView;
SelectStationAdapter selectStationAdapter2 = this.recentSearchesAdapter;
if (selectStationAdapter2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("recentSearchesAdapter");
selectStationAdapter2 = null;
}
recyclerView2.setAdapter(selectStationAdapter2);
FragmentSelectStationBinding fragmentSelectStationBinding5 = this.binding;
if (fragmentSelectStationBinding5 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
fragmentSelectStationBinding5 = null;
}
TextInputEditText searchBox = fragmentSelectStationBinding5.searchBox;
Intrinsics.checkNotNullExpressionValue(searchBox, "searchBox");
Flow distinctUntilChanged = FlowKt.distinctUntilChanged(FlowKt.debounce(TextFlowKt.getTextFlow(searchBox), 1000L));
C lifecycle = getLifecycle();
Intrinsics.checkNotNullExpressionValue(lifecycle, "<get-lifecycle>(...)");
BuildersKt__Builders_commonKt.launch$default(q0.g(lifecycle), null, null, new e(distinctUntilChanged, this, null), 3, null);
FragmentSelectStationBinding fragmentSelectStationBinding6 = this.binding;
if (fragmentSelectStationBinding6 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
fragmentSelectStationBinding6 = null;
}
fragmentSelectStationBinding6.layoutUserStationsView.setListener(new f(this, 0));
FragmentSelectStationBinding fragmentSelectStationBinding7 = this.binding;
if (fragmentSelectStationBinding7 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
} else {
fragmentSelectStationBinding2 = fragmentSelectStationBinding7;
}
fragmentSelectStationBinding2.layoutNearStationView.setListener(new f(this, 1));
}
public static final void configureViewListeners$lambda$0(SelectStationFragment this$0, View view) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
this$0.onTapStation(null);
}
private final void configureViews() {
FragmentSelectStationBinding fragmentSelectStationBinding = this.binding;
FragmentSelectStationBinding fragmentSelectStationBinding2 = null;
if (fragmentSelectStationBinding == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
fragmentSelectStationBinding = null;
}
fragmentSelectStationBinding.inputLayout.setHintAnimationEnabled(false);
this.searchResultsAdapter = new SelectStationAdapter(this.onTapStation);
this.recentSearchesAdapter = new SelectStationAdapter(this.onTapStation);
FragmentSelectStationBinding fragmentSelectStationBinding3 = this.binding;
if (fragmentSelectStationBinding3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
} else {
fragmentSelectStationBinding2 = fragmentSelectStationBinding3;
}
fragmentSelectStationBinding2.layoutSearchResultsView.i(new AbstractC0232n0() { // from class: com.adif.elcanomovil.uiSelectStation.main.SelectStationFragment$configureViews$1
@Override // androidx.recyclerview.widget.AbstractC0232n0
public void getItemOffsets(Rect outRect, View view, RecyclerView parent, E0 state) {
Intrinsics.checkNotNullParameter(outRect, "outRect");
Intrinsics.checkNotNullParameter(view, "view");
Intrinsics.checkNotNullParameter(parent, "parent");
Intrinsics.checkNotNullParameter(state, "state");
super.getItemOffsets(outRect, view, parent, state);
outRect.bottom = 16;
}
});
}
private final SelectStationFragmentArgs getArgs() {
return (SelectStationFragmentArgs) this.args.getValue();
}
public final SelectStationViewModel getViewModel() {
return (SelectStationViewModel) this.viewModel.getValue();
}
public final void onTapStation(String station) {
Object systemService = requireContext().getSystemService("input_method");
FragmentSelectStationBinding fragmentSelectStationBinding = null;
InputMethodManager inputMethodManager = systemService instanceof InputMethodManager ? (InputMethodManager) systemService : null;
if (inputMethodManager != null) {
FragmentSelectStationBinding fragmentSelectStationBinding2 = this.binding;
if (fragmentSelectStationBinding2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
} else {
fragmentSelectStationBinding = fragmentSelectStationBinding2;
}
inputMethodManager.hideSoftInputFromWindow(fragmentSelectStationBinding.getRoot().getWindowToken(), 0);
}
getViewModel().saveStation(station);
NavigationExtensionsKt.popBackStackWithResult(m3.l.n(this), getArgs().getKey(), station);
}
public final void showMainSearch(SelectStationViewState.MainSearch mainSearch) {
FragmentSelectStationBinding fragmentSelectStationBinding = this.binding;
SelectStationAdapter selectStationAdapter = null;
if (fragmentSelectStationBinding == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
fragmentSelectStationBinding = null;
}
fragmentSelectStationBinding.layoutSearchsEmpty.getRoot().setVisibility(8);
FragmentSelectStationBinding fragmentSelectStationBinding2 = this.binding;
if (fragmentSelectStationBinding2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
fragmentSelectStationBinding2 = null;
}
fragmentSelectStationBinding2.layoutSuggestedStation.setVisibility(0);
FragmentSelectStationBinding fragmentSelectStationBinding3 = this.binding;
if (fragmentSelectStationBinding3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
fragmentSelectStationBinding3 = null;
}
fragmentSelectStationBinding3.layoutSearchResultsTitle.setText(getString(R.string.search_stations_recent_title));
FragmentSelectStationBinding fragmentSelectStationBinding4 = this.binding;
if (fragmentSelectStationBinding4 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
fragmentSelectStationBinding4 = null;
}
fragmentSelectStationBinding4.layoutSearchResultsView.setVisibility(8);
FragmentSelectStationBinding fragmentSelectStationBinding5 = this.binding;
if (fragmentSelectStationBinding5 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
fragmentSelectStationBinding5 = null;
}
fragmentSelectStationBinding5.layoutRecentSearchesView.setVisibility(0);
SelectStationAdapter selectStationAdapter2 = this.searchResultsAdapter;
if (selectStationAdapter2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("searchResultsAdapter");
selectStationAdapter2 = null;
}
selectStationAdapter2.submitList(CollectionsKt.emptyList());
SelectStationAdapter selectStationAdapter3 = this.recentSearchesAdapter;
if (selectStationAdapter3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("recentSearchesAdapter");
} else {
selectStationAdapter = selectStationAdapter3;
}
selectStationAdapter.submitList(mainSearch.getLastSearches());
updateUserStationsViews(mainSearch.getHomeStation(), mainSearch.getWorkStation());
updateUserNearStationViews(mainSearch.getUserNearStation());
}
public final void showNoResults() {
FragmentSelectStationBinding fragmentSelectStationBinding = this.binding;
FragmentSelectStationBinding fragmentSelectStationBinding2 = null;
if (fragmentSelectStationBinding == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
fragmentSelectStationBinding = null;
}
fragmentSelectStationBinding.layoutSearchsEmpty.getRoot().setVisibility(0);
FragmentSelectStationBinding fragmentSelectStationBinding3 = this.binding;
if (fragmentSelectStationBinding3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
fragmentSelectStationBinding3 = null;
}
fragmentSelectStationBinding3.layoutSuggestedStation.setVisibility(8);
FragmentSelectStationBinding fragmentSelectStationBinding4 = this.binding;
if (fragmentSelectStationBinding4 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
fragmentSelectStationBinding4 = null;
}
fragmentSelectStationBinding4.layoutUserStationsView.setVisibility(8);
FragmentSelectStationBinding fragmentSelectStationBinding5 = this.binding;
if (fragmentSelectStationBinding5 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
fragmentSelectStationBinding5 = null;
}
fragmentSelectStationBinding5.layoutSearchResultsTitle.setText("");
FragmentSelectStationBinding fragmentSelectStationBinding6 = this.binding;
if (fragmentSelectStationBinding6 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
fragmentSelectStationBinding6 = null;
}
fragmentSelectStationBinding6.layoutSearchResultsView.setVisibility(8);
FragmentSelectStationBinding fragmentSelectStationBinding7 = this.binding;
if (fragmentSelectStationBinding7 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
fragmentSelectStationBinding7 = null;
}
fragmentSelectStationBinding7.layoutRecentSearchesView.setVisibility(8);
FragmentSelectStationBinding fragmentSelectStationBinding8 = this.binding;
if (fragmentSelectStationBinding8 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
fragmentSelectStationBinding8 = null;
}
fragmentSelectStationBinding8.layoutSearchsEmpty.title.setText(getText(R.string.select_station_no_results_title_));
FragmentSelectStationBinding fragmentSelectStationBinding9 = this.binding;
if (fragmentSelectStationBinding9 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
fragmentSelectStationBinding9 = null;
}
fragmentSelectStationBinding9.layoutSearchsEmpty.message.setText(getText(R.string.select_station_no_results_subtitle_));
FragmentSelectStationBinding fragmentSelectStationBinding10 = this.binding;
if (fragmentSelectStationBinding10 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
} else {
fragmentSelectStationBinding2 = fragmentSelectStationBinding10;
}
fragmentSelectStationBinding2.layoutSearchsEmpty.iconNoResults.setImageResource(R.drawable.ic_result_empty);
}
public final void showSearchResults(List<Station> stations) {
FragmentSelectStationBinding fragmentSelectStationBinding = this.binding;
SelectStationAdapter selectStationAdapter = null;
if (fragmentSelectStationBinding == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
fragmentSelectStationBinding = null;
}
fragmentSelectStationBinding.layoutSearchsEmpty.getRoot().setVisibility(8);
FragmentSelectStationBinding fragmentSelectStationBinding2 = this.binding;
if (fragmentSelectStationBinding2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
fragmentSelectStationBinding2 = null;
}
fragmentSelectStationBinding2.layoutSuggestedStation.setVisibility(8);
FragmentSelectStationBinding fragmentSelectStationBinding3 = this.binding;
if (fragmentSelectStationBinding3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
fragmentSelectStationBinding3 = null;
}
fragmentSelectStationBinding3.layoutUserStationsView.setVisibility(8);
FragmentSelectStationBinding fragmentSelectStationBinding4 = this.binding;
if (fragmentSelectStationBinding4 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
fragmentSelectStationBinding4 = null;
}
fragmentSelectStationBinding4.layoutSearchResultsTitle.setText(getString(R.string.search_stations_title));
FragmentSelectStationBinding fragmentSelectStationBinding5 = this.binding;
if (fragmentSelectStationBinding5 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
fragmentSelectStationBinding5 = null;
}
fragmentSelectStationBinding5.layoutNearStation.setVisibility(8);
FragmentSelectStationBinding fragmentSelectStationBinding6 = this.binding;
if (fragmentSelectStationBinding6 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
fragmentSelectStationBinding6 = null;
}
fragmentSelectStationBinding6.layoutSearchResultsView.setVisibility(0);
FragmentSelectStationBinding fragmentSelectStationBinding7 = this.binding;
if (fragmentSelectStationBinding7 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
fragmentSelectStationBinding7 = null;
}
fragmentSelectStationBinding7.layoutRecentSearchesView.setVisibility(8);
SelectStationAdapter selectStationAdapter2 = this.searchResultsAdapter;
if (selectStationAdapter2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("searchResultsAdapter");
} else {
selectStationAdapter = selectStationAdapter2;
}
selectStationAdapter.submitList(stations);
}
private final void updateUserNearStationViews(StationOptionViewEntity station) {
Unit unit;
FragmentSelectStationBinding fragmentSelectStationBinding = null;
if (station != null) {
FragmentSelectStationBinding fragmentSelectStationBinding2 = this.binding;
if (fragmentSelectStationBinding2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
fragmentSelectStationBinding2 = null;
}
fragmentSelectStationBinding2.layoutNearStation.setVisibility(0);
FragmentSelectStationBinding fragmentSelectStationBinding3 = this.binding;
if (fragmentSelectStationBinding3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
fragmentSelectStationBinding3 = null;
}
fragmentSelectStationBinding3.layoutNearStationView.updateData(station);
unit = Unit.INSTANCE;
} else {
unit = null;
}
if (unit == null) {
FragmentSelectStationBinding fragmentSelectStationBinding4 = this.binding;
if (fragmentSelectStationBinding4 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
} else {
fragmentSelectStationBinding = fragmentSelectStationBinding4;
}
fragmentSelectStationBinding.layoutNearStation.setVisibility(8);
}
}
private final void updateUserStationsViews(StationViewEntity homeStation, StationViewEntity workStation) {
Unit unit;
Unit unit2;
int i;
FragmentSelectStationBinding fragmentSelectStationBinding = this.binding;
FragmentSelectStationBinding fragmentSelectStationBinding2 = null;
if (fragmentSelectStationBinding == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
fragmentSelectStationBinding = null;
}
UserStationsView userStationsView = fragmentSelectStationBinding.layoutUserStationsView;
if (homeStation == null && workStation == null) {
i = 8;
} else {
FragmentSelectStationBinding fragmentSelectStationBinding3 = this.binding;
if (fragmentSelectStationBinding3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
fragmentSelectStationBinding3 = null;
}
fragmentSelectStationBinding3.layoutUserStationsView.setShowLayoutHeader(false);
if (homeStation != null) {
FragmentSelectStationBinding fragmentSelectStationBinding4 = this.binding;
if (fragmentSelectStationBinding4 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
fragmentSelectStationBinding4 = null;
}
fragmentSelectStationBinding4.layoutUserStationsView.setHomeStation(homeStation);
unit = Unit.INSTANCE;
} else {
unit = null;
}
if (unit == null) {
FragmentSelectStationBinding fragmentSelectStationBinding5 = this.binding;
if (fragmentSelectStationBinding5 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
fragmentSelectStationBinding5 = null;
}
fragmentSelectStationBinding5.layoutUserStationsView.hideHomeStation();
}
if (workStation != null) {
FragmentSelectStationBinding fragmentSelectStationBinding6 = this.binding;
if (fragmentSelectStationBinding6 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
fragmentSelectStationBinding6 = null;
}
fragmentSelectStationBinding6.layoutUserStationsView.setWorkStation(workStation);
unit2 = Unit.INSTANCE;
} else {
unit2 = null;
}
if (unit2 == null) {
FragmentSelectStationBinding fragmentSelectStationBinding7 = this.binding;
if (fragmentSelectStationBinding7 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
} else {
fragmentSelectStationBinding2 = fragmentSelectStationBinding7;
}
fragmentSelectStationBinding2.layoutUserStationsView.hideWorkStation();
}
i = 0;
}
userStationsView.setVisibility(i);
}
@Override // androidx.fragment.app.K
public void onViewCreated(View view, Bundle savedInstanceState) {
Intrinsics.checkNotNullParameter(view, "view");
super.onViewCreated(view, savedInstanceState);
FragmentSelectStationBinding bind = FragmentSelectStationBinding.bind(view);
Intrinsics.checkNotNullExpressionValue(bind, "bind(...)");
this.binding = bind;
configureViews();
configureObservers();
configureViewListeners();
getViewModel().onViewsLoaded(NavArguments.StationSelectionType.valueOf(getArgs().getKey()));
}
}

View File

@@ -0,0 +1,119 @@
package com.adif.elcanomovil.uiSelectStation.main;
import android.os.Bundle;
import androidx.lifecycle.n0;
import kotlin.Metadata;
import kotlin.jvm.JvmStatic;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import o0.InterfaceC0530g;
@Metadata(d1 = {"\u00006\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0006\b\u0086\b\u0018\u0000 \u001b2\u00020\u0001:\u0001\u001bB\u000f\u0012\u0006\u0010\u0003\u001a\u00020\u0002¢\u0006\u0004\b\u0004\u0010\u0005J\r\u0010\u0007\u001a\u00020\u0006¢\u0006\u0004\b\u0007\u0010\bJ\r\u0010\n\u001a\u00020\\u0006\u0004\b\n\u0010\u000bJ\u0010\u0010\f\u001a\u00020\u0002HÆ\u0003¢\u0006\u0004\b\f\u0010\rJ\u001a\u0010\u000e\u001a\u00020\u00002\b\b\u0002\u0010\u0003\u001a\u00020\u0002HÆ\u0001¢\u0006\u0004\b\u000e\u0010\u000fJ\u0010\u0010\u0010\u001a\u00020\u0002HÖ\u0001¢\u0006\u0004\b\u0010\u0010\rJ\u0010\u0010\u0012\u001a\u00020\u0011HÖ\u0001¢\u0006\u0004\b\u0012\u0010\u0013J\u001a\u0010\u0017\u001a\u00020\u00162\b\u0010\u0015\u001a\u0004\u0018\u00010\u0014HÖ\u0003¢\u0006\u0004\b\u0017\u0010\u0018R\u0017\u0010\u0003\u001a\u00020\u00028\u0006¢\u0006\f\n\u0004\b\u0003\u0010\u0019\u001a\u0004\b\u001a\u0010\\u0006\u001c"}, d2 = {"Lcom/adif/elcanomovil/uiSelectStation/main/SelectStationFragmentArgs;", "Lo0/g;", "", "key", "<init>", "(Ljava/lang/String;)V", "Landroid/os/Bundle;", "toBundle", "()Landroid/os/Bundle;", "Landroidx/lifecycle/n0;", "toSavedStateHandle", "()Landroidx/lifecycle/n0;", "component1", "()Ljava/lang/String;", "copy", "(Ljava/lang/String;)Lcom/adif/elcanomovil/uiSelectStation/main/SelectStationFragmentArgs;", "toString", "", "hashCode", "()I", "", "other", "", "equals", "(Ljava/lang/Object;)Z", "Ljava/lang/String;", "getKey", "Companion", "common-nav-graph_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
/* loaded from: classes2.dex */
public final /* data */ class SelectStationFragmentArgs implements InterfaceC0530g {
/* renamed from: Companion, reason: from kotlin metadata */
public static final Companion INSTANCE = new Companion(null);
private final String key;
@Metadata(d1 = {"\u0000\"\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\b\u0086\u0003\u0018\u00002\u00020\u0001B\t\b\u0002¢\u0006\u0004\b\u0002\u0010\u0003J\u0017\u0010\u0007\u001a\u00020\u00062\u0006\u0010\u0005\u001a\u00020\u0004H\u0007¢\u0006\u0004\b\u0007\u0010\bJ\u0017\u0010\u000b\u001a\u00020\u00062\u0006\u0010\n\u001a\u00020\tH\u0007¢\u0006\u0004\b\u000b\u0010\\u0006\r"}, d2 = {"Lcom/adif/elcanomovil/uiSelectStation/main/SelectStationFragmentArgs$Companion;", "", "<init>", "()V", "Landroid/os/Bundle;", "bundle", "Lcom/adif/elcanomovil/uiSelectStation/main/SelectStationFragmentArgs;", "fromBundle", "(Landroid/os/Bundle;)Lcom/adif/elcanomovil/uiSelectStation/main/SelectStationFragmentArgs;", "Landroidx/lifecycle/n0;", "savedStateHandle", "fromSavedStateHandle", "(Landroidx/lifecycle/n0;)Lcom/adif/elcanomovil/uiSelectStation/main/SelectStationFragmentArgs;", "common-nav-graph_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
/* loaded from: classes2.dex */
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
@JvmStatic
public final SelectStationFragmentArgs fromBundle(Bundle bundle) {
Intrinsics.checkNotNullParameter(bundle, "bundle");
bundle.setClassLoader(SelectStationFragmentArgs.class.getClassLoader());
if (!bundle.containsKey("key")) {
throw new IllegalArgumentException("Required argument \"key\" is missing and does not have an android:defaultValue");
}
String string = bundle.getString("key");
if (string != null) {
return new SelectStationFragmentArgs(string);
}
throw new IllegalArgumentException("Argument \"key\" is marked as non-null but was passed a null value.");
}
@JvmStatic
public final SelectStationFragmentArgs fromSavedStateHandle(n0 savedStateHandle) {
Intrinsics.checkNotNullParameter(savedStateHandle, "savedStateHandle");
if (!savedStateHandle.b("key")) {
throw new IllegalArgumentException("Required argument \"key\" is missing and does not have an android:defaultValue");
}
String str = (String) savedStateHandle.c("key");
if (str != null) {
return new SelectStationFragmentArgs(str);
}
throw new IllegalArgumentException("Argument \"key\" is marked as non-null but was passed a null value");
}
private Companion() {
}
}
public SelectStationFragmentArgs(String key) {
Intrinsics.checkNotNullParameter(key, "key");
this.key = key;
}
public static /* synthetic */ SelectStationFragmentArgs copy$default(SelectStationFragmentArgs selectStationFragmentArgs, String str, int i, Object obj) {
if ((i & 1) != 0) {
str = selectStationFragmentArgs.key;
}
return selectStationFragmentArgs.copy(str);
}
@JvmStatic
public static final SelectStationFragmentArgs fromBundle(Bundle bundle) {
return INSTANCE.fromBundle(bundle);
}
@JvmStatic
public static final SelectStationFragmentArgs fromSavedStateHandle(n0 n0Var) {
return INSTANCE.fromSavedStateHandle(n0Var);
}
/* renamed from: component1, reason: from getter */
public final String getKey() {
return this.key;
}
public final SelectStationFragmentArgs copy(String key) {
Intrinsics.checkNotNullParameter(key, "key");
return new SelectStationFragmentArgs(key);
}
public boolean equals(Object other) {
if (this == other) {
return true;
}
return (other instanceof SelectStationFragmentArgs) && Intrinsics.areEqual(this.key, ((SelectStationFragmentArgs) other).key);
}
public final String getKey() {
return this.key;
}
public int hashCode() {
return this.key.hashCode();
}
public final Bundle toBundle() {
Bundle bundle = new Bundle();
bundle.putString("key", this.key);
return bundle;
}
public final n0 toSavedStateHandle() {
n0 n0Var = new n0();
n0Var.d(this.key, "key");
return n0Var;
}
public String toString() {
return com.google.android.gms.measurement.internal.a.n(new StringBuilder("SelectStationFragmentArgs(key="), this.key, ')');
}
}

View File

@@ -0,0 +1,75 @@
package com.adif.elcanomovil.uiSelectStation.main;
import com.adif.elcanomovil.commonNavGraph.MainNavigationDirections;
import com.adif.elcanomovil.commonNavGraph.arguments.AlertActions;
import com.adif.elcanomovil.commonNavGraph.arguments.AlertType;
import com.adif.elcanomovil.commonNavGraph.arguments.Filters;
import com.adif.elcanomovil.commonNavGraph.arguments.StationObservationArg;
import com.google.android.gms.measurement.api.AppMeasurementSdk;
import com.google.firebase.analytics.FirebaseAnalytics;
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\u0003\u0018\u0000 \u00032\u00020\u0001:\u0001\u0003B\u0007\b\u0002¢\u0006\u0002\u0010\u0002¨\u0006\u0004"}, d2 = {"Lcom/adif/elcanomovil/uiSelectStation/main/SelectStationFragmentDirections;", "", "()V", "Companion", "common-nav-graph_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
/* loaded from: classes2.dex */
public final class SelectStationFragmentDirections {
/* renamed from: Companion, reason: from kotlin metadata */
public static final Companion INSTANCE = new Companion(null);
@Metadata(d1 = {"\u0000H\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\u0003\n\u0002\u0010\u0011\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0013\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\\u0006\u0004\b\u000f\u0010\u0010J#\u0010\u0014\u001a\u00020\u000e2\u0006\u0010\u0011\u001a\u00020\u00072\f\u0010\u0013\u001a\b\u0012\u0004\u0012\u00020\u00070\u0012¢\u0006\u0004\b\u0014\u0010\u0015J\u001d\u0010\u0017\u001a\u00020\u000e2\u0006\u0010\u0011\u001a\u00020\u00072\u0006\u0010\u0013\u001a\u00020\u0016¢\u0006\u0004\b\u0017\u0010\u0018J\u0015\u0010\u001a\u001a\u00020\u000e2\u0006\u0010\u0019\u001a\u00020\u0007¢\u0006\u0004\b\u001a\u0010\u001bJ\u001d\u0010\u001d\u001a\u00020\u000e2\u0006\u0010\u0011\u001a\u00020\u00072\u0006\u0010\u0013\u001a\u00020\u001c¢\u0006\u0004\b\u001d\u0010\u001eJ\u0099\u0001\u0010,\u001a\u00020\u000e2\b\u0010\u001f\u001a\u0004\u0018\u00010\u00072\b\u0010 \u001a\u0004\u0018\u00010\u00072\b\u0010!\u001a\u0004\u0018\u00010\u00072\b\u0010\"\u001a\u0004\u0018\u00010\u00072\u0006\u0010#\u001a\u00020\u00042\u000e\u0010$\u001a\n\u0012\u0004\u0012\u00020\u0007\u0018\u00010\u00122\b\u0010%\u001a\u0004\u0018\u00010\u00072\u000e\u0010&\u001a\n\u0012\u0004\u0012\u00020\u0007\u0018\u00010\u00122\b\u0010'\u001a\u0004\u0018\u00010\u00072\b\u0010(\u001a\u0004\u0018\u00010\u00072\b\u0010)\u001a\u0004\u0018\u00010\u00072\b\u0010*\u001a\u0004\u0018\u00010\u00072\b\u0010+\u001a\u0004\u0018\u00010\u0007¢\u0006\u0004\b,\u0010-J\u0015\u0010.\u001a\u00020\u000e2\u0006\u0010\u0011\u001a\u00020\u0007¢\u0006\u0004\b.\u0010\u001b¨\u0006/"}, d2 = {"Lcom/adif/elcanomovil/uiSelectStation/main/SelectStationFragmentDirections$Companion;", "", "<init>", "()V", "", "blockOnback", "isCancelable", "", "title", "message", "Lcom/adif/elcanomovil/commonNavGraph/arguments/AlertActions;", "actions", "Lcom/adif/elcanomovil/commonNavGraph/arguments/AlertType;", "type", "Lo0/F;", "toAlertDialog", "(ZZLjava/lang/String;Ljava/lang/String;Lcom/adif/elcanomovil/commonNavGraph/arguments/AlertActions;Lcom/adif/elcanomovil/commonNavGraph/arguments/AlertType;)Lo0/F;", "key", "", "values", "toSelectableBottomSheet", "(Ljava/lang/String;[Ljava/lang/String;)Lo0/F;", "Lcom/adif/elcanomovil/commonNavGraph/arguments/StationObservationArg;", "toStationObservationsBottomSheet", "(Ljava/lang/String;Lcom/adif/elcanomovil/commonNavGraph/arguments/StationObservationArg;)Lo0/F;", "observation", "toTrainObservationBottomSheet", "(Ljava/lang/String;)Lo0/F;", "Lcom/adif/elcanomovil/commonNavGraph/arguments/Filters;", "toFilterListBottomSheet", "(Ljava/lang/String;Lcom/adif/elcanomovil/commonNavGraph/arguments/Filters;)Lo0/F;", "logo", AppMeasurementSdk.ConditionalUserProperty.NAME, "phone", "description", "accessible", "paymentWay", "offer", "correspondences", "web", FirebaseAnalytics.Param.LOCATION, "accessibleLabel", "openingHours", "playStore", "toStationsAlertDialog", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Z[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lo0/F;", "toSelectStationFragment", "common-nav-graph_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
/* loaded from: classes2.dex */
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public final F toAlertDialog(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 MainNavigationDirections.INSTANCE.toAlertDialog(blockOnback, isCancelable, title, message, actions, type);
}
public final F toFilterListBottomSheet(String key, Filters values) {
Intrinsics.checkNotNullParameter(key, "key");
Intrinsics.checkNotNullParameter(values, "values");
return MainNavigationDirections.INSTANCE.toFilterListBottomSheet(key, values);
}
public final F toSelectStationFragment(String key) {
Intrinsics.checkNotNullParameter(key, "key");
return MainNavigationDirections.INSTANCE.toSelectStationFragment(key);
}
public final F toSelectableBottomSheet(String key, String[] values) {
Intrinsics.checkNotNullParameter(key, "key");
Intrinsics.checkNotNullParameter(values, "values");
return MainNavigationDirections.INSTANCE.toSelectableBottomSheet(key, values);
}
public final F toStationObservationsBottomSheet(String key, StationObservationArg values) {
Intrinsics.checkNotNullParameter(key, "key");
Intrinsics.checkNotNullParameter(values, "values");
return MainNavigationDirections.INSTANCE.toStationObservationsBottomSheet(key, values);
}
public final F toStationsAlertDialog(String logo, String name, String phone, String description, boolean accessible, String[] paymentWay, String offer, String[] correspondences, String web, String location, String accessibleLabel, String openingHours, String playStore) {
return MainNavigationDirections.INSTANCE.toStationsAlertDialog(logo, name, phone, description, accessible, paymentWay, offer, correspondences, web, location, accessibleLabel, openingHours, playStore);
}
public final F toTrainObservationBottomSheet(String observation) {
Intrinsics.checkNotNullParameter(observation, "observation");
return MainNavigationDirections.INSTANCE.toTrainObservationBottomSheet(observation);
}
private Companion() {
}
}
private SelectStationFragmentDirections() {
}
}

View File

@@ -0,0 +1,14 @@
package com.adif.elcanomovil.uiSelectStation.main;
import dagger.hilt.InstallIn;
import dagger.hilt.android.components.FragmentComponent;
import dagger.hilt.codegen.OriginatingElement;
import dagger.hilt.internal.GeneratedEntryPoint;
@OriginatingElement(topLevelClass = SelectStationFragment.class)
@GeneratedEntryPoint
@InstallIn({FragmentComponent.class})
/* loaded from: classes2.dex */
public interface SelectStationFragment_GeneratedInjector {
void injectSelectStationFragment(SelectStationFragment selectStationFragment);
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,53 @@
package com.adif.elcanomovil.uiSelectStation.main;
import android.icu.text.Collator;
import com.adif.elcanomovil.domain.usecases.recentSearch.SaveRecentSearchUseCase;
import com.adif.elcanomovil.domain.usecases.stations.GetClosestStationUseCase;
import com.adif.elcanomovil.domain.usecases.stations.GetHomeStationUseCase;
import com.adif.elcanomovil.domain.usecases.stations.GetStationByNameUseCase;
import com.adif.elcanomovil.domain.usecases.stations.GetWorkStationUseCase;
import com.adif.elcanomovil.domain.usecases.stations.ObserveRecentlySearchedStationsWithDistanceUseCase;
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: classes2.dex */
public final class SelectStationViewModel_Factory implements Factory<SelectStationViewModel> {
private final Provider<Collator> collatorProvider;
private final Provider<GetClosestStationUseCase> getClosestStationUseCaseProvider;
private final Provider<GetHomeStationUseCase> getHomeStationUseCaseProvider;
private final Provider<GetStationByNameUseCase> getStationByNameUseCaseProvider;
private final Provider<GetWorkStationUseCase> getWorkStationUseCaseProvider;
private final Provider<ObserveRecentlySearchedStationsWithDistanceUseCase> observeRecentlySearchedStationsWithDistanceProvider;
private final Provider<SaveRecentSearchUseCase> saveRecentSearchUseCaseProvider;
private final Provider<d1.g> stringProvider;
public SelectStationViewModel_Factory(Provider<SaveRecentSearchUseCase> provider, Provider<GetClosestStationUseCase> provider2, Provider<GetHomeStationUseCase> provider3, Provider<GetWorkStationUseCase> provider4, Provider<GetStationByNameUseCase> provider5, Provider<ObserveRecentlySearchedStationsWithDistanceUseCase> provider6, Provider<d1.g> provider7, Provider<Collator> provider8) {
this.saveRecentSearchUseCaseProvider = provider;
this.getClosestStationUseCaseProvider = provider2;
this.getHomeStationUseCaseProvider = provider3;
this.getWorkStationUseCaseProvider = provider4;
this.getStationByNameUseCaseProvider = provider5;
this.observeRecentlySearchedStationsWithDistanceProvider = provider6;
this.stringProvider = provider7;
this.collatorProvider = provider8;
}
public static SelectStationViewModel_Factory create(Provider<SaveRecentSearchUseCase> provider, Provider<GetClosestStationUseCase> provider2, Provider<GetHomeStationUseCase> provider3, Provider<GetWorkStationUseCase> provider4, Provider<GetStationByNameUseCase> provider5, Provider<ObserveRecentlySearchedStationsWithDistanceUseCase> provider6, Provider<d1.g> provider7, Provider<Collator> provider8) {
return new SelectStationViewModel_Factory(provider, provider2, provider3, provider4, provider5, provider6, provider7, provider8);
}
public static SelectStationViewModel newInstance(SaveRecentSearchUseCase saveRecentSearchUseCase, GetClosestStationUseCase getClosestStationUseCase, GetHomeStationUseCase getHomeStationUseCase, GetWorkStationUseCase getWorkStationUseCase, GetStationByNameUseCase getStationByNameUseCase, ObserveRecentlySearchedStationsWithDistanceUseCase observeRecentlySearchedStationsWithDistanceUseCase, d1.g gVar, Collator collator) {
return new SelectStationViewModel(saveRecentSearchUseCase, getClosestStationUseCase, getHomeStationUseCase, getWorkStationUseCase, getStationByNameUseCase, observeRecentlySearchedStationsWithDistanceUseCase, gVar, collator);
}
@Override // javax.inject.Provider
public SelectStationViewModel get() {
return newInstance(this.saveRecentSearchUseCaseProvider.get(), this.getClosestStationUseCaseProvider.get(), this.getHomeStationUseCaseProvider.get(), this.getWorkStationUseCaseProvider.get(), this.getStationByNameUseCaseProvider.get(), this.observeRecentlySearchedStationsWithDistanceProvider.get(), this.stringProvider.get(), this.collatorProvider.get());
}
}

View File

@@ -0,0 +1,51 @@
package com.adif.elcanomovil.uiSelectStation.main;
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 = SelectStationViewModel.class)
/* loaded from: classes2.dex */
public final class SelectStationViewModel_HiltModules {
@Module
@InstallIn({ViewModelComponent.class})
/* loaded from: classes2.dex */
public static abstract class BindsModule {
private BindsModule() {
}
@Binds
@StringKey("com.adif.elcanomovil.uiSelectStation.main.SelectStationViewModel")
@HiltViewModelMap
@IntoMap
public abstract w0 binds(SelectStationViewModel selectStationViewModel);
}
@Module
@InstallIn({ActivityRetainedComponent.class})
/* loaded from: classes2.dex */
public static final class KeyModule {
private KeyModule() {
}
@Provides
@HiltViewModelMap.KeySet
@IntoSet
public static String provide() {
return "com.adif.elcanomovil.uiSelectStation.main.SelectStationViewModel";
}
}
private SelectStationViewModel_HiltModules() {
}
}

View File

@@ -0,0 +1,27 @@
package com.adif.elcanomovil.uiSelectStation.main;
import com.adif.elcanomovil.uiSelectStation.main.SelectStationViewModel_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: classes2.dex */
public final class SelectStationViewModel_HiltModules_KeyModule_ProvideFactory implements Factory<String> {
public static SelectStationViewModel_HiltModules_KeyModule_ProvideFactory create() {
return o.f5217a;
}
public static String provide() {
return (String) Preconditions.checkNotNullFromProvides(SelectStationViewModel_HiltModules.KeyModule.provide());
}
@Override // javax.inject.Provider
public String get() {
return provide();
}
}

View File

@@ -0,0 +1,193 @@
package com.adif.elcanomovil.uiSelectStation.main;
import com.adif.elcanomovil.commonViews.data.StationOptionViewEntity;
import com.adif.elcanomovil.commonViews.data.StationViewEntity;
import com.adif.elcanomovil.domain.entities.station.Station;
import java.util.List;
import kotlin.Metadata;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
@Metadata(d1 = {"\u0000\u001a\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\b6\u0018\u00002\u00020\u0001:\u0003\u0003\u0004\u0005B\u0007\b\u0004¢\u0006\u0002\u0010\u0002\u0082\u0001\u0003\u0006\u0007\\u0006\t"}, d2 = {"Lcom/adif/elcanomovil/uiSelectStation/main/SelectStationViewState;", "", "()V", "MainSearch", "NoResults", "ShowSearchResults", "Lcom/adif/elcanomovil/uiSelectStation/main/SelectStationViewState$MainSearch;", "Lcom/adif/elcanomovil/uiSelectStation/main/SelectStationViewState$NoResults;", "Lcom/adif/elcanomovil/uiSelectStation/main/SelectStationViewState$ShowSearchResults;", "ui-select-station_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
/* loaded from: classes2.dex */
public abstract class SelectStationViewState {
@Metadata(d1 = {"\u0000<\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u000e\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000e\n\u0000\b\u0086\b\u0018\u00002\u00020\u0001B1\u0012\f\u0010\u0002\u001a\b\u0012\u0004\u0012\u00020\u00040\u0003\u0012\b\u0010\u0005\u001a\u0004\u0018\u00010\u0006\u0012\b\u0010\u0007\u001a\u0004\u0018\u00010\u0006\u0012\b\u0010\b\u001a\u0004\u0018\u00010\\u0006\u0002\u0010\nJ\u000f\u0010\u0012\u001a\b\u0012\u0004\u0012\u00020\u00040\u0003HÆ\u0003J\u000b\u0010\u0013\u001a\u0004\u0018\u00010\u0006HÆ\u0003J\u000b\u0010\u0014\u001a\u0004\u0018\u00010\u0006HÆ\u0003J\u000b\u0010\u0015\u001a\u0004\u0018\u00010\tHÆ\u0003J=\u0010\u0016\u001a\u00020\u00002\u000e\b\u0002\u0010\u0002\u001a\b\u0012\u0004\u0012\u00020\u00040\u00032\n\b\u0002\u0010\u0005\u001a\u0004\u0018\u00010\u00062\n\b\u0002\u0010\u0007\u001a\u0004\u0018\u00010\u00062\n\b\u0002\u0010\b\u001a\u0004\u0018\u00010\tHÆ\u0001J\u0013\u0010\u0017\u001a\u00020\u00182\b\u0010\u0019\u001a\u0004\u0018\u00010\u001aHÖ\u0003J\t\u0010\u001b\u001a\u00020\u001cHÖ\u0001J\t\u0010\u001d\u001a\u00020\u001eHÖ\u0001R\u0013\u0010\u0005\u001a\u0004\u0018\u00010\u0006¢\u0006\b\n\u0000\u001a\u0004\b\u000b\u0010\fR\u0017\u0010\u0002\u001a\b\u0012\u0004\u0012\u00020\u00040\u0003¢\u0006\b\n\u0000\u001a\u0004\b\r\u0010\u000eR\u0013\u0010\b\u001a\u0004\u0018\u00010\\u0006\b\n\u0000\u001a\u0004\b\u000f\u0010\u0010R\u0013\u0010\u0007\u001a\u0004\u0018\u00010\u0006¢\u0006\b\n\u0000\u001a\u0004\b\u0011\u0010\\u0006\u001f"}, d2 = {"Lcom/adif/elcanomovil/uiSelectStation/main/SelectStationViewState$MainSearch;", "Lcom/adif/elcanomovil/uiSelectStation/main/SelectStationViewState;", "lastSearches", "", "Lcom/adif/elcanomovil/domain/entities/station/Station;", "homeStation", "Lcom/adif/elcanomovil/commonViews/data/StationViewEntity;", "workStation", "userNearStation", "Lcom/adif/elcanomovil/commonViews/data/StationOptionViewEntity;", "(Ljava/util/List;Lcom/adif/elcanomovil/commonViews/data/StationViewEntity;Lcom/adif/elcanomovil/commonViews/data/StationViewEntity;Lcom/adif/elcanomovil/commonViews/data/StationOptionViewEntity;)V", "getHomeStation", "()Lcom/adif/elcanomovil/commonViews/data/StationViewEntity;", "getLastSearches", "()Ljava/util/List;", "getUserNearStation", "()Lcom/adif/elcanomovil/commonViews/data/StationOptionViewEntity;", "getWorkStation", "component1", "component2", "component3", "component4", "copy", "equals", "", "other", "", "hashCode", "", "toString", "", "ui-select-station_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
/* loaded from: classes2.dex */
public static final /* data */ class MainSearch extends SelectStationViewState {
private final StationViewEntity homeStation;
private final List<Station> lastSearches;
private final StationOptionViewEntity userNearStation;
private final StationViewEntity workStation;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public MainSearch(List<Station> lastSearches, StationViewEntity stationViewEntity, StationViewEntity stationViewEntity2, StationOptionViewEntity stationOptionViewEntity) {
super(null);
Intrinsics.checkNotNullParameter(lastSearches, "lastSearches");
this.lastSearches = lastSearches;
this.homeStation = stationViewEntity;
this.workStation = stationViewEntity2;
this.userNearStation = stationOptionViewEntity;
}
/* JADX WARN: Multi-variable type inference failed */
public static /* synthetic */ MainSearch copy$default(MainSearch mainSearch, List list, StationViewEntity stationViewEntity, StationViewEntity stationViewEntity2, StationOptionViewEntity stationOptionViewEntity, int i, Object obj) {
if ((i & 1) != 0) {
list = mainSearch.lastSearches;
}
if ((i & 2) != 0) {
stationViewEntity = mainSearch.homeStation;
}
if ((i & 4) != 0) {
stationViewEntity2 = mainSearch.workStation;
}
if ((i & 8) != 0) {
stationOptionViewEntity = mainSearch.userNearStation;
}
return mainSearch.copy(list, stationViewEntity, stationViewEntity2, stationOptionViewEntity);
}
public final List<Station> component1() {
return this.lastSearches;
}
/* renamed from: component2, reason: from getter */
public final StationViewEntity getHomeStation() {
return this.homeStation;
}
/* renamed from: component3, reason: from getter */
public final StationViewEntity getWorkStation() {
return this.workStation;
}
/* renamed from: component4, reason: from getter */
public final StationOptionViewEntity getUserNearStation() {
return this.userNearStation;
}
public final MainSearch copy(List<Station> lastSearches, StationViewEntity homeStation, StationViewEntity workStation, StationOptionViewEntity userNearStation) {
Intrinsics.checkNotNullParameter(lastSearches, "lastSearches");
return new MainSearch(lastSearches, homeStation, workStation, userNearStation);
}
public boolean equals(Object other) {
if (this == other) {
return true;
}
if (!(other instanceof MainSearch)) {
return false;
}
MainSearch mainSearch = (MainSearch) other;
return Intrinsics.areEqual(this.lastSearches, mainSearch.lastSearches) && Intrinsics.areEqual(this.homeStation, mainSearch.homeStation) && Intrinsics.areEqual(this.workStation, mainSearch.workStation) && Intrinsics.areEqual(this.userNearStation, mainSearch.userNearStation);
}
public final StationViewEntity getHomeStation() {
return this.homeStation;
}
public final List<Station> getLastSearches() {
return this.lastSearches;
}
public final StationOptionViewEntity getUserNearStation() {
return this.userNearStation;
}
public final StationViewEntity getWorkStation() {
return this.workStation;
}
public int hashCode() {
int hashCode = this.lastSearches.hashCode() * 31;
StationViewEntity stationViewEntity = this.homeStation;
int hashCode2 = (hashCode + (stationViewEntity == null ? 0 : stationViewEntity.hashCode())) * 31;
StationViewEntity stationViewEntity2 = this.workStation;
int hashCode3 = (hashCode2 + (stationViewEntity2 == null ? 0 : stationViewEntity2.hashCode())) * 31;
StationOptionViewEntity stationOptionViewEntity = this.userNearStation;
return hashCode3 + (stationOptionViewEntity != null ? stationOptionViewEntity.hashCode() : 0);
}
public String toString() {
return "MainSearch(lastSearches=" + this.lastSearches + ", homeStation=" + this.homeStation + ", workStation=" + this.workStation + ", userNearStation=" + this.userNearStation + ')';
}
}
@Metadata(d1 = {"\u0000$\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000e\n\u0000\\n\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u0013\u0010\u0003\u001a\u00020\u00042\b\u0010\u0005\u001a\u0004\u0018\u00010\u0006HÖ\u0003J\t\u0010\u0007\u001a\u00020\bHÖ\u0001J\t\u0010\t\u001a\u00020\nHÖ\u0001¨\u0006\u000b"}, d2 = {"Lcom/adif/elcanomovil/uiSelectStation/main/SelectStationViewState$NoResults;", "Lcom/adif/elcanomovil/uiSelectStation/main/SelectStationViewState;", "()V", "equals", "", "other", "", "hashCode", "", "toString", "", "ui-select-station_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
/* loaded from: classes2.dex */
public static final /* data */ class NoResults extends SelectStationViewState {
public static final NoResults INSTANCE = new NoResults();
private NoResults() {
super(null);
}
public boolean equals(Object other) {
return this == other || (other instanceof NoResults);
}
public int hashCode() {
return -425797016;
}
public String toString() {
return "NoResults";
}
}
@Metadata(d1 = {"\u0000.\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000e\n\u0000\b\u0086\b\u0018\u00002\u00020\u0001B\u0013\u0012\f\u0010\u0002\u001a\b\u0012\u0004\u0012\u00020\u00040\u0003¢\u0006\u0002\u0010\u0005J\u000f\u0010\b\u001a\b\u0012\u0004\u0012\u00020\u00040\u0003HÆ\u0003J\u0019\u0010\t\u001a\u00020\u00002\u000e\b\u0002\u0010\u0002\u001a\b\u0012\u0004\u0012\u00020\u00040\u0003HÆ\u0001J\u0013\u0010\n\u001a\u00020\u000b2\b\u0010\f\u001a\u0004\u0018\u00010\rHÖ\u0003J\t\u0010\u000e\u001a\u00020\u000fHÖ\u0001J\t\u0010\u0010\u001a\u00020\u0011HÖ\u0001R\u0017\u0010\u0002\u001a\b\u0012\u0004\u0012\u00020\u00040\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0006\u0010\u0007¨\u0006\u0012"}, d2 = {"Lcom/adif/elcanomovil/uiSelectStation/main/SelectStationViewState$ShowSearchResults;", "Lcom/adif/elcanomovil/uiSelectStation/main/SelectStationViewState;", "stations", "", "Lcom/adif/elcanomovil/domain/entities/station/Station;", "(Ljava/util/List;)V", "getStations", "()Ljava/util/List;", "component1", "copy", "equals", "", "other", "", "hashCode", "", "toString", "", "ui-select-station_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
/* loaded from: classes2.dex */
public static final /* data */ class ShowSearchResults extends SelectStationViewState {
private final List<Station> stations;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public ShowSearchResults(List<Station> stations) {
super(null);
Intrinsics.checkNotNullParameter(stations, "stations");
this.stations = stations;
}
/* JADX WARN: Multi-variable type inference failed */
public static /* synthetic */ ShowSearchResults copy$default(ShowSearchResults showSearchResults, List list, int i, Object obj) {
if ((i & 1) != 0) {
list = showSearchResults.stations;
}
return showSearchResults.copy(list);
}
public final List<Station> component1() {
return this.stations;
}
public final ShowSearchResults copy(List<Station> stations) {
Intrinsics.checkNotNullParameter(stations, "stations");
return new ShowSearchResults(stations);
}
public boolean equals(Object other) {
if (this == other) {
return true;
}
return (other instanceof ShowSearchResults) && Intrinsics.areEqual(this.stations, ((ShowSearchResults) other).stations);
}
public final List<Station> getStations() {
return this.stations;
}
public int hashCode() {
return this.stations.hashCode();
}
public String toString() {
return com.google.android.gms.measurement.internal.a.o(new StringBuilder("ShowSearchResults(stations="), this.stations, ')');
}
}
public /* synthetic */ SelectStationViewState(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private SelectStationViewState() {
}
}

View File

@@ -0,0 +1,114 @@
package com.adif.elcanomovil.uiSelectStation.main;
import android.view.View;
import androidx.recyclerview.widget.I0;
import com.adif.elcanomovil.commonViews.data.StationViewEntity;
import com.adif.elcanomovil.commonViews.databinding.ViewStationOptionBinding;
import com.adif.elcanomovil.domain.entities.station.Station;
import com.adif.elcanomovil.extensions.FloatExtensionsKt;
import com.adif.elcanomovil.uiSelectStation.R;
import com.google.android.gms.measurement.api.AppMeasurementSdk;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.StringsKt__StringsJVMKt;
@Metadata(d1 = {"\u0000@\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u0003\u0018\u00002\u00020\u0001B6\u0012%\u0010\t\u001a!\u0012\u0013\u0012\u00110\u0003¢\u0006\f\b\u0004\u0012\b\b\u0005\u0012\u0004\b\b(\u0006\u0012\u0004\u0012\u00020\u00070\u0002j\u0002`\b\u0012\u0006\u0010\u000b\u001a\u00020\\u0006\u0004\b\f\u0010\rJ\u001f\u0010\u0012\u001a\u00020\u00102\u0006\u0010\u000f\u001a\u00020\u000e2\u0006\u0010\u0011\u001a\u00020\u0010H\u0002¢\u0006\u0004\b\u0012\u0010\u0013J\u0015\u0010\u0015\u001a\u00020\u00072\u0006\u0010\u0014\u001a\u00020\u0003¢\u0006\u0004\b\u0015\u0010\u0016R3\u0010\t\u001a!\u0012\u0013\u0012\u00110\u0003¢\u0006\f\b\u0004\u0012\b\b\u0005\u0012\u0004\b\b(\u0006\u0012\u0004\u0012\u00020\u00070\u0002j\u0002`\b8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\t\u0010\u0017R\u0014\u0010\u0019\u001a\u00020\u00188\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0019\u0010\u001a¨\u0006\u001b"}, d2 = {"Lcom/adif/elcanomovil/uiSelectStation/main/StationViewHolder;", "Landroidx/recyclerview/widget/I0;", "Lkotlin/Function1;", "Lcom/adif/elcanomovil/domain/entities/station/Station;", "Lkotlin/ParameterName;", AppMeasurementSdk.ConditionalUserProperty.NAME, "station", "", "Lcom/adif/elcanomovil/uiSelectStation/main/OnStationSelected;", "onTap", "Landroid/view/View;", "itemView", "<init>", "(Lkotlin/jvm/functions/Function1;Landroid/view/View;)V", "", "typeTraffic", "", "commuterNetwork", "paintTypeTraffic", "(ILjava/lang/String;)Ljava/lang/String;", "item", "bind", "(Lcom/adif/elcanomovil/domain/entities/station/Station;)V", "Lkotlin/jvm/functions/Function1;", "Lcom/adif/elcanomovil/commonViews/databinding/ViewStationOptionBinding;", "itemBinding", "Lcom/adif/elcanomovil/commonViews/databinding/ViewStationOptionBinding;", "ui-select-station_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
/* loaded from: classes2.dex */
public final class StationViewHolder extends I0 {
private final ViewStationOptionBinding itemBinding;
private final Function1<Station, Unit> onTap;
@Metadata(k = 3, mv = {1, 9, 0}, xi = 48)
/* loaded from: classes2.dex */
public /* synthetic */ class WhenMappings {
public static final /* synthetic */ int[] $EnumSwitchMapping$0;
static {
int[] iArr = new int[StationViewEntity.TypeTraffic.values().length];
try {
iArr[StationViewEntity.TypeTraffic.CERCANIAS.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
iArr[StationViewEntity.TypeTraffic.AVLDMD.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
iArr[StationViewEntity.TypeTraffic.BOTH.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
$EnumSwitchMapping$0 = iArr;
}
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
/* JADX WARN: Multi-variable type inference failed */
public StationViewHolder(Function1<? super Station, Unit> onTap, View itemView) {
super(itemView);
Intrinsics.checkNotNullParameter(onTap, "onTap");
Intrinsics.checkNotNullParameter(itemView, "itemView");
this.onTap = onTap;
ViewStationOptionBinding bind = ViewStationOptionBinding.bind(itemView);
Intrinsics.checkNotNullExpressionValue(bind, "bind(...)");
this.itemBinding = bind;
}
public static /* synthetic */ void a(StationViewHolder stationViewHolder, Station station, View view) {
bind$lambda$2(stationViewHolder, station, view);
}
public static final void bind$lambda$2(StationViewHolder this$0, Station item, View view) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
Intrinsics.checkNotNullParameter(item, "$item");
this$0.onTap.invoke(item);
}
private final String paintTypeTraffic(int typeTraffic, String commuterNetwork) {
boolean equals;
String string = this.itemView.getContext().getString(R.string.circulation_traintype_cercanias);
Intrinsics.checkNotNullExpressionValue(string, "getString(...)");
String string2 = this.itemView.getContext().getString(R.string.circulation_traintype_both);
Intrinsics.checkNotNullExpressionValue(string2, "getString(...)");
equals = StringsKt__StringsJVMKt.equals(commuterNetwork, "RODALIES_CATALUNYA", true);
if (equals) {
string = this.itemView.getContext().getString(R.string.circulation_traintype_rodalies);
Intrinsics.checkNotNullExpressionValue(string, "getString(...)");
string2 = this.itemView.getContext().getString(R.string.circulation_traintype_both_rodalies);
Intrinsics.checkNotNullExpressionValue(string2, "getString(...)");
}
StationViewEntity.TypeTraffic invoke = StationViewEntity.TypeTraffic.INSTANCE.invoke(typeTraffic);
int i = invoke == null ? -1 : WhenMappings.$EnumSwitchMapping$0[invoke.ordinal()];
if (i == 1) {
return string;
}
if (i != 2) {
return i != 3 ? "" : string2;
}
String string3 = this.itemView.getContext().getString(R.string.circulation_traintype_others);
Intrinsics.checkNotNullExpressionValue(string3, "getString(...)");
return string3;
}
public final void bind(Station item) {
Unit unit;
String distance;
Intrinsics.checkNotNullParameter(item, "item");
this.itemBinding.stationOptionTitle.setText(item.getShortName());
this.itemBinding.stationOptionTitle.setContentDescription(item.getLongName());
this.itemBinding.stationOptionSubtitle.setText(paintTypeTraffic(item.getTrafficType(), item.getCommuterNetwork()));
Float distance2 = item.getDistance();
if (distance2 == null || (distance = FloatExtensionsKt.toDistance(distance2.floatValue())) == null) {
unit = null;
} else {
this.itemBinding.stationOptionDistance.setVisibility(0);
this.itemBinding.stationOptionDistance.setText(distance);
unit = Unit.INSTANCE;
}
if (unit == null) {
this.itemBinding.stationOptionDistance.setVisibility(8);
}
this.itemBinding.getRoot().setOnClickListener(new G2.l(7, this, item));
}
}

View File

@@ -0,0 +1,16 @@
package com.adif.elcanomovil.uiSelectStation.main;
import android.widget.EditText;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.flow.Flow;
import kotlinx.coroutines.flow.FlowKt;
@Metadata(d1 = {"\u0000\u0010\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\r\n\u0002\u0018\u0002\n\u0000\u001a\u0014\u0010\u0000\u001a\n\u0012\u0006\u0012\u0004\u0018\u00010\u00020\u0001*\u00020\u0003H\u0007¨\u0006\u0004"}, d2 = {"textChanges", "Lkotlinx/coroutines/flow/Flow;", "", "Landroid/widget/EditText;", "ui-select-station_proNon_corporateRelease"}, k = 2, mv = {1, 9, 0}, xi = 48)
/* loaded from: classes2.dex */
public final class TextChangesKt {
public static final Flow<CharSequence> textChanges(EditText editText) {
Intrinsics.checkNotNullParameter(editText, "<this>");
return FlowKt.onStart(FlowKt.callbackFlow(new p(editText, null)), new q(editText, null));
}
}

View File

@@ -0,0 +1,16 @@
package com.adif.elcanomovil.uiSelectStation.main;
import android.widget.EditText;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.flow.Flow;
import kotlinx.coroutines.flow.FlowKt;
@Metadata(d1 = {"\u0000\u0012\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0002\u0018\u0002\n\u0002\b\u0003\"\u001b\u0010\u0000\u001a\b\u0012\u0004\u0012\u00020\u00020\u0001*\u00020\u00038F¢\u0006\u0006\u001a\u0004\b\u0004\u0010\u0005¨\u0006\u0006"}, d2 = {"textFlow", "Lkotlinx/coroutines/flow/Flow;", "", "Landroid/widget/EditText;", "getTextFlow", "(Landroid/widget/EditText;)Lkotlinx/coroutines/flow/Flow;", "ui-select-station_proNon_corporateRelease"}, k = 2, mv = {1, 9, 0}, xi = 48)
/* loaded from: classes2.dex */
public final class TextFlowKt {
public static final Flow<String> getTextFlow(EditText editText) {
Intrinsics.checkNotNullParameter(editText, "<this>");
return FlowKt.callbackFlow(new r(editText, null));
}
}

View File

@@ -0,0 +1,26 @@
package com.adif.elcanomovil.uiSelectStation.main;
import androidx.recyclerview.widget.AbstractC0211d;
import com.adif.elcanomovil.domain.entities.station.Station;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes2.dex */
public final class a extends AbstractC0211d {
@Override // androidx.recyclerview.widget.AbstractC0211d
public final boolean a(Object obj, Object obj2) {
Station oldItem = (Station) obj;
Station newItem = (Station) obj2;
Intrinsics.checkNotNullParameter(oldItem, "oldItem");
Intrinsics.checkNotNullParameter(newItem, "newItem");
return Intrinsics.areEqual(oldItem.getStationCode(), newItem.getStationCode());
}
@Override // androidx.recyclerview.widget.AbstractC0211d
public final boolean b(Object obj, Object obj2) {
Station oldItem = (Station) obj;
Station newItem = (Station) obj2;
Intrinsics.checkNotNullParameter(oldItem, "oldItem");
Intrinsics.checkNotNullParameter(newItem, "newItem");
return Intrinsics.areEqual(oldItem, newItem);
}
}

View File

@@ -0,0 +1,32 @@
package com.adif.elcanomovil.uiSelectStation.main;
import com.adif.elcanomovil.uiSelectStation.main.SelectStationViewState;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlinx.coroutines.flow.FlowCollector;
/* loaded from: classes2.dex */
public final class b implements FlowCollector {
/* renamed from: a, reason: collision with root package name */
public final /* synthetic */ SelectStationFragment f5180a;
public b(SelectStationFragment selectStationFragment) {
this.f5180a = selectStationFragment;
}
@Override // kotlinx.coroutines.flow.FlowCollector
public final Object emit(Object obj, Continuation continuation) {
SelectStationViewState selectStationViewState = (SelectStationViewState) obj;
boolean z3 = selectStationViewState instanceof SelectStationViewState.MainSearch;
SelectStationFragment selectStationFragment = this.f5180a;
if (z3) {
selectStationFragment.showMainSearch((SelectStationViewState.MainSearch) selectStationViewState);
} else if (selectStationViewState instanceof SelectStationViewState.ShowSearchResults) {
selectStationFragment.showSearchResults(((SelectStationViewState.ShowSearchResults) selectStationViewState).getStations());
} else if (selectStationViewState instanceof SelectStationViewState.NoResults) {
selectStationFragment.showNoResults();
}
return Unit.INSTANCE;
}
}

View File

@@ -0,0 +1,61 @@
package com.adif.elcanomovil.uiSelectStation.main;
import kotlin.KotlinNothingValueException;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.CoroutineScope;
import kotlinx.coroutines.flow.StateFlow;
/* loaded from: classes2.dex */
public final class c extends SuspendLambda implements Function2 {
/* renamed from: a, reason: collision with root package name */
public int f5181a;
/* renamed from: b, reason: collision with root package name */
public final /* synthetic */ SelectStationFragment f5182b;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public c(SelectStationFragment selectStationFragment, Continuation continuation) {
super(2, continuation);
this.f5182b = selectStationFragment;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
return new c(this.f5182b, continuation);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(Object obj, Object obj2) {
return ((c) create((CoroutineScope) obj, (Continuation) obj2)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
SelectStationViewModel viewModel;
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.f5181a;
if (i == 0) {
ResultKt.throwOnFailure(obj);
SelectStationFragment selectStationFragment = this.f5182b;
viewModel = selectStationFragment.getViewModel();
StateFlow<SelectStationViewState> viewState = viewModel.getViewState();
b bVar = new b(selectStationFragment);
this.f5181a = 1;
if (viewState.collect(bVar, this) == coroutine_suspended) {
return coroutine_suspended;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
throw new KotlinNothingValueException();
}
}

View File

@@ -0,0 +1,61 @@
package com.adif.elcanomovil.uiSelectStation.main;
import androidx.lifecycle.q0;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.CoroutineScope;
/* loaded from: classes2.dex */
public final class d extends SuspendLambda implements Function2 {
/* renamed from: a, reason: collision with root package name */
public int f5183a;
/* renamed from: b, reason: collision with root package name */
public final /* synthetic */ SelectStationFragment f5184b;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public d(SelectStationFragment selectStationFragment, Continuation continuation) {
super(2, continuation);
this.f5184b = selectStationFragment;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
return new d(this.f5184b, continuation);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(Object obj, Object obj2) {
return ((d) create((CoroutineScope) obj, (Continuation) obj2)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.f5183a;
if (i == 0) {
ResultKt.throwOnFailure(obj);
SelectStationFragment selectStationFragment = this.f5184b;
c cVar = new c(selectStationFragment, null);
this.f5183a = 1;
Object l4 = q0.l(selectStationFragment.getLifecycle(), cVar, this);
if (l4 != IntrinsicsKt.getCOROUTINE_SUSPENDED()) {
l4 = Unit.INSTANCE;
}
if (l4 == coroutine_suspended) {
return coroutine_suspended;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
return Unit.INSTANCE;
}
}

View File

@@ -0,0 +1,60 @@
package com.adif.elcanomovil.uiSelectStation.main;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.CoroutineScope;
import kotlinx.coroutines.flow.Flow;
/* loaded from: classes2.dex */
public final class e extends SuspendLambda implements Function2 {
/* renamed from: a, reason: collision with root package name */
public int f5185a;
/* renamed from: b, reason: collision with root package name */
public final /* synthetic */ Flow f5186b;
/* renamed from: c, reason: collision with root package name */
public final /* synthetic */ SelectStationFragment f5187c;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public e(Flow flow, SelectStationFragment selectStationFragment, Continuation continuation) {
super(2, continuation);
this.f5186b = flow;
this.f5187c = selectStationFragment;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
return new e(this.f5186b, this.f5187c, continuation);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(Object obj, Object obj2) {
return ((e) create((CoroutineScope) obj, (Continuation) obj2)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.f5185a;
if (i == 0) {
ResultKt.throwOnFailure(obj);
C1.b bVar = new C1.b(this.f5187c, 11);
this.f5185a = 1;
if (this.f5186b.collect(bVar, this) == coroutine_suspended) {
return coroutine_suspended;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
return Unit.INSTANCE;
}
}

View File

@@ -0,0 +1,44 @@
package com.adif.elcanomovil.uiSelectStation.main;
import com.adif.elcanomovil.commonViews.data.StationOptionViewEntity;
import com.adif.elcanomovil.domain.entities.station.Station;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Lambda;
/* loaded from: classes2.dex */
public final class f extends Lambda implements Function1 {
/* renamed from: a, reason: collision with root package name */
public final /* synthetic */ int f5188a;
/* renamed from: b, reason: collision with root package name */
public final /* synthetic */ SelectStationFragment f5189b;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public /* synthetic */ f(SelectStationFragment selectStationFragment, int i) {
super(1);
this.f5188a = i;
this.f5189b = selectStationFragment;
}
@Override // kotlin.jvm.functions.Function1
public final Object invoke(Object obj) {
switch (this.f5188a) {
case 0:
StationOptionViewEntity stationOptionViewEntity = (StationOptionViewEntity) obj;
this.f5189b.onTapStation(stationOptionViewEntity != null ? stationOptionViewEntity.getId() : null);
return Unit.INSTANCE;
case 1:
StationOptionViewEntity stationOptionViewEntity2 = (StationOptionViewEntity) obj;
this.f5189b.onTapStation(stationOptionViewEntity2 != null ? stationOptionViewEntity2.getId() : null);
return Unit.INSTANCE;
default:
Station it = (Station) obj;
Intrinsics.checkNotNullParameter(it, "it");
this.f5189b.onTapStation(it.getStationCode());
return Unit.INSTANCE;
}
}
}

View File

@@ -0,0 +1,113 @@
package com.adif.elcanomovil.uiSelectStation.main;
import android.icu.text.Collator;
import com.adif.elcanomovil.domain.entities.station.Station;
import com.adif.elcanomovil.domain.usecases.stations.GetStationByNameUseCase;
import com.adif.elcanomovil.repositories.utils.REGEX_UNACCENTKt;
import com.adif.elcanomovil.uiSelectStation.main.SelectStationViewState;
import java.util.Comparator;
import java.util.List;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.collections.CollectionsKt;
import kotlin.collections.CollectionsKt___CollectionsKt;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlin.text.StringsKt__StringsKt;
import kotlinx.coroutines.CoroutineScope;
import kotlinx.coroutines.flow.MutableStateFlow;
/* loaded from: classes2.dex */
public final class g extends SuspendLambda implements Function2 {
/* renamed from: a, reason: collision with root package name */
public SelectStationViewModel$fetchStationsBy$1$invokeSuspend$$inlined$thenBy$1 f5190a;
/* renamed from: b, reason: collision with root package name */
public int f5191b;
/* renamed from: c, reason: collision with root package name */
public final /* synthetic */ SelectStationViewModel f5192c;
/* renamed from: d, reason: collision with root package name */
public final /* synthetic */ List f5193d;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public g(SelectStationViewModel selectStationViewModel, List list, Continuation continuation) {
super(2, continuation);
this.f5192c = selectStationViewModel;
this.f5193d = list;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
return new g(this.f5192c, this.f5193d, continuation);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(Object obj, Object obj2) {
return ((g) create((CoroutineScope) obj, (Continuation) obj2)).invokeSuspend(Unit.INSTANCE);
}
/* JADX WARN: Type inference failed for: r5v0, types: [com.adif.elcanomovil.uiSelectStation.main.SelectStationViewModel$fetchStationsBy$1$invokeSuspend$$inlined$thenBy$1] */
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
final Collator collator;
final Collator collator2;
GetStationByNameUseCase getStationByNameUseCase;
String joinToString$default;
SelectStationViewModel$fetchStationsBy$1$invokeSuspend$$inlined$thenBy$1 selectStationViewModel$fetchStationsBy$1$invokeSuspend$$inlined$thenBy$1;
MutableStateFlow mutableStateFlow;
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.f5191b;
SelectStationViewModel selectStationViewModel = this.f5192c;
if (i == 0) {
ResultKt.throwOnFailure(obj);
collator = selectStationViewModel.collator;
final List list = this.f5193d;
final Comparator comparator = new Comparator() { // from class: com.adif.elcanomovil.uiSelectStation.main.SelectStationViewModel$fetchStationsBy$1$invokeSuspend$$inlined$compareBy$1
/* JADX WARN: Multi-variable type inference failed */
@Override // java.util.Comparator
public final int compare(T t2, T t4) {
boolean contains;
boolean contains2;
Comparator comparator2 = collator;
contains = StringsKt__StringsKt.contains((CharSequence) REGEX_UNACCENTKt.unaccent(((Station) t2).getShortName()), (CharSequence) CollectionsKt.first(list), true);
String str = contains ? "0" : "1";
contains2 = StringsKt__StringsKt.contains((CharSequence) REGEX_UNACCENTKt.unaccent(((Station) t4).getShortName()), (CharSequence) CollectionsKt.first(list), true);
return comparator2.compare(str, contains2 ? "0" : "1");
}
};
collator2 = selectStationViewModel.collator;
?? r5 = new Comparator() { // from class: com.adif.elcanomovil.uiSelectStation.main.SelectStationViewModel$fetchStationsBy$1$invokeSuspend$$inlined$thenBy$1
/* JADX WARN: Multi-variable type inference failed */
@Override // java.util.Comparator
public final int compare(T t2, T t4) {
int compare = comparator.compare(t2, t4);
return compare != 0 ? compare : collator2.compare(((Station) t2).getShortName(), ((Station) t4).getShortName());
}
};
getStationByNameUseCase = selectStationViewModel.getStationByNameUseCase;
joinToString$default = CollectionsKt___CollectionsKt.joinToString$default(list, " ", null, null, 0, null, null, 62, null);
this.f5190a = r5;
this.f5191b = 1;
obj = getStationByNameUseCase.invoke(joinToString$default, this);
if (obj == coroutine_suspended) {
return coroutine_suspended;
}
selectStationViewModel$fetchStationsBy$1$invokeSuspend$$inlined$thenBy$1 = r5;
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
selectStationViewModel$fetchStationsBy$1$invokeSuspend$$inlined$thenBy$1 = this.f5190a;
ResultKt.throwOnFailure(obj);
}
List sortedWith = CollectionsKt.sortedWith((Iterable) obj, selectStationViewModel$fetchStationsBy$1$invokeSuspend$$inlined$thenBy$1);
mutableStateFlow = selectStationViewModel._viewState;
mutableStateFlow.tryEmit(sortedWith.isEmpty() ? SelectStationViewState.NoResults.INSTANCE : new SelectStationViewState.ShowSearchResults(sortedWith));
return Unit.INSTANCE;
}
}

View File

@@ -0,0 +1,37 @@
package com.adif.elcanomovil.uiSelectStation.main;
import com.adif.elcanomovil.uiSelectStation.mappers.StationViewEntityMapper;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
import kotlin.jvm.internal.IntCompanionObject;
/* loaded from: classes2.dex */
public final class h extends ContinuationImpl {
/* renamed from: a, reason: collision with root package name */
public StationViewEntityMapper f5194a;
/* renamed from: b, reason: collision with root package name */
public /* synthetic */ Object f5195b;
/* renamed from: c, reason: collision with root package name */
public final /* synthetic */ SelectStationViewModel f5196c;
/* renamed from: d, reason: collision with root package name */
public int f5197d;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public h(SelectStationViewModel selectStationViewModel, Continuation continuation) {
super(continuation);
this.f5196c = selectStationViewModel;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object fetchUserHomeStation;
this.f5195b = obj;
this.f5197d |= IntCompanionObject.MIN_VALUE;
fetchUserHomeStation = this.f5196c.fetchUserHomeStation(this);
return fetchUserHomeStation;
}
}

View File

@@ -0,0 +1,37 @@
package com.adif.elcanomovil.uiSelectStation.main;
import com.adif.elcanomovil.uiSelectStation.mappers.StationViewEntityMapper;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
import kotlin.jvm.internal.IntCompanionObject;
/* loaded from: classes2.dex */
public final class i extends ContinuationImpl {
/* renamed from: a, reason: collision with root package name */
public StationViewEntityMapper f5198a;
/* renamed from: b, reason: collision with root package name */
public /* synthetic */ Object f5199b;
/* renamed from: c, reason: collision with root package name */
public final /* synthetic */ SelectStationViewModel f5200c;
/* renamed from: d, reason: collision with root package name */
public int f5201d;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public i(SelectStationViewModel selectStationViewModel, Continuation continuation) {
super(continuation);
this.f5200c = selectStationViewModel;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object fetchUserWorkStation;
this.f5199b = obj;
this.f5201d |= IntCompanionObject.MIN_VALUE;
fetchUserWorkStation = this.f5200c.fetchUserWorkStation(this);
return fetchUserWorkStation;
}
}

View File

@@ -0,0 +1,39 @@
package com.adif.elcanomovil.uiSelectStation.main;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
import kotlin.jvm.internal.IntCompanionObject;
/* loaded from: classes2.dex */
public final class j extends ContinuationImpl {
/* renamed from: a, reason: collision with root package name */
public SelectStationViewModel f5202a;
/* renamed from: b, reason: collision with root package name */
public SelectStationViewModel f5203b;
/* renamed from: c, reason: collision with root package name */
public /* synthetic */ Object f5204c;
/* renamed from: d, reason: collision with root package name */
public final /* synthetic */ SelectStationViewModel f5205d;
/* renamed from: e, reason: collision with root package name */
public int f5206e;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public j(SelectStationViewModel selectStationViewModel, Continuation continuation) {
super(continuation);
this.f5205d = selectStationViewModel;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object loadUserStations;
this.f5204c = obj;
this.f5206e |= IntCompanionObject.MIN_VALUE;
loadUserStations = this.f5205d.loadUserStations(null, this);
return loadUserStations;
}
}

View File

@@ -0,0 +1,108 @@
package com.adif.elcanomovil.uiSelectStation.main;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.CoroutineScope;
/* loaded from: classes2.dex */
public final class k extends SuspendLambda implements Function2 {
/* renamed from: a, reason: collision with root package name */
public int f5207a;
/* renamed from: b, reason: collision with root package name */
public final /* synthetic */ SelectStationViewModel f5208b;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public k(SelectStationViewModel selectStationViewModel, Continuation continuation) {
super(2, continuation);
this.f5208b = selectStationViewModel;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
return new k(this.f5208b, continuation);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(Object obj, Object obj2) {
return ((k) create((CoroutineScope) obj, (Continuation) obj2)).invokeSuspend(Unit.INSTANCE);
}
/* JADX WARN: Code restructure failed: missing block: B:18:0x0048, code lost:
if (r8 == r0) goto L15;
*/
/* JADX WARN: Code restructure failed: missing block: B:19:0x004a, code lost:
return r0;
*/
/* JADX WARN: Code restructure failed: missing block: B:21:0x002d, code lost:
if (r8 == r0) goto L15;
*/
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final java.lang.Object invokeSuspend(java.lang.Object r8) {
/*
r7 = this;
java.lang.Object r0 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
int r1 = r7.f5207a
com.adif.elcanomovil.uiSelectStation.main.SelectStationViewModel r2 = r7.f5208b
r3 = 2
r4 = 1
if (r1 == 0) goto L20
if (r1 == r4) goto L1c
if (r1 != r3) goto L14
kotlin.ResultKt.throwOnFailure(r8)
goto L4b
L14:
java.lang.IllegalStateException r7 = new java.lang.IllegalStateException
java.lang.String r8 = "call to 'resume' before 'invoke' with coroutine"
r7.<init>(r8)
throw r7
L1c:
kotlin.ResultKt.throwOnFailure(r8)
goto L30
L20:
kotlin.ResultKt.throwOnFailure(r8)
com.adif.elcanomovil.domain.usecases.stations.GetClosestStationUseCase r8 = com.adif.elcanomovil.uiSelectStation.main.SelectStationViewModel.access$getGetClosestStationUseCase$p(r2)
r7.f5207a = r4
java.lang.Object r8 = r8.invoke(r7)
if (r8 != r0) goto L30
goto L4a
L30:
kotlinx.coroutines.flow.Flow r8 = (kotlinx.coroutines.flow.Flow) r8
kotlinx.coroutines.flow.Flow r8 = kotlinx.coroutines.flow.FlowKt.filterNotNull(r8)
com.adif.elcanomovil.uiHome.u r1 = new com.adif.elcanomovil.uiHome.u
r4 = 3
r5 = 0
r6 = 4
r1.<init>(r4, r5, r6)
kotlinx.coroutines.flow.Flow r8 = kotlinx.coroutines.flow.FlowKt.m1659catch(r8, r1)
r7.f5207a = r3
java.lang.Object r8 = kotlinx.coroutines.flow.FlowKt.firstOrNull(r8, r7)
if (r8 != r0) goto L4b
L4a:
return r0
L4b:
com.adif.elcanomovil.domain.entities.station.Station r8 = (com.adif.elcanomovil.domain.entities.station.Station) r8
if (r8 == 0) goto L61
com.adif.elcanomovil.uiSelectStation.main.SelectStationViewModel.access$setUserNearStation$p(r2, r8)
kotlinx.coroutines.flow.MutableStateFlow r7 = com.adif.elcanomovil.uiSelectStation.main.SelectStationViewModel.access$get_viewState$p(r2)
java.lang.Object r7 = r7.getValue()
boolean r7 = r7 instanceof com.adif.elcanomovil.uiSelectStation.main.SelectStationViewState.MainSearch
if (r7 == 0) goto L61
com.adif.elcanomovil.uiSelectStation.main.SelectStationViewModel.access$showUpdateMainSearch(r2)
L61:
kotlin.Unit r7 = kotlin.Unit.INSTANCE
return r7
*/
throw new UnsupportedOperationException("Method not decompiled: com.adif.elcanomovil.uiSelectStation.main.k.invokeSuspend(java.lang.Object):java.lang.Object");
}
}

View File

@@ -0,0 +1,95 @@
package com.adif.elcanomovil.uiSelectStation.main;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.CoroutineScope;
/* loaded from: classes2.dex */
public final class l extends SuspendLambda implements Function2 {
/* renamed from: a, reason: collision with root package name */
public int f5209a;
/* renamed from: b, reason: collision with root package name */
public final /* synthetic */ SelectStationViewModel f5210b;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public l(SelectStationViewModel selectStationViewModel, Continuation continuation) {
super(2, continuation);
this.f5210b = selectStationViewModel;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
return new l(this.f5210b, continuation);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(Object obj, Object obj2) {
return ((l) create((CoroutineScope) obj, (Continuation) obj2)).invokeSuspend(Unit.INSTANCE);
}
/* JADX WARN: Code restructure failed: missing block: B:13:0x003f, code lost:
if (((kotlinx.coroutines.flow.Flow) r6).collect(r1, r5) == r0) goto L15;
*/
/* JADX WARN: Code restructure failed: missing block: B:14:0x0041, code lost:
return r0;
*/
/* JADX WARN: Code restructure failed: missing block: B:16:0x002d, code lost:
if (r6 == r0) goto L15;
*/
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final java.lang.Object invokeSuspend(java.lang.Object r6) {
/*
r5 = this;
java.lang.Object r0 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
int r1 = r5.f5209a
com.adif.elcanomovil.uiSelectStation.main.SelectStationViewModel r2 = r5.f5210b
r3 = 2
r4 = 1
if (r1 == 0) goto L20
if (r1 == r4) goto L1c
if (r1 != r3) goto L14
kotlin.ResultKt.throwOnFailure(r6)
goto L42
L14:
java.lang.IllegalStateException r5 = new java.lang.IllegalStateException
java.lang.String r6 = "call to 'resume' before 'invoke' with coroutine"
r5.<init>(r6)
throw r5
L1c:
kotlin.ResultKt.throwOnFailure(r6)
goto L30
L20:
kotlin.ResultKt.throwOnFailure(r6)
com.adif.elcanomovil.domain.usecases.stations.ObserveRecentlySearchedStationsWithDistanceUseCase r6 = com.adif.elcanomovil.uiSelectStation.main.SelectStationViewModel.access$getObserveRecentlySearchedStationsWithDistance$p(r2)
r5.f5209a = r4
java.lang.Object r6 = r6.invoke(r5)
if (r6 != r0) goto L30
goto L41
L30:
kotlinx.coroutines.flow.Flow r6 = (kotlinx.coroutines.flow.Flow) r6
C1.b r1 = new C1.b
r4 = 12
r1.<init>(r2, r4)
r5.f5209a = r3
java.lang.Object r5 = r6.collect(r1, r5)
if (r5 != r0) goto L42
L41:
return r0
L42:
kotlin.Unit r5 = kotlin.Unit.INSTANCE
return r5
*/
throw new UnsupportedOperationException("Method not decompiled: com.adif.elcanomovil.uiSelectStation.main.l.invokeSuspend(java.lang.Object):java.lang.Object");
}
}

View File

@@ -0,0 +1,65 @@
package com.adif.elcanomovil.uiSelectStation.main;
import com.adif.elcanomovil.commonNavGraph.arguments.NavArguments;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.CoroutineScope;
/* loaded from: classes2.dex */
public final class m extends SuspendLambda implements Function2 {
/* renamed from: a, reason: collision with root package name */
public int f5211a;
/* renamed from: b, reason: collision with root package name */
public final /* synthetic */ SelectStationViewModel f5212b;
/* renamed from: c, reason: collision with root package name */
public final /* synthetic */ NavArguments.StationSelectionType f5213c;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public m(SelectStationViewModel selectStationViewModel, NavArguments.StationSelectionType stationSelectionType, Continuation continuation) {
super(2, continuation);
this.f5212b = selectStationViewModel;
this.f5213c = stationSelectionType;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
return new m(this.f5212b, this.f5213c, continuation);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(Object obj, Object obj2) {
return ((m) create((CoroutineScope) obj, (Continuation) obj2)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object loadUserStations;
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.f5211a;
SelectStationViewModel selectStationViewModel = this.f5212b;
if (i == 0) {
ResultKt.throwOnFailure(obj);
this.f5211a = 1;
loadUserStations = selectStationViewModel.loadUserStations(this.f5213c, this);
if (loadUserStations == coroutine_suspended) {
return coroutine_suspended;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
selectStationViewModel.observeClosestStation();
selectStationViewModel.observeRecentSearches();
selectStationViewModel.showUpdateMainSearch();
return Unit.INSTANCE;
}
}

View File

@@ -0,0 +1,64 @@
package com.adif.elcanomovil.uiSelectStation.main;
import com.adif.elcanomovil.domain.usecases.recentSearch.SaveRecentSearchUseCase;
import java.util.ArrayList;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.CoroutineScope;
/* loaded from: classes2.dex */
public final class n extends SuspendLambda implements Function2 {
/* renamed from: a, reason: collision with root package name */
public int f5214a;
/* renamed from: b, reason: collision with root package name */
public final /* synthetic */ String f5215b;
/* renamed from: c, reason: collision with root package name */
public final /* synthetic */ SelectStationViewModel f5216c;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public n(String str, SelectStationViewModel selectStationViewModel, Continuation continuation) {
super(2, continuation);
this.f5215b = str;
this.f5216c = selectStationViewModel;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
return new n(this.f5215b, this.f5216c, continuation);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(Object obj, Object obj2) {
return ((n) create((CoroutineScope) obj, (Continuation) obj2)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
SaveRecentSearchUseCase saveRecentSearchUseCase;
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.f5214a;
if (i == 0) {
ResultKt.throwOnFailure(obj);
ArrayList arrayList = new ArrayList();
arrayList.add(this.f5215b);
saveRecentSearchUseCase = this.f5216c.saveRecentSearchUseCase;
this.f5214a = 1;
if (saveRecentSearchUseCase.invoke(arrayList, this) == coroutine_suspended) {
return coroutine_suspended;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
return Unit.INSTANCE;
}
}

View File

@@ -0,0 +1,8 @@
package com.adif.elcanomovil.uiSelectStation.main;
/* loaded from: classes2.dex */
public abstract class o {
/* renamed from: a, reason: collision with root package name */
public static final SelectStationViewModel_HiltModules_KeyModule_ProvideFactory f5217a = new SelectStationViewModel_HiltModules_KeyModule_ProvideFactory();
}

View File

@@ -0,0 +1,81 @@
package com.adif.elcanomovil.uiSelectStation.main;
import android.text.Editable;
import android.text.TextWatcher;
import android.widget.EditText;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.channels.ProduceKt;
import kotlinx.coroutines.channels.ProducerScope;
/* loaded from: classes2.dex */
public final class p extends SuspendLambda implements Function2 {
/* renamed from: a, reason: collision with root package name */
public int f5218a;
/* renamed from: b, reason: collision with root package name */
public /* synthetic */ Object f5219b;
/* renamed from: c, reason: collision with root package name */
public final /* synthetic */ EditText f5220c;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public p(EditText editText, Continuation continuation) {
super(2, continuation);
this.f5220c = editText;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
p pVar = new p(this.f5220c, continuation);
pVar.f5219b = obj;
return pVar;
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(Object obj, Object obj2) {
return ((p) create((ProducerScope) obj, (Continuation) obj2)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.f5218a;
if (i == 0) {
ResultKt.throwOnFailure(obj);
final ProducerScope producerScope = (ProducerScope) this.f5219b;
TextWatcher textWatcher = new TextWatcher() { // from class: com.adif.elcanomovil.uiSelectStation.main.TextChangesKt$textChanges$1$listener$1
@Override // android.text.TextWatcher
public void afterTextChanged(Editable s4) {
}
@Override // android.text.TextWatcher
public void beforeTextChanged(CharSequence s4, int start, int count, int after) {
}
@Override // android.text.TextWatcher
public void onTextChanged(CharSequence s4, int start, int before, int count) {
producerScope.mo1630trySendJP2dKIU(String.valueOf(s4));
}
};
EditText editText = this.f5220c;
editText.addTextChangedListener(textWatcher);
a0.b bVar = new a0.b(2, editText, textWatcher);
this.f5218a = 1;
if (ProduceKt.awaitClose(producerScope, bVar, this) == coroutine_suspended) {
return coroutine_suspended;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
return Unit.INSTANCE;
}
}

View File

@@ -0,0 +1,63 @@
package com.adif.elcanomovil.uiSelectStation.main;
import android.text.Editable;
import android.widget.EditText;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.flow.FlowCollector;
/* loaded from: classes2.dex */
public final class q extends SuspendLambda implements Function2 {
/* renamed from: a, reason: collision with root package name */
public int f5221a;
/* renamed from: b, reason: collision with root package name */
public /* synthetic */ Object f5222b;
/* renamed from: c, reason: collision with root package name */
public final /* synthetic */ EditText f5223c;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public q(EditText editText, Continuation continuation) {
super(2, continuation);
this.f5223c = editText;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
q qVar = new q(this.f5223c, continuation);
qVar.f5222b = obj;
return qVar;
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(Object obj, Object obj2) {
return ((q) create((FlowCollector) obj, (Continuation) obj2)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.f5221a;
if (i == 0) {
ResultKt.throwOnFailure(obj);
FlowCollector flowCollector = (FlowCollector) this.f5222b;
Editable text = this.f5223c.getText();
this.f5221a = 1;
if (flowCollector.emit(text, this) == coroutine_suspended) {
return coroutine_suspended;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
return Unit.INSTANCE;
}
}

View File

@@ -0,0 +1,81 @@
package com.adif.elcanomovil.uiSelectStation.main;
import android.text.Editable;
import android.text.TextWatcher;
import android.widget.EditText;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.channels.ProduceKt;
import kotlinx.coroutines.channels.ProducerScope;
/* loaded from: classes2.dex */
public final class r extends SuspendLambda implements Function2 {
/* renamed from: a, reason: collision with root package name */
public int f5224a;
/* renamed from: b, reason: collision with root package name */
public /* synthetic */ Object f5225b;
/* renamed from: c, reason: collision with root package name */
public final /* synthetic */ EditText f5226c;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public r(EditText editText, Continuation continuation) {
super(2, continuation);
this.f5226c = editText;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
r rVar = new r(this.f5226c, continuation);
rVar.f5225b = obj;
return rVar;
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(Object obj, Object obj2) {
return ((r) create((ProducerScope) obj, (Continuation) obj2)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.f5224a;
if (i == 0) {
ResultKt.throwOnFailure(obj);
final ProducerScope producerScope = (ProducerScope) this.f5225b;
TextWatcher textWatcher = new TextWatcher() { // from class: com.adif.elcanomovil.uiSelectStation.main.TextFlowKt$textFlow$1$invokeSuspend$$inlined$doAfterTextChanged$1
@Override // android.text.TextWatcher
public void afterTextChanged(Editable s4) {
ProducerScope.this.mo1630trySendJP2dKIU(String.valueOf(s4));
}
@Override // android.text.TextWatcher
public void beforeTextChanged(CharSequence text, int start, int count, int after) {
}
@Override // android.text.TextWatcher
public void onTextChanged(CharSequence text, int start, int before, int count) {
}
};
EditText editText = this.f5226c;
editText.addTextChangedListener(textWatcher);
a0.b bVar = new a0.b(3, editText, textWatcher);
this.f5224a = 1;
if (ProduceKt.awaitClose(producerScope, bVar, this) == coroutine_suspended) {
return coroutine_suspended;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
return Unit.INSTANCE;
}
}