导航菜单

页面标题

页面副标题

Akıllı Bilet v4.0.39.217 - TripPlannerActivity.java 源代码

正在查看: Akıllı Bilet v4.0.39.217 应用的 TripPlannerActivity.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.asis.baseapp.ui.common.planner;

import android.animation.ObjectAnimator;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.os.Parcel;
import android.os.RemoteException;
import android.view.View;
import android.widget.EditText;
import androidx.activity.b;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.a;
import androidx.fragment.app.p;
import androidx.viewpager2.widget.ViewPager2;
import com.asis.baseapp.ui.common.planner.TripPlannerActivity;
import com.asis.baseapp.ui.common.planner.TripPlannerViewModel;
import com.asis.baseapp.utils.report.ScreenCode;
import com.asis.coreapp.R$color;
import com.asis.coreapp.R$drawable;
import com.asis.coreapp.R$raw;
import com.asis.coreapp.R$string;
import com.google.android.gms.internal.maps.zzc;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.MapStyleOptions;
import com.google.android.gms.maps.model.MarkerOptions;
import com.google.android.gms.maps.model.RuntimeRemoteException;
import com.google.android.material.bottomsheet.BottomSheetBehavior;
import com.google.android.material.button.MaterialButton;
import com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton;
import com.google.android.material.textfield.TextInputLayout;
import com.google.firebase.analytics.FirebaseAnalytics;
import com.google.firebase.analytics.ParametersBuilder;
import com.google.firebase.analytics.ktx.AnalyticsKt;
import com.google.firebase.ktx.Firebase;
import defpackage.a45;
import defpackage.aa4;
import defpackage.ac4;
import defpackage.ak;
import defpackage.b45;
import defpackage.d45;
import defpackage.dg5;
import defpackage.do3;
import defpackage.f86;
import defpackage.fn2;
import defpackage.fx5;
import defpackage.g45;
import defpackage.h03;
import defpackage.h73;
import defpackage.i45;
import defpackage.j73;
import defpackage.jk0;
import defpackage.js;
import defpackage.k45;
import defpackage.kw4;
import defpackage.m45;
import defpackage.mf;
import defpackage.n3;
import defpackage.n36;
import defpackage.n45;
import defpackage.n6;
import defpackage.na4;
import defpackage.nm4;
import defpackage.ns;
import defpackage.o45;
import defpackage.ox;
import defpackage.p13;
import defpackage.ps1;
import defpackage.qm2;
import defpackage.rd3;
import defpackage.sm2;
import defpackage.t22;
import defpackage.um1;
import defpackage.um2;
import defpackage.vr;
import defpackage.w35;
import defpackage.wa3;
import defpackage.x35;
import defpackage.xq2;
import defpackage.y35;
import defpackage.zd3;
import defpackage.zh3;
import java.util.Iterator;
import kotlin.Metadata;

@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\u0018\u00002\u00020\u0001:\u0001\u0004B\u0007¢\u0006\u0004\b\u0002\u0010\u0003¨\u0006\u0005"}, d2 = {"Lcom/asis/baseapp/ui/common/planner/TripPlannerActivity;", "Lns;", "<init>", "()V", "p04", "coreapp_release"}, k = 1, mv = {1, 9, 0})
public final class TripPlannerActivity extends ns {
    public static final int N = 0;
    public rd3 F = rd3.g;
    public final kw4 G;
    public final dg5 H;
    public qm2 I;
    public qm2 J;
    public BottomSheetBehavior K;
    public BottomSheetBehavior L;
    public final kw4 M;

    public TripPlannerActivity() {
        int i = 0;
        this.G = fn2.b0(new y35(this, i));
        int i2 = 1;
        this.H = new dg5(do3.a(TripPlannerViewModel.class), new n45(this, i2), new n45(this, i), new o45(this, i));
        this.M = fn2.b0(new y35(this, i2));
    }

    public final void A0() {
        ExtendedFloatingActionButton extendedFloatingActionButton = y0().j;
        if (extendedFloatingActionButton.getTranslationX() == 0.0f) {
            return;
        }
        ObjectAnimator.ofFloat(extendedFloatingActionButton, "translationX", 0.0f).start();
    }

    public final void B0(ac4 ac4Var) {
        z0().h(ac4Var);
        BottomSheetBehavior bottomSheetBehavior = this.K;
        fn2.s(bottomSheetBehavior);
        bottomSheetBehavior.K(3);
        BottomSheetBehavior bottomSheetBehavior2 = this.K;
        fn2.s(bottomSheetBehavior2);
        bottomSheetBehavior2.w(new b45(this, 0));
    }

    public final void C0(LatLng latLng, boolean z) {
        String v0;
        if (z) {
            z0().h(ac4.f);
            v0 = v0(latLng, true);
        } else {
            z0().h(ac4.g);
            v0 = v0(latLng, false);
        }
        z0().g(new ps1(0, v0, String.valueOf(latLng.f), String.valueOf(latLng.g)));
    }

    @Override
    public final void n0(LatLng latLng) {
        if (this.F != rd3.g) {
            return;
        }
        p13 p13Var = new p13();
        p13Var.k = new a45(this, latLng);
        p supportFragmentManager = getSupportFragmentManager();
        fn2.u(supportFragmentManager, "getSupportFragmentManager(...)");
        String string = getString(R$string.please_select);
        fn2.u(string, "getString(...)");
        String string2 = getString(R$string.start_point);
        fn2.u(string2, "getString(...)");
        String string3 = getString(R$string.end_point);
        fn2.u(string3, "getString(...)");
        p13Var.p(supportFragmentManager, string, fn2.h(string2, string3), fn2.h(Integer.valueOf(R$color.green_blue), Integer.valueOf(R$color.little_orange)), null);
    }

