package com.vinfast.companion.main.ui.gltestdrive;

/* JADX INFO: compiled from: r8-map-id-ae6aab8d9a1033945587ffdd1bc6222159522c1d66e66a2c4cecb065134dd0a6 */
/* JADX INFO: loaded from: E:\ios\vf_dex\classes3.dex */
@kotlin.Metadata(d1 = {"\u0000>\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0006\n\u0002\u0010\u000b\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0006\b\u0007\u0018\u0000 \u001e2\b\u0012\u0004\u0012\u00020\u00020\u0001:\u0001\u001fB\u0007¢\u0006\u0004\b\u0003\u0010\u0004J\u0019\u0010\b\u001a\u00020\u00072\b\u0010\u0006\u001a\u0004\u0018\u00010\u0005H\u0002¢\u0006\u0004\b\b\u0010\tJ\u0019\u0010\f\u001a\u00020\u00072\b\u0010\u000b\u001a\u0004\u0018\u00010\nH\u0002¢\u0006\u0004\b\f\u0010\rJ!\u0010\u000f\u001a\u00020\u00072\b\u0010\u000b\u001a\u0004\u0018\u00010\n2\u0006\u0010\u000e\u001a\u00020\nH\u0002¢\u0006\u0004\b\u000f\u0010\u0010J\u000f\u0010\u0012\u001a\u00020\u0011H\u0016¢\u0006\u0004\b\u0012\u0010\u0013J\u0019\u0010\u0015\u001a\u00020\u00072\b\u0010\u0014\u001a\u0004\u0018\u00010\u0005H\u0016¢\u0006\u0004\b\u0015\u0010\tJ\u0017\u0010\u0018\u001a\u00020\u00072\u0006\u0010\u0017\u001a\u00020\u0016H\u0014¢\u0006\u0004\b\u0018\u0010\u0019R\u0016\u0010\u001d\u001a\u0004\u0018\u00010\u001a8BX\u0082\u0004¢\u0006\u0006\u001a\u0004\b\u001b\u0010\u001c¨\u0006 "}, d2 = {"Lcom/vinfast/companion/main/ui/gltestdrive/GlTestDriveActivity;", "Lcom/vinfast/companion/core/base/activity/BaseActivity;", "Lcom/vinfast/companion/services/databinding/ActivityGlTestDriveBinding;", "<init>", "()V", "Landroid/os/Bundle;", "extras", okhttp3.HttpUrl.FRAGMENT_ENCODE_SET, "b1", "(Landroid/os/Bundle;)V", okhttp3.HttpUrl.FRAGMENT_ENCODE_SET, "appointmentId", "d1", "(Ljava/lang/String;)V", "notiCategory", "c1", "(Ljava/lang/String;Ljava/lang/String;)V", okhttp3.HttpUrl.FRAGMENT_ENCODE_SET, "V0", "()Z", "savedInstanceState", "P0", "Landroid/content/Intent;", "intent", "onNewIntent", "(Landroid/content/Intent;)V", "Landroidx/navigation/fragment/NavHostFragment;", "a1", "()Landroidx/navigation/fragment/NavHostFragment;", "navHostFragment", "e6", "Companion", "services_release"}, k = 1, mv = {2, 2, 0}, xi = 48)
@dagger.hilt.android.AndroidEntryPoint
public final class GlTestDriveActivity extends com.vinfast.companion.main.ui.gltestdrive.Hilt_GlTestDriveActivity<com.vinfast.companion.services.databinding.ActivityGlTestDriveBinding> {

    /* JADX INFO: renamed from: e6, reason: from kotlin metadata */
    public static final com.vinfast.companion.main.ui.gltestdrive.GlTestDriveActivity.Companion INSTANCE = new com.vinfast.companion.main.ui.gltestdrive.GlTestDriveActivity.Companion(null);

    /* JADX INFO: compiled from: r8-map-id-ae6aab8d9a1033945587ffdd1bc6222159522c1d66e66a2c4cecb065134dd0a6 */
    @kotlin.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\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0086\u0003\u0018\u00002\u00020\u0001B\t\b\u0002¢\u0006\u0004\b\u0002\u0010\u0003J/\u0010\u000b\u001a\u00020\n2\u0006\u0010\u0005\u001a\u00020\u00042\n\b\u0002\u0010\u0007\u001a\u0004\u0018\u00010\u00062\n\b\u0002\u0010\t\u001a\u0004\u0018\u00010\bH\u0007¢\u0006\u0004\b\u000b\u0010\f¨\u0006\r"}, d2 = {"Lcom/vinfast/companion/main/ui/gltestdrive/GlTestDriveActivity$Companion;", okhttp3.HttpUrl.FRAGMENT_ENCODE_SET, "<init>", "()V", "Landroid/content/Context;", "context", "Landroid/os/Bundle;", "extras", "Lcom/vinfast/companion/core/utils/notification/Notification;", "notification", "Landroid/content/Intent;", "a", "(Landroid/content/Context;Landroid/os/Bundle;Lcom/vinfast/companion/core/utils/notification/Notification;)Landroid/content/Intent;", "services_release"}, k = 1, mv = {2, 2, 0}, xi = 48)
    public static final class Companion {