    @Override
    public final void o0() {
        if (fn2.W(this)) {
            ox oxVar = this.D;
            fn2.s(oxVar);
            oxVar.t(MapStyleOptions.Z(this, R$raw.map_style_dark));
        }
        q0();
        sm2 sm2Var = new sm2(this);
        ox oxVar2 = this.D;
        fn2.s(oxVar2);
        oxVar2.s(sm2Var);
        int i = 1;
        if (r()) {
            ox oxVar3 = this.D;
            fn2.s(oxVar3);
            oxVar3.v(true);
        }
        ox oxVar4 = this.D;
        fn2.s(oxVar4);
        oxVar4.z(new n3(this, i));
        ox oxVar5 = this.D;
        fn2.s(oxVar5);
        oxVar5.x(new x35(this));
        ox oxVar6 = this.D;
        fn2.s(oxVar6);
        x35 x35Var = new x35(this);
        try {
            n36 n36Var = (n36) oxVar6.b;
            f86 f86Var = new f86(x35Var);
            Parcel zza = n36Var.zza();
            zzc.zzg(zza, f86Var);
            n36Var.zzc(87, zza);
            Bundle extras = getIntent().getExtras();
            String string = extras != null ? extras.getString("intent_selected_station_lat", "") : null;
            Bundle extras2 = getIntent().getExtras();
            String string2 = extras2 != null ? extras2.getString("intent_selected_station_lng", "") : null;
            if (string == null || string.length() == 0) {
                return;
            }
            if (string2 != null && string2.length() != 0) {
                i = 0;
            }
            if (i == 0) {
                C0(new LatLng(Double.parseDouble(string), Double.parseDouble(string2)), false);
                z0().h(ac4.f);
                if (vr.s(this)) {
                    ox oxVar7 = new ox(11);
                    h73 h73Var = h73.g;
                    oxVar7.b();
                    oxVar7.c = new x35(this);
                    j73 i2 = oxVar7.i();
                    p supportFragmentManager = getSupportFragmentManager();
                    fn2.u(supportFragmentManager, "getSupportFragmentManager(...)");
                    i2.r(this, supportFragmentManager);
                }
            }
        } catch (RemoteException e) {
            throw new RuntimeRemoteException(e);
        }
    }

    @Override
    public final void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(y0().a);
        Fragment B = getSupportFragmentManager().B(y0().i.getId());
        fn2.t(B, "null cannot be cast to non-null type com.google.android.gms.maps.SupportMapFragment");
        final int i = 0;
        ((SupportMapFragment) B).o(new js(this, i));
        TripPlannerViewModel z0 = z0();
        String packageName = getPackageName();
        fn2.u(packageName, "getPackageName(...)");
        z0.s = packageName;
        z0.e();
        n6 y0 = y0();
        n6 y02 = y0();
        p supportFragmentManager = getSupportFragmentManager();
        supportFragmentManager.getClass();
        a aVar = new a(supportFragmentManager);
        final int i2 = 1;
        aVar.e(y02.k.getId(), new wa3(), null, 1);
        aVar.h();
        ViewPager2 viewPager2 = y02.b;
        this.K = BottomSheetBehavior.C(viewPager2);
        this.L = BottomSheetBehavior.C(y02.k);
        final int i3 = 2;
        viewPager2.setAdapter(new um1(this, fn2.h(new na4(), new aa4()), 1));
        viewPager2.setCurrentItem(0);
        viewPager2.setUserInputEnabled(false);
        BottomSheetBehavior bottomSheetBehavior = this.K;
        fn2.s(bottomSheetBehavior);
        bottomSheetBehavior.w(new b45(this, i2));
        y0.j.setTranslationX(z() + 10);
        TextInputLayout textInputLayout = y0.g;
        EditText editText = textInputLayout.getEditText();
        if (editText != null) {
            editText.setOnFocusChangeListener(new w35(y0, this, i));
        }
        TextInputLayout textInputLayout2 = y0.h;
        EditText editText2 = textInputLayout2.getEditText();
        if (editText2 != null) {
            editText2.setOnFocusChangeListener(new w35(y0, this, i2));
        }
        y0.c.setOnClickListener(new View.OnClickListener(this) {
            public final TripPlannerActivity g;

            {
                this.g = this;
            }

            @Override
            public final void onClick(View view) {
                ps1 ps1Var;
                int i4 = i;
                ps1 ps1Var2 = null;
                TripPlannerActivity tripPlannerActivity = this.g;
                switch (i4) {
                    case 0:
                        int i5 = TripPlannerActivity.N;
                        fn2.v(tripPlannerActivity, "this$0");
                        tripPlannerActivity.w0();
                        break;
                    case 1:
                        int i6 = TripPlannerActivity.N;
                        fn2.v(tripPlannerActivity, "this$0");
                        TripPlannerViewModel z02 = tripPlannerActivity.z0();
                        ep4 ep4Var = z02.n;
                        Object value = ep4Var.getValue();
                        ep4 ep4Var2 = z02.o;
                        if (value != null || ep4Var2.getValue() != null) {
                            if (ep4Var2.getValue() != null) {
                                Object value2 = ep4Var2.getValue();
                                fn2.s(value2);
                                Integer id = ((ps1) value2).getId();
                                Object value3 = ep4Var2.getValue();
                                fn2.s(value3);
                                Integer type = ((ps1) value3).getType();
                                Object value4 = ep4Var2.getValue();
                                fn2.s(value4);
                                Integer stationOrPoiId = ((ps1) value4).getStationOrPoiId();
                                Object value5 = ep4Var2.getValue();
                                fn2.s(value5);
                                Integer zoneTypeId = ((ps1) value5).getZoneTypeId();
                                Object value6 = ep4Var2.getValue();
                                fn2.s(value6);
                                String stationOrPoiName = ((ps1) value6).getStationOrPoiName();
                                Object value7 = ep4Var2.getValue();
                                fn2.s(value7);
                                String latitude = ((ps1) value7).getLatitude();
                                Object value8 = ep4Var2.getValue();
                                fn2.s(value8);
                                String longitude = ((ps1) value8).getLongitude();
                                Object value9 = ep4Var2.getValue();
                                fn2.s(value9);
                                Boolean isActive = ((ps1) value9).getIsActive();
                                Object value10 = ep4Var2.getValue();
                                fn2.s(value10);
                                Float f = ((ps1) value10).j;
                                Object value11 = ep4Var2.getValue();
                                fn2.s(value11);
                                ps1Var = new ps1(id, type, stationOrPoiId, zoneTypeId, stationOrPoiName, latitude, longitude, isActive, ((ps1) value11).i, f);
                            } else {
                                ps1Var = null;
                            }
                            if (ep4Var.getValue() != null) {
                                Object value12 = ep4Var.getValue();
                                fn2.s(value12);
                                Integer id2 = ((ps1) value12).getId();
                                Object value13 = ep4Var.getValue();
                                fn2.s(value13);
                                Integer type2 = ((ps1) value13).getType();
                                Object value14 = ep4Var.getValue();
                                fn2.s(value14);
                                Integer stationOrPoiId2 = ((ps1) value14).getStationOrPoiId();
                                Object value15 = ep4Var.getValue();
                                fn2.s(value15);
                                Integer zoneTypeId2 = ((ps1) value15).getZoneTypeId();
                                Object value16 = ep4Var.getValue();
                                fn2.s(value16);
                                String stationOrPoiName2 = ((ps1) value16).getStationOrPoiName();
                                Object value17 = ep4Var.getValue();
                                fn2.s(value17);
                                String latitude2 = ((ps1) value17).getLatitude();
                                Object value18 = ep4Var.getValue();
                                fn2.s(value18);
                                String longitude2 = ((ps1) value18).getLongitude();
                                Object value19 = ep4Var.getValue();
                                fn2.s(value19);
                                Boolean isActive2 = ((ps1) value19).getIsActive();
                                Object value20 = ep4Var.getValue();
                                fn2.s(value20);
                                Float f2 = ((ps1) value20).j;
                                Object value21 = ep4Var.getValue();
                                fn2.s(value21);
                                ps1Var2 = new ps1(id2, type2, stationOrPoiId2, zoneTypeId2, stationOrPoiName2, latitude2, longitude2, isActive2, ((ps1) value21).i, f2);
                            }
                            ep4Var.f(ps1Var);
                            ep4Var2.f(ps1Var2);
                            break;
                        }
                        break;
                    case 2:
                        int i7 = TripPlannerActivity.N;
                        fn2.v(tripPlannerActivity, "this$0");
                        if (tripPlannerActivity.I != null && tripPlannerActivity.J != null) {
                            TripPlannerViewModel z03 = tripPlannerActivity.z0();
                            qm2 qm2Var = tripPlannerActivity.I;
                            fn2.s(qm2Var);
                            LatLng a = qm2Var.a();
                            fn2.u(a, "getPosition(...)");
                            qm2 qm2Var2 = tripPlannerActivity.J;
                            fn2.s(qm2Var2);
                            LatLng a2 = qm2Var2.a();
                            fn2.u(a2, "getPosition(...)");
                            xq2.E(mt1.C(z03), z03.h.a(), 0, new o55(z03, a, a2, null), 2);
                            break;
                        }
                        break;
                    case 3:
                        int i8 = TripPlannerActivity.N;
                        fn2.v(tripPlannerActivity, "this$0");
                        new s35().show(tripPlannerActivity.getSupportFragmentManager(), "DialogTripOptions");
                        break;
                    default:
                        int i9 = TripPlannerActivity.N;
                        fn2.v(tripPlannerActivity, "this$0");
                        if (!(((dd5) tripPlannerActivity.z0().e).h() == null)) {
                            uq3 uq3Var = new uq3();
                            ScreenCode screenCode = ScreenCode.TRIP_PLANNER;
                            p supportFragmentManager2 = tripPlannerActivity.getSupportFragmentManager();
                            fn2.u(supportFragmentManager2, "getSupportFragmentManager(...)");
                            uq3Var.u(supportFragmentManager2, screenCode);
                            break;
                        } else {
                            tripPlannerActivity.a0();
                            break;
                        }
                }
            }
        });
        y0.l.setOnClickListener(new View.OnClickListener(this) {
            public final TripPlannerActivity g;

            {
                this.g = this;
            }

            @Override
            public final void onClick(View view) {
                ps1 ps1Var;
                int i4 = i2;
                ps1 ps1Var2 = null;
                TripPlannerActivity tripPlannerActivity = this.g;
                switch (i4) {
                    case 0:
                        int i5 = TripPlannerActivity.N;
                        fn2.v(tripPlannerActivity, "this$0");
                        tripPlannerActivity.w0();
                        break;
                    case 1:
                        int i6 = TripPlannerActivity.N;
                        fn2.v(tripPlannerActivity, "this$0");
                        TripPlannerViewModel z02 = tripPlannerActivity.z0();
                        ep4 ep4Var = z02.n;
                        Object value = ep4Var.getValue();
                        ep4 ep4Var2 = z02.o;
                        if (value != null || ep4Var2.getValue() != null) {
                            if (ep4Var2.getValue() != null) {
                                Object value2 = ep4Var2.getValue();
                                fn2.s(value2);
                                Integer id = ((ps1) value2).getId();
                                Object value3 = ep4Var2.getValue();
                                fn2.s(value3);
                                Integer type = ((ps1) value3).getType();
                                Object value4 = ep4Var2.getValue();
                                fn2.s(value4);
                                Integer stationOrPoiId = ((ps1) value4).getStationOrPoiId();
                                Object value5 = ep4Var2.getValue();
                                fn2.s(value5);
                                Integer zoneTypeId = ((ps1) value5).getZoneTypeId();
                                Object value6 = ep4Var2.getValue();
                                fn2.s(value6);
                                String stationOrPoiName = ((ps1) value6).getStationOrPoiName();
                                Object value7 = ep4Var2.getValue();
                                fn2.s(value7);
                                String latitude = ((ps1) value7).getLatitude();
                                Object value8 = ep4Var2.getValue();
                                fn2.s(value8);
                                String longitude = ((ps1) value8).getLongitude();
                                Object value9 = ep4Var2.getValue();
                                fn2.s(value9);
                                Boolean isActive = ((ps1) value9).getIsActive();
                                Object value10 = ep4Var2.getValue();
                                fn2.s(value10);
                                Float f = ((ps1) value10).j;
                                Object value11 = ep4Var2.getValue();
                                fn2.s(value11);
                                ps1Var = new ps1(id, type, stationOrPoiId, zoneTypeId, stationOrPoiName, latitude, longitude, isActive, ((ps1) value11).i, f);
                            } else {
                                ps1Var = null;
                            }
                            if (ep4Var.getValue() != null) {
                                Object value12 = ep4Var.getValue();
                                fn2.s(value12);
                                Integer id2 = ((ps1) value12).getId();
                                Object value13 = ep4Var.getValue();
                                fn2.s(value13);
                                Integer type2 = ((ps1) value13).getType();
                                Object value14 = ep4Var.getValue();
                                fn2.s(value14);
                                Integer stationOrPoiId2 = ((ps1) value14).getStationOrPoiId();
                                Object value15 = ep4Var.getValue();
                                fn2.s(value15);
                                Integer zoneTypeId2 = ((ps1) value15).getZoneTypeId();
                                Object value16 = ep4Var.getValue();
                                fn2.s(value16);
                                String stationOrPoiName2 = ((ps1) value16).getStationOrPoiName();
                                Object value17 = ep4Var.getValue();
                                fn2.s(value17);
                                String latitude2 = ((ps1) value17).getLatitude();
                                Object value18 = ep4Var.getValue();
                                fn2.s(value18);
                                String longitude2 = ((ps1) value18).getLongitude();
                                Object value19 = ep4Var.getValue();
                                fn2.s(value19);
                                Boolean isActive2 = ((ps1) value19).getIsActive();
                                Object value20 = ep4Var.getValue();
                                fn2.s(value20);
                                Float f2 = ((ps1) value20).j;
                                Object value21 = ep4Var.getValue();
                                fn2.s(value21);
                                ps1Var2 = new ps1(id2, type2, stationOrPoiId2, zoneTypeId2, stationOrPoiName2, latitude2, longitude2, isActive2, ((ps1) value21).i, f2);
                            }
                            ep4Var.f(ps1Var);
                            ep4Var2.f(ps1Var2);
                            break;
                        }
                        break;
                    case 2:
                        int i7 = TripPlannerActivity.N;
                        fn2.v(tripPlannerActivity, "this$0");
                        if (tripPlannerActivity.I != null && tripPlannerActivity.J != null) {
                            TripPlannerViewModel z03 = tripPlannerActivity.z0();
                            qm2 qm2Var = tripPlannerActivity.I;
                            fn2.s(qm2Var);
                            LatLng a = qm2Var.a();
                            fn2.u(a, "getPosition(...)");
                            qm2 qm2Var2 = tripPlannerActivity.J;
                            fn2.s(qm2Var2);
                            LatLng a2 = qm2Var2.a();
                            fn2.u(a2, "getPosition(...)");
                            xq2.E(mt1.C(z03), z03.h.a(), 0, new o55(z03, a, a2, null), 2);
                            break;
                        }
                        break;
                    case 3:
                        int i8 = TripPlannerActivity.N;
                        fn2.v(tripPlannerActivity, "this$0");
                        new s35().show(tripPlannerActivity.getSupportFragmentManager(), "DialogTripOptions");
                        break;
                    default:
                        int i9 = TripPlannerActivity.N;
                        fn2.v(tripPlannerActivity, "this$0");
                        if (!(((dd5) tripPlannerActivity.z0().e).h() == null)) {
                            uq3 uq3Var = new uq3();
                            ScreenCode screenCode = ScreenCode.TRIP_PLANNER;
                            p supportFragmentManager2 = tripPlannerActivity.getSupportFragmentManager();
                            fn2.u(supportFragmentManager2, "getSupportFragmentManager(...)");
                            uq3Var.u(supportFragmentManager2, screenCode);
                            break;
                        } else {
                            tripPlannerActivity.a0();
                            break;
                        }
                }
            }
        });
        y0.j.setOnClickListener(new View.OnClickListener(this) {
            public final TripPlannerActivity g;

            {
                this.g = this;
            }

            @Override
            public final void onClick(View view) {
                ps1 ps1Var;
                int i4 = i3;
                ps1 ps1Var2 = null;
                TripPlannerActivity tripPlannerActivity = this.g;
                switch (i4) {
                    case 0:
                        int i5 = TripPlannerActivity.N;
                        fn2.v(tripPlannerActivity, "this$0");
                        tripPlannerActivity.w0();
                        break;
                    case 1:
                        int i6 = TripPlannerActivity.N;
                        fn2.v(tripPlannerActivity, "this$0");
                        TripPlannerViewModel z02 = tripPlannerActivity.z0();
                        ep4 ep4Var = z02.n;
                        Object value = ep4Var.getValue();
                        ep4 ep4Var2 = z02.o;
                        if (value != null || ep4Var2.getValue() != null) {
                            if (ep4Var2.getValue() != null) {
                                Object value2 = ep4Var2.getValue();
                                fn2.s(value2);
                                Integer id = ((ps1) value2).getId();
                                Object value3 = ep4Var2.getValue();
                                fn2.s(value3);
                                Integer type = ((ps1) value3).getType();
                                Object value4 = ep4Var2.getValue();
                                fn2.s(value4);
                                Integer stationOrPoiId = ((ps1) value4).getStationOrPoiId();
                                Object value5 = ep4Var2.getValue();
                                fn2.s(value5);
                                Integer zoneTypeId = ((ps1) value5).getZoneTypeId();
                                Object value6 = ep4Var2.getValue();
                                fn2.s(value6);
                                String stationOrPoiName = ((ps1) value6).getStationOrPoiName();
                                Object value7 = ep4Var2.getValue();
                                fn2.s(value7);
                                String latitude = ((ps1) value7).getLatitude();
                                Object value8 = ep4Var2.getValue();
                                fn2.s(value8);
                                String longitude = ((ps1) value8).getLongitude();
                                Object value9 = ep4Var2.getValue();
                                fn2.s(value9);
                                Boolean isActive = ((ps1) value9).getIsActive();
                                Object value10 = ep4Var2.getValue();
                                fn2.s(value10);
                                Float f = ((ps1) value10).j;
                                Object value11 = ep4Var2.getValue();
                                fn2.s(value11);
                                ps1Var = new ps1(id, type, stationOrPoiId, zoneTypeId, stationOrPoiName, latitude, longitude, isActive, ((ps1) value11).i, f);
                            } else {
                                ps1Var = null;
                            }
                            if (ep4Var.getValue() != null) {
                                Object value12 = ep4Var.getValue();
                                fn2.s(value12);
                                Integer id2 = ((ps1) value12).getId();
                                Object value13 = ep4Var.getValue();
                                fn2.s(value13);
                                Integer type2 = ((ps1) value13).getType();
                                Object value14 = ep4Var.getValue();
                                fn2.s(value14);
                                Integer stationOrPoiId2 = ((ps1) value14).getStationOrPoiId();
                                Object value15 = ep4Var.getValue();
                                fn2.s(value15);
                                Integer zoneTypeId2 = ((ps1) value15).getZoneTypeId();
                                Object value16 = ep4Var.getValue();
                                fn2.s(value16);
                                String stationOrPoiName2 = ((ps1) value16).getStationOrPoiName();
                                Object value17 = ep4Var.getValue();
                                fn2.s(value17);
                                String latitude2 = ((ps1) value17).getLatitude();
                                Object value18 = ep4Var.getValue();
                                fn2.s(value18);
                                String longitude2 = ((ps1) value18).getLongitude();
                                Object value19 = ep4Var.getValue();
                                fn2.s(value19);
                                Boolean isActive2 = ((ps1) value19).getIsActive();
                                Object value20 = ep4Var.getValue();
                                fn2.s(value20);
                                Float f2 = ((ps1) value20).j;
                                Object value21 = ep4Var.getValue();
                                fn2.s(value21);
                                ps1Var2 = new ps1(id2, type2, stationOrPoiId2, zoneTypeId2, stationOrPoiName2, latitude2, longitude2, isActive2, ((ps1) value21).i, f2);
                            }
                            ep4Var.f(ps1Var);
                            ep4Var2.f(ps1Var2);
                            break;
                        }
                        break;
                    case 2:
                        int i7 = TripPlannerActivity.N;
                        fn2.v(tripPlannerActivity, "this$0");
                        if (tripPlannerActivity.I != null && tripPlannerActivity.J != null) {
                            TripPlannerViewModel z03 = tripPlannerActivity.z0();
                            qm2 qm2Var = tripPlannerActivity.I;
                            fn2.s(qm2Var);
                            LatLng a = qm2Var.a();
                            fn2.u(a, "getPosition(...)");
                            qm2 qm2Var2 = tripPlannerActivity.J;
                            fn2.s(qm2Var2);
                            LatLng a2 = qm2Var2.a();
                            fn2.u(a2, "getPosition(...)");
                            xq2.E(mt1.C(z03), z03.h.a(), 0, new o55(z03, a, a2, null), 2);
                            break;
                        }
                        break;
                    case 3:
                        int i8 = TripPlannerActivity.N;
                        fn2.v(tripPlannerActivity, "this$0");
                        new s35().show(tripPlannerActivity.getSupportFragmentManager(), "DialogTripOptions");
                        break;
                    default:
                        int i9 = TripPlannerActivity.N;
                        fn2.v(tripPlannerActivity, "this$0");
                        if (!(((dd5) tripPlannerActivity.z0().e).h() == null)) {
                            uq3 uq3Var = new uq3();
                            ScreenCode screenCode = ScreenCode.TRIP_PLANNER;
                            p supportFragmentManager2 = tripPlannerActivity.getSupportFragmentManager();
                            fn2.u(supportFragmentManager2, "getSupportFragmentManager(...)");
                            uq3Var.u(supportFragmentManager2, screenCode);
                            break;
                        } else {
                            tripPlannerActivity.a0();
                            break;
                        }
                }
            }
        });
        EditText editText3 = textInputLayout.getEditText();
        if (editText3 != null) {
            editText3.addTextChangedListener(new d45(this, 0));
        }
        EditText editText4 = textInputLayout2.getEditText();
        if (editText4 != null) {
            editText4.addTextChangedListener(new d45(this, 1));
        }
        final int i4 = 3;
        y0.d.setOnClickListener(new View.OnClickListener(this) {
            public final TripPlannerActivity g;

            {
                this.g = this;
            }

            @Override
            public final void onClick(View view) {
                ps1 ps1Var;
                int i42 = i4;
                ps1 ps1Var2 = null;
                TripPlannerActivity tripPlannerActivity = this.g;
                switch (i42) {
                    case 0:
                        int i5 = TripPlannerActivity.N;
                        fn2.v(tripPlannerActivity, "this$0");
                        tripPlannerActivity.w0();
                        break;
                    case 1:
                        int i6 = TripPlannerActivity.N;
                        fn2.v(tripPlannerActivity, "this$0");
                        TripPlannerViewModel z02 = tripPlannerActivity.z0();
                        ep4 ep4Var = z02.n;
                        Object value = ep4Var.getValue();
                        ep4 ep4Var2 = z02.o;
                        if (value != null || ep4Var2.getValue() != null) {
                            if (ep4Var2.getValue() != null) {
                                Object value2 = ep4Var2.getValue();
                                fn2.s(value2);
                                Integer id = ((ps1) value2).getId();
                                Object value3 = ep4Var2.getValue();
                                fn2.s(value3);
                                Integer type = ((ps1) value3).getType();
                                Object value4 = ep4Var2.getValue();
                                fn2.s(value4);
                                Integer stationOrPoiId = ((ps1) value4).getStationOrPoiId();
                                Object value5 = ep4Var2.getValue();
                                fn2.s(value5);
                                Integer zoneTypeId = ((ps1) value5).getZoneTypeId();
                                Object value6 = ep4Var2.getValue();
                                fn2.s(value6);
                                String stationOrPoiName = ((ps1) value6).getStationOrPoiName();
                                Object value7 = ep4Var2.getValue();
                                fn2.s(value7);
                                String latitude = ((ps1) value7).getLatitude();
                                Object value8 = ep4Var2.getValue();
                                fn2.s(value8);
                                String longitude = ((ps1) value8).getLongitude();
                                Object value9 = ep4Var2.getValue();
                                fn2.s(value9);
                                Boolean isActive = ((ps1) value9).getIsActive();
                                Object value10 = ep4Var2.getValue();
                                fn2.s(value10);
                                Float f = ((ps1) value10).j;
                                Object value11 = ep4Var2.getValue();
                                fn2.s(value11);
                                ps1Var = new ps1(id, type, stationOrPoiId, zoneTypeId, stationOrPoiName, latitude, longitude, isActive, ((ps1) value11).i, f);
                            } else {
                                ps1Var = null;
                            }
                            if (ep4Var.getValue() != null) {
                                Object value12 = ep4Var.getValue();
                                fn2.s(value12);
                                Integer id2 = ((ps1) value12).getId();
                                Object value13 = ep4Var.getValue();
                                fn2.s(value13);
                                Integer type2 = ((ps1) value13).getType();
                                Object value14 = ep4Var.getValue();
                                fn2.s(value14);
                                Integer stationOrPoiId2 = ((ps1) value14).getStationOrPoiId();
                                Object value15 = ep4Var.getValue();
                                fn2.s(value15);
                                Integer zoneTypeId2 = ((ps1) value15).getZoneTypeId();
                                Object value16 = ep4Var.getValue();
                                fn2.s(value16);
                                String stationOrPoiName2 = ((ps1) value16).getStationOrPoiName();
                                Object value17 = ep4Var.getValue();
                                fn2.s(value17);
                                String latitude2 = ((ps1) value17).getLatitude();
                                Object value18 = ep4Var.getValue();
                                fn2.s(value18);
                                String longitude2 = ((ps1) value18).getLongitude();
                                Object value19 = ep4Var.getValue();
                                fn2.s(value19);
                                Boolean isActive2 = ((ps1) value19).getIsActive();
                                Object value20 = ep4Var.getValue();
                                fn2.s(value20);
                                Float f2 = ((ps1) value20).j;
                                Object value21 = ep4Var.getValue();
                                fn2.s(value21);
                                ps1Var2 = new ps1(id2, type2, stationOrPoiId2, zoneTypeId2, stationOrPoiName2, latitude2, longitude2, isActive2, ((ps1) value21).i, f2);
                            }
                            ep4Var.f(ps1Var);
                            ep4Var2.f(ps1Var2);
                            break;
                        }
                        break;
                    case 2:
                        int i7 = TripPlannerActivity.N;
                        fn2.v(tripPlannerActivity, "this$0");
                        if (tripPlannerActivity.I != null && tripPlannerActivity.J != null) {
                            TripPlannerViewModel z03 = tripPlannerActivity.z0();
                            qm2 qm2Var = tripPlannerActivity.I;
                            fn2.s(qm2Var);
                            LatLng a = qm2Var.a();
                            fn2.u(a, "getPosition(...)");
                            qm2 qm2Var2 = tripPlannerActivity.J;
                            fn2.s(qm2Var2);
                            LatLng a2 = qm2Var2.a();
                            fn2.u(a2, "getPosition(...)");
                            xq2.E(mt1.C(z03), z03.h.a(), 0, new o55(z03, a, a2, null), 2);
                            break;
                        }
                        break;
                    case 3:
                        int i8 = TripPlannerActivity.N;
                        fn2.v(tripPlannerActivity, "this$0");
                        new s35().show(tripPlannerActivity.getSupportFragmentManager(), "DialogTripOptions");
                        break;
                    default:
                        int i9 = TripPlannerActivity.N;
                        fn2.v(tripPlannerActivity, "this$0");
                        if (!(((dd5) tripPlannerActivity.z0().e).h() == null)) {
                            uq3 uq3Var = new uq3();
                            ScreenCode screenCode = ScreenCode.TRIP_PLANNER;
                            p supportFragmentManager2 = tripPlannerActivity.getSupportFragmentManager();
                            fn2.u(supportFragmentManager2, "getSupportFragmentManager(...)");
                            uq3Var.u(supportFragmentManager2, screenCode);
                            break;
                        } else {
                            tripPlannerActivity.a0();
                            break;
                        }
                }
            }
        });
        Context applicationContext = getApplicationContext();
        fn2.t(applicationContext, "null cannot be cast to non-null type com.asis.baseapp.Application");
        if (((ak) applicationContext).g().e()) {
            MaterialButton materialButton = y0().e;
            fn2.u(materialButton, "buttonReport");
            fn2.A0(materialButton);
            final int i5 = 4;
            y0().e.setOnClickListener(new View.OnClickListener(this) {
                public final TripPlannerActivity g;

                {
                    this.g = this;
                }

                @Override
                public final void onClick(View view) {
                    ps1 ps1Var;
                    int i42 = i5;
                    ps1 ps1Var2 = null;
                    TripPlannerActivity tripPlannerActivity = this.g;
                    switch (i42) {
                        case 0:
                            int i52 = TripPlannerActivity.N;
                            fn2.v(tripPlannerActivity, "this$0");
                            tripPlannerActivity.w0();
                            break;
                        case 1:
                            int i6 = TripPlannerActivity.N;
                            fn2.v(tripPlannerActivity, "this$0");
                            TripPlannerViewModel z02 = tripPlannerActivity.z0();
                            ep4 ep4Var = z02.n;
                            Object value = ep4Var.getValue();
                            ep4 ep4Var2 = z02.o;
                            if (value != null || ep4Var2.getValue() != null) {
                                if (ep4Var2.getValue() != null) {
                                    Object value2 = ep4Var2.getValue();
                                    fn2.s(value2);
                                    Integer id = ((ps1) value2).getId();
                                    Object value3 = ep4Var2.getValue();
                                    fn2.s(value3);
                                    Integer type = ((ps1) value3).getType();
                                    Object value4 = ep4Var2.getValue();
                                    fn2.s(value4);
                                    Integer stationOrPoiId = ((ps1) value4).getStationOrPoiId();
                                    Object value5 = ep4Var2.getValue();
                                    fn2.s(value5);
                                    Integer zoneTypeId = ((ps1) value5).getZoneTypeId();
                                    Object value6 = ep4Var2.getValue();
                                    fn2.s(value6);
                                    String stationOrPoiName = ((ps1) value6).getStationOrPoiName();
                                    Object value7 = ep4Var2.getValue();
                                    fn2.s(value7);
                                    String latitude = ((ps1) value7).getLatitude();
                                    Object value8 = ep4Var2.getValue();
                                    fn2.s(value8);
                                    String longitude = ((ps1) value8).getLongitude();
                                    Object value9 = ep4Var2.getValue();
                                    fn2.s(value9);
                                    Boolean isActive = ((ps1) value9).getIsActive();
                                    Object value10 = ep4Var2.getValue();
                                    fn2.s(value10);
                                    Float f = ((ps1) value10).j;
                                    Object value11 = ep4Var2.getValue();
                                    fn2.s(value11);
                                    ps1Var = new ps1(id, type, stationOrPoiId, zoneTypeId, stationOrPoiName, latitude, longitude, isActive, ((ps1) value11).i, f);
                                } else {
                                    ps1Var = null;
                                }
                                if (ep4Var.getValue() != null) {
                                    Object value12 = ep4Var.getValue();
                                    fn2.s(value12);
                                    Integer id2 = ((ps1) value12).getId();
                                    Object value13 = ep4Var.getValue();
                                    fn2.s(value13);
                                    Integer type2 = ((ps1) value13).getType();
                                    Object value14 = ep4Var.getValue();
                                    fn2.s(value14);
                                    Integer stationOrPoiId2 = ((ps1) value14).getStationOrPoiId();
                                    Object value15 = ep4Var.getValue();
                                    fn2.s(value15);
                                    Integer zoneTypeId2 = ((ps1) value15).getZoneTypeId();
                                    Object value16 = ep4Var.getValue();
                                    fn2.s(value16);
                                    String stationOrPoiName2 = ((ps1) value16).getStationOrPoiName();
                                    Object value17 = ep4Var.getValue();
                                    fn2.s(value17);
                                    String latitude2 = ((ps1) value17).getLatitude();
                                    Object value18 = ep4Var.getValue();
                                    fn2.s(value18);
                                    String longitude2 = ((ps1) value18).getLongitude();
                                    Object value19 = ep4Var.getValue();
                                    fn2.s(value19);
                                    Boolean isActive2 = ((ps1) value19).getIsActive();
                                    Object value20 = ep4Var.getValue();
                                    fn2.s(value20);
                                    Float f2 = ((ps1) value20).j;
                                    Object value21 = ep4Var.getValue();
                                    fn2.s(value21);
                                    ps1Var2 = new ps1(id2, type2, stationOrPoiId2, zoneTypeId2, stationOrPoiName2, latitude2, longitude2, isActive2, ((ps1) value21).i, f2);
                                }
                                ep4Var.f(ps1Var);
                                ep4Var2.f(ps1Var2);
                                break;
                            }
                            break;
                        case 2:
                            int i7 = TripPlannerActivity.N;
                            fn2.v(tripPlannerActivity, "this$0");
                            if (tripPlannerActivity.I != null && tripPlannerActivity.J != null) {
                                TripPlannerViewModel z03 = tripPlannerActivity.z0();
                                qm2 qm2Var = tripPlannerActivity.I;
                                fn2.s(qm2Var);
                                LatLng a = qm2Var.a();
                                fn2.u(a, "getPosition(...)");
                                qm2 qm2Var2 = tripPlannerActivity.J;
                                fn2.s(qm2Var2);
                                LatLng a2 = qm2Var2.a();
                                fn2.u(a2, "getPosition(...)");
                                xq2.E(mt1.C(z03), z03.h.a(), 0, new o55(z03, a, a2, null), 2);
                                break;
                            }
                            break;
                        case 3:
                            int i8 = TripPlannerActivity.N;
                            fn2.v(tripPlannerActivity, "this$0");
                            new s35().show(tripPlannerActivity.getSupportFragmentManager(), "DialogTripOptions");
                            break;
                        default:
                            int i9 = TripPlannerActivity.N;
                            fn2.v(tripPlannerActivity, "this$0");
                            if (!(((dd5) tripPlannerActivity.z0().e).h() == null)) {
                                uq3 uq3Var = new uq3();
                                ScreenCode screenCode = ScreenCode.TRIP_PLANNER;
                                p supportFragmentManager2 = tripPlannerActivity.getSupportFragmentManager();
                                fn2.u(supportFragmentManager2, "getSupportFragmentManager(...)");
                                uq3Var.u(supportFragmentManager2, screenCode);
                                break;
                            } else {
                                tripPlannerActivity.a0();
                                break;
                            }
                    }
                }
            });
        }
        b onBackPressedDispatcher = getOnBackPressedDispatcher();
        h03 h03Var = new h03(this, 6);
        onBackPressedDispatcher.getClass();
        onBackPressedDispatcher.b(h03Var);
        xq2.E(t22.n(this), null, 0, new g45(this, null), 3);
        xq2.E(t22.n(this), null, 0, new i45(this, null), 3);
        xq2.E(t22.n(this), null, 0, new k45(this, null), 3);
        xq2.E(t22.n(this), null, 0, new m45(this, null), 3);
    }

    @Override
    public final void onDestroy() {
        super.onDestroy();
        this.K = null;
    }

    @Override
    public final void onResume() {
        super.onResume();
        mf mfVar = mf.d;
        fn2.v(mfVar, "screen");
        FirebaseAnalytics analytics = AnalyticsKt.getAnalytics(Firebase.INSTANCE);
        ParametersBuilder parametersBuilder = new ParametersBuilder();
        parametersBuilder.param(FirebaseAnalytics.Param.SCREEN_NAME, mfVar.a);
        parametersBuilder.param(FirebaseAnalytics.Param.SCREEN_CLASS, mfVar.b);
        nm4.s(mfVar.c, parametersBuilder, "module_name", analytics, FirebaseAnalytics.Event.SCREEN_VIEW);
    }

    public final void s0(String str, LatLng latLng, String str2, um2 um2Var) {
        Drawable drawable = jk0.getDrawable(this, R$drawable.background_point);
        Bitmap O = drawable != null ? zh3.O(drawable, 35, 35, 4) : null;
        MarkerOptions markerOptions = new MarkerOptions();
        if (O != null) {
            markerOptions.i = fx5.g(O);
        }
        markerOptions.g = str;
        markerOptions.Z(latLng);
        qm2 k0 = k0(markerOptions, true);
        if (k0 != null) {
            k0.h(um2Var.name());
        }
        if (k0 != null) {
            k0.i(str);
        }
        if (k0 == null) {
            return;
        }
        k0.g(str2);
    }

    public final void t0(LatLng latLng, String str, String str2) {
        if (str2 == null) {
            if (str == null) {
                str = "";
            }
            s0(str, latLng, null, um2.g);
            return;
        }
        int i = R$string.trip_planner_go_to_detail;
        Object[] objArr = new Object[1];
        if (str == null) {
            str = "";
        }
        objArr[0] = str;
        String string = getString(i, objArr);
        fn2.u(string, "getString(...)");
        s0(string, latLng, str2, um2.f);
    }

    public final void u0() {
        ExtendedFloatingActionButton extendedFloatingActionButton = y0().j;
        if (extendedFloatingActionButton.getTranslationX() == 0.0f) {
            ObjectAnimator.ofFloat(extendedFloatingActionButton, "translationX", z() + 10).start();
        }
    }

    public final String v0(LatLng latLng, boolean z) {
        String m0 = m0(latLng);
        if (m0.length() == 0) {
            m0 = z ? getString(R$string.selected_start_point) : getString(R$string.selected_end_point);
            fn2.s(m0);
        }
        return m0;
    }

    public final void w0() {
        int ordinal = this.F.ordinal();
        if (ordinal == 0) {
            x0();
            return;
        }
        if (ordinal == 1) {
            finish();
            return;
        }
        if (ordinal == 2) {
            x0();
            return;
        }
        if (ordinal != 3) {
            return;
        }
        this.F = rd3.h;
        y0().b.setCurrentItem(1);
        Iterator it = this.C.iterator();
        while (it.hasNext()) {
            zd3 zd3Var = (zd3) it.next();
            zd3Var.getClass();
            try {
                zd3Var.a.zzp();
            } catch (RemoteException e) {
                throw new RuntimeRemoteException(e);
            }
        }
        Iterator it2 = this.B.iterator();
        while (it2.hasNext()) {
            ((qm2) it2.next()).d();
        }
        BottomSheetBehavior bottomSheetBehavior = this.L;
        fn2.s(bottomSheetBehavior);
        bottomSheetBehavior.J(0);
        BottomSheetBehavior bottomSheetBehavior2 = this.L;
        fn2.s(bottomSheetBehavior2);
        bottomSheetBehavior2.K(4);
        BottomSheetBehavior bottomSheetBehavior3 = this.K;
        fn2.s(bottomSheetBehavior3);
        bottomSheetBehavior3.K(3);
    }

    public final void x0() {
        this.F = rd3.g;
        y0().b.setCurrentItem(0);
        MaterialButton materialButton = y0().d;
        fn2.u(materialButton, "buttonOptions");
        fn2.e(materialButton);
        ExtendedFloatingActionButton extendedFloatingActionButton = y0().j;
        fn2.u(extendedFloatingActionButton, "planButton");
        fn2.e(extendedFloatingActionButton);
        ConstraintLayout constraintLayout = y0().f;
        fn2.u(constraintLayout, "choosePointContainer");
        fn2.e(constraintLayout);
        EditText editText = y0().g.getEditText();
        if (editText != null) {
            editText.clearFocus();
        }
        EditText editText2 = y0().h.getEditText();
        if (editText2 != null) {
            editText2.clearFocus();
        }
        BottomSheetBehavior bottomSheetBehavior = this.K;
        fn2.s(bottomSheetBehavior);
        bottomSheetBehavior.K(4);
        if (this.I != null) {
            if (this.J != null) {
                A0();
            }
        }
    }

    public final n6 y0() {
        return (n6) this.G.getValue();
    }

    public final TripPlannerViewModel z0() {
        return (TripPlannerViewModel) this.H.getValue();
    }
}