        /* JADX INFO: compiled from: r8-map-id-ae6aab8d9a1033945587ffdd1bc6222159522c1d66e66a2c4cecb065134dd0a6 */
        @kotlin.Metadata(k = 3, mv = {2, 2, 0}, xi = 48)
        public static final /* synthetic */ class WhenMappings {
            public static final /* synthetic */ int[] a;

            static {
                int[] iArr = new int[com.vinfast.companion.core.utils.notification.NotificationCategory.values().length];
                try {
                    iArr[com.vinfast.companion.core.utils.notification.NotificationCategory.GlTestDriveEncourageRescheduling.ordinal()] = 1;
                } catch (java.lang.NoSuchFieldError unused) {
                }
                try {
                    iArr[com.vinfast.companion.core.utils.notification.NotificationCategory.GlTestDriveAddMoreInfo.ordinal()] = 2;
                } catch (java.lang.NoSuchFieldError unused2) {
                }
                try {
                    iArr[com.vinfast.companion.core.utils.notification.NotificationCategory.GlTestDriveCompleted.ordinal()] = 3;
                } catch (java.lang.NoSuchFieldError unused3) {
                }
                try {
                    iArr[com.vinfast.companion.core.utils.notification.NotificationCategory.GlTestDriveReminder1Hour.ordinal()] = 4;
                } catch (java.lang.NoSuchFieldError unused4) {
                }
                try {
                    iArr[com.vinfast.companion.core.utils.notification.NotificationCategory.GlTestDriveReminder24Hour.ordinal()] = 5;
                } catch (java.lang.NoSuchFieldError unused5) {
                }
                a = iArr;
            }
        }

        public /* synthetic */ Companion(kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker) {
            this();
        }

        public static /* synthetic */ android.content.Intent b(com.vinfast.companion.main.ui.gltestdrive.GlTestDriveActivity.Companion companion, android.content.Context context, android.os.Bundle bundle, com.vinfast.companion.core.utils.notification.Notification notification, int i, java.lang.Object obj) {
            if ((i & 2) != 0) {
                bundle = null;
            }
            if ((i & 4) != 0) {
                notification = null;
            }
            return companion.a(context, bundle, notification);
        }

        public final android.content.Intent a(android.content.Context context, android.os.Bundle extras, com.vinfast.companion.core.utils.notification.Notification notification) {
            kotlin.jvm.internal.Intrinsics.l(context, "context");
            com.vinfast.companion.core.utils.notification.NotificationCategory notificationCategoryP = notification != null ? notification.p() : null;
            int i = notificationCategoryP == null ? -1 : com.vinfast.companion.main.ui.gltestdrive.GlTestDriveActivity.Companion.WhenMappings.a[notificationCategoryP.ordinal()];
            if (i == 1 || i == 2 || i == 3 || i == 4 || i == 5) {
                java.util.Map mapO = notification.o();
                java.lang.String str = mapO != null ? (java.lang.String) mapO.get("appointmentId") : null;
                kotlin.Pair pairA = kotlin.TuplesKt.a("BUNDLE_SCREEN_TYPE", 32);
                kotlin.Pair pairA2 = kotlin.TuplesKt.a("BUNDLE_APPOINTMENT_ID", str);
                com.vinfast.companion.core.utils.notification.NotificationCategory notificationCategoryP2 = notification.p();
                kotlin.jvm.internal.Intrinsics.i(notificationCategoryP2);
                extras = androidx.core.os.BundleKt.b(new kotlin.Pair[]{pairA, pairA2, kotlin.TuplesKt.a("BUNDLE_NOTIFICATION_CATEGORY", notificationCategoryP2.getValue())});
            }
            android.content.Intent intent = new android.content.Intent(context, (java.lang.Class<?>) com.vinfast.companion.main.ui.gltestdrive.GlTestDriveActivity.class);
            if (extras != null) {
                intent.putExtras(extras);
            }
            return intent;
        }

        private Companion() {
        }
    }

    public GlTestDriveActivity() {
        super(new kotlin.jvm.functions.Function1() { // from class: com.vinfast.companion.main.ui.gltestdrive.a
            public final java.lang.Object invoke(java.lang.Object obj) {
                return com.vinfast.companion.main.ui.gltestdrive.GlTestDriveActivity.Z0((android.view.LayoutInflater) obj);
            }
        });
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final com.vinfast.companion.services.databinding.ActivityGlTestDriveBinding Z0(android.view.LayoutInflater layoutInflater) {
        kotlin.jvm.internal.Intrinsics.l(layoutInflater, "it");
        com.vinfast.companion.services.databinding.ActivityGlTestDriveBinding activityGlTestDriveBindingC = com.vinfast.companion.services.databinding.ActivityGlTestDriveBinding.c(layoutInflater);
        kotlin.jvm.internal.Intrinsics.k(activityGlTestDriveBindingC, "inflate(...)");
        return activityGlTestDriveBindingC;
    }

    private final androidx.navigation.fragment.NavHostFragment a1() {
        androidx.navigation.fragment.NavHostFragment navHostFragmentQ0 = getSupportFragmentManager().q0(com.vinfast.companion.services.R.id.nav_host);
        if (navHostFragmentQ0 instanceof androidx.navigation.fragment.NavHostFragment) {
            return navHostFragmentQ0;
        }
        return null;
    }

    private final void b1(android.os.Bundle extras) {
        java.lang.String string;
        java.lang.Integer numValueOf = extras != null ? java.lang.Integer.valueOf(extras.getInt("BUNDLE_SCREEN_TYPE")) : null;
        java.lang.String string2 = extras != null ? extras.getString("BUNDLE_APPOINTMENT_ID") : null;
        if (extras == null || (string = extras.getString("BUNDLE_NOTIFICATION_CATEGORY")) == null) {
            string = okhttp3.HttpUrl.FRAGMENT_ENCODE_SET;
        }
        d1(string2);
        if (numValueOf != null && numValueOf.intValue() == 32) {
            c1(string2, string);
        }
    }

    private final void c1(java.lang.String appointmentId, java.lang.String notiCategory) {
        androidx.navigation.NavController navControllerH0;
        com.vinfast.companion.main.ui.glcomplaint.detail.GlTestDriveAppointmentDetailFragmentDirections.Companion companion = com.vinfast.companion.main.ui.glcomplaint.detail.GlTestDriveAppointmentDetailFragmentDirections.INSTANCE;
        if (appointmentId == null) {
            appointmentId = okhttp3.HttpUrl.FRAGMENT_ENCODE_SET;
        }
        androidx.navigation.NavDirections navDirectionsE = com.vinfast.companion.main.ui.glcomplaint.detail.GlTestDriveAppointmentDetailFragmentDirections.Companion.e(companion, appointmentId, false, notiCategory, 2, null);
        androidx.navigation.fragment.NavHostFragment navHostFragmentA1 = a1();
        if (navHostFragmentA1 == null || (navControllerH0 = navHostFragmentA1.h0()) == null) {
            return;
        }
        navControllerH0.Q(navDirectionsE);
    }

    /* JADX WARN: Multi-variable type inference failed */
    private final void d1(java.lang.String appointmentId) {
        androidx.navigation.fragment.NavHostFragment navHostFragmentQ0 = getSupportFragmentManager().q0(com.vinfast.companion.services.R.id.nav_host);
        androidx.navigation.NavGraph navGraphA = com.vinfast.companion.core.extensions.ActivityExtensionKt.a(this, navHostFragmentQ0 != null ? navHostFragmentQ0.h0() : null, com.vinfast.companion.services.R.navigation.gl_test_drive_navigation);
        if (appointmentId == null || appointmentId.length() == 0) {
            androidx.navigation.fragment.NavHostFragment navHostFragmentA1 = a1();
            androidx.navigation.NavController navControllerH0 = navHostFragmentA1 != null ? navHostFragmentA1.h0() : null;
            if (navGraphA != null) {
                navGraphA.P(com.vinfast.companion.services.R.id.glTestDriveDashboardFragment);
                if (navControllerH0 != null) {
                    navControllerH0.k0(navGraphA, (android.os.Bundle) null);
                    return;
                }
                return;
            }
            return;
        }
        androidx.navigation.fragment.NavHostFragment navHostFragmentA2 = a1();
        androidx.navigation.NavController navControllerH1 = navHostFragmentA2 != null ? navHostFragmentA2.h0() : null;
        if (navGraphA != null) {
            navGraphA.P(com.vinfast.companion.services.R.id.glTestDriveAppointmentDetailFragment);
            if (navControllerH1 != null) {
                navControllerH1.k0(navGraphA, (android.os.Bundle) null);
            }
        }
    }

    /* JADX WARN: Multi-variable type inference failed */
    public void P0(android.os.Bundle savedInstanceState) {
        android.content.Intent intent = getIntent();
        b1(intent != null ? intent.getExtras() : null);
    }

    public boolean V0() {
        return false;
    }

    protected void onNewIntent(android.content.Intent intent) {
        kotlin.jvm.internal.Intrinsics.l(intent, "intent");
        super/*androidx.activity.ComponentActivity*/.onNewIntent(intent);
        b1(intent.getExtras());
    }
}
