package com.vinfast.vehicle.caraccess.global.roleinfo;

/* JADX INFO: compiled from: r8-map-id-ae6aab8d9a1033945587ffdd1bc6222159522c1d66e66a2c4cecb065134dd0a6 */
/* JADX INFO: loaded from: E:\ios\vf_dex\classes15.dex */
@kotlin.Metadata(d1 = {"\u0000\u0082\u0001\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\t\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0006\b\u0007\u0018\u0000 L2\b\u0012\u0004\u0012\u00020\u00020\u0001:\u0001MB\u0007¢\u0006\u0004\b\u0003\u0010\u0004J\u000f\u0010\u0006\u001a\u00020\u0005H\u0002¢\u0006\u0004\b\u0006\u0010\u0004J\u000f\u0010\u0007\u001a\u00020\u0005H\u0002¢\u0006\u0004\b\u0007\u0010\u0004J\u000f\u0010\b\u001a\u00020\u0005H\u0002¢\u0006\u0004\b\b\u0010\u0004J\u0017\u0010\u000b\u001a\u00020\u00052\u0006\u0010\n\u001a\u00020\tH\u0002¢\u0006\u0004\b\u000b\u0010\fJ\u0019\u0010\u000f\u001a\u00020\u00052\b\b\u0002\u0010\u000e\u001a\u00020\rH\u0002¢\u0006\u0004\b\u000f\u0010\u0010J\u000f\u0010\u0011\u001a\u00020\u0005H\u0002¢\u0006\u0004\b\u0011\u0010\u0004J\u000f\u0010\u0012\u001a\u00020\u0005H\u0002¢\u0006\u0004\b\u0012\u0010\u0004J\u000f\u0010\u0013\u001a\u00020\u0005H\u0002¢\u0006\u0004\b\u0013\u0010\u0004J\u0017\u0010\u0016\u001a\u00020\u00052\u0006\u0010\u0015\u001a\u00020\u0014H\u0002¢\u0006\u0004\b\u0016\u0010\u0017J\u000f\u0010\u0018\u001a\u00020\u0005H\u0002¢\u0006\u0004\b\u0018\u0010\u0004J\u000f\u0010\u001a\u001a\u00020\u0019H\u0016¢\u0006\u0004\b\u001a\u0010\u001bJ\u000f\u0010\u001d\u001a\u00020\u001cH\u0016¢\u0006\u0004\b\u001d\u0010\u001eJ!\u0010#\u001a\u00020\u00052\u0006\u0010 \u001a\u00020\u001f2\b\u0010\"\u001a\u0004\u0018\u00010!H\u0016¢\u0006\u0004\b#\u0010$J\r\u0010%\u001a\u00020\u0005¢\u0006\u0004\b%\u0010\u0004J\u000f\u0010&\u001a\u00020\rH\u0016¢\u0006\u0004\b&\u0010'J\u0017\u0010)\u001a\u00020\u00052\u0006\u0010(\u001a\u00020\rH\u0016¢\u0006\u0004\b)\u0010\u0010J\u0017\u0010*\u001a\u00020\u00052\u0006\u0010\n\u001a\u00020\tH\u0016¢\u0006\u0004\b*\u0010\fR\u001b\u00100\u001a\u00020+8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b,\u0010-\u001a\u0004\b.\u0010/R\"\u00108\u001a\u0002018\u0006@\u0006X\u0087.¢\u0006\u0012\n\u0004\b2\u00103\u001a\u0004\b4\u00105\"\u0004\b6\u00107R\u0018\u0010<\u001a\u0004\u0018\u0001098\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b:\u0010;R\u001b\u0010A\u001a\u00020=8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b>\u0010-\u001a\u0004\b?\u0010@R\"\u0010G\u001a\u0010\u0012\f\u0012\n D*\u0004\u0018\u00010C0C0B8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\bE\u0010FR\u0018\u0010K\u001a\u0004\u0018\u00010H8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\bI\u0010J¨\u0006N"}, d2 = {"Lcom/vinfast/vehicle/caraccess/global/roleinfo/GLRoleInfoFragment;", "Lcom/vinfast/companion/core/base/fragment/BaseFragment;", "Lcom/vinfast/vehicle/databinding/FragmentGlRoleInfoBinding;", "<init>", "()V", "", "z2", "S2", "s2", "Lcom/vinfast/companion/core/base/ViewModelState$Error;", "error", "y2", "(Lcom/vinfast/companion/core/base/ViewModelState$Error;)V", "", "isCallAPI", "t2", "(Z)V", "U2", "O2", "X2", "Lcom/vinfast/companion/vehiclekit/model/RoleInfo;", "roleInfo", "Z2", "(Lcom/vinfast/companion/vehiclekit/model/RoleInfo;)V", "Q2", "Lcom/vinfast/companion/core/base/BaseViewModel;", "U1", "()Lcom/vinfast/companion/core/base/BaseViewModel;", "Lcom/vinfast/companion/core/base/fragment/ToolbarConfiguration;", "T0", "()Lcom/vinfast/companion/core/base/fragment/ToolbarConfiguration;", "Landroid/view/View;", "view", "Landroid/os/Bundle;", "savedInstanceState", "y1", "(Landroid/view/View;Landroid/os/Bundle;)V", "F2", "P1", "()Z", "navigateUp", "s1", "I0", "Lcom/vinfast/vehicle/caraccess/global/roleinfo/GLRoleInfoViewModel;", "A", "Lkotlin/Lazy;", "x2", "()Lcom/vinfast/vehicle/caraccess/global/roleinfo/GLRoleInfoViewModel;", "viewModel", "Lcom/vinfast/companion/core/managers/IAccountAuthenticator;", "B", "Lcom/vinfast/companion/core/managers/IAccountAuthenticator;", "v2", "()Lcom/vinfast/companion/core/managers/IAccountAuthenticator;", "setAccountAuthenticator", "(Lcom/vinfast/companion/core/managers/IAccountAuthenticator;)V", "accountAuthenticator", "", "C", "Ljava/lang/String;", "typeCheckAuth", "Lcom/vinfast/companion/core/base/ui/adapter/ItemCustomAdapter;", "D", "w2", "()Lcom/vinfast/companion/core/base/ui/adapter/ItemCustomAdapter;", "listItemAdapter", "Landroidx/activity/result/ActivityResultLauncher;", "Landroid/content/Intent;", "kotlin.jvm.PlatformType", "E", "Landroidx/activity/result/ActivityResultLauncher;", "addBillingAddressResult", "Lcom/vinfast/vehicle/caraccess/VerifyCodeDialogFragment;", "F", "Lcom/vinfast/vehicle/caraccess/VerifyCodeDialogFragment;", "dialogVerify", "G", "Companion", "vehicle_release"}, k = 1, mv = {2, 2, 0}, xi = 48)
@dagger.hilt.android.AndroidEntryPoint
@kotlin.jvm.internal.SourceDebugExtension
public final class GLRoleInfoFragment extends com.vinfast.vehicle.caraccess.global.roleinfo.Hilt_GLRoleInfoFragment<com.vinfast.vehicle.databinding.FragmentGlRoleInfoBinding> {

    /* JADX INFO: renamed from: A, reason: from kotlin metadata */
    private final kotlin.Lazy viewModel;

    /* JADX INFO: renamed from: B, reason: from kotlin metadata */
    public com.vinfast.companion.core.managers.IAccountAuthenticator accountAuthenticator;

    /* JADX INFO: renamed from: C, reason: from kotlin metadata */
    private java.lang.String typeCheckAuth;

    /* JADX INFO: renamed from: D, reason: from kotlin metadata */
    private final kotlin.Lazy listItemAdapter;

    /* JADX INFO: renamed from: E, reason: from kotlin metadata */
    private final androidx.activity.result.ActivityResultLauncher addBillingAddressResult;

    /* JADX INFO: renamed from: F, reason: from kotlin metadata */
    private com.vinfast.vehicle.caraccess.VerifyCodeDialogFragment dialogVerify;

    /* 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;
        public static final /* synthetic */ int[] b;
        public static final /* synthetic */ int[] c;

        static {
            int[] iArr = new int[com.vinfast.vehicle.caraccess.global.roleinfo.TypeChangeData.values().length];
            try {
                iArr[com.vinfast.vehicle.caraccess.global.roleinfo.TypeChangeData.OwnerRemoveSecondDriver.ordinal()] = 1;
            } catch (java.lang.NoSuchFieldError unused) {
            }
            try {
                iArr[com.vinfast.vehicle.caraccess.global.roleinfo.TypeChangeData.OwnerCancelRequest.ordinal()] = 2;
            } catch (java.lang.NoSuchFieldError unused2) {
            }
            try {
                iArr[com.vinfast.vehicle.caraccess.global.roleinfo.TypeChangeData.SecondDriverRemoveYourSelf.ordinal()] = 3;
            } catch (java.lang.NoSuchFieldError unused3) {
            }
            try {
                iArr[com.vinfast.vehicle.caraccess.global.roleinfo.TypeChangeData.SecondDriverRejectRequest.ordinal()] = 4;
            } catch (java.lang.NoSuchFieldError unused4) {
            }
            try {
                iArr[com.vinfast.vehicle.caraccess.global.roleinfo.TypeChangeData.SecondDriverAcceptRequest.ordinal()] = 5;
            } catch (java.lang.NoSuchFieldError unused5) {
            }
            a = iArr;
            int[] iArr2 = new int[com.vinfast.companion.core.utils.notification.NotificationCategory.values().length];
            try {
                iArr2[com.vinfast.companion.core.utils.notification.NotificationCategory.ManagerDriverReject.ordinal()] = 1;
            } catch (java.lang.NoSuchFieldError unused6) {
            }
            try {
                iArr2[com.vinfast.companion.core.utils.notification.NotificationCategory.ManagerDriverDriverLeave.ordinal()] = 2;
            } catch (java.lang.NoSuchFieldError unused7) {
            }
            try {
                iArr2[com.vinfast.companion.core.utils.notification.NotificationCategory.ManagerDriverTimeOutOwner.ordinal()] = 3;
            } catch (java.lang.NoSuchFieldError unused8) {
            }
            try {
                iArr2[com.vinfast.companion.core.utils.notification.NotificationCategory.ManagerDriverRemovedByOwner.ordinal()] = 4;
            } catch (java.lang.NoSuchFieldError unused9) {
            }
            try {
                iArr2[com.vinfast.companion.core.utils.notification.NotificationCategory.ManagerDriverOwnerCancelRequest.ordinal()] = 5;
            } catch (java.lang.NoSuchFieldError unused10) {
            }
            try {
                iArr2[com.vinfast.companion.core.utils.notification.NotificationCategory.ManagerDriverCancelByTransfer.ordinal()] = 6;
            } catch (java.lang.NoSuchFieldError unused11) {
            }
            try {
                iArr2[com.vinfast.companion.core.utils.notification.NotificationCategory.ManagerDriverTimeOutDriver.ordinal()] = 7;
            } catch (java.lang.NoSuchFieldError unused12) {
            }
            b = iArr2;
            int[] iArr3 = new int[com.vinfast.vehicle.caraccess.global.roleinfo.TypeAccountInfo.values().length];
            try {
                iArr3[com.vinfast.vehicle.caraccess.global.roleinfo.TypeAccountInfo.ConsentSecurity.ordinal()] = 1;
            } catch (java.lang.NoSuchFieldError unused13) {
            }
            try {
                iArr3[com.vinfast.vehicle.caraccess.global.roleinfo.TypeAccountInfo.BillingAddress.ordinal()] = 2;
            } catch (java.lang.NoSuchFieldError unused14) {
            }
            c = iArr3;
        }
    }

    public GLRoleInfoFragment() {
        super(new kotlin.jvm.functions.Function1() { // from class: com.vinfast.vehicle.caraccess.global.roleinfo.a
            public final java.lang.Object invoke(java.lang.Object obj) {
                return com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment.q2((android.view.LayoutInflater) obj);
            }
        });
        final kotlin.jvm.functions.Function0<androidx.fragment.app.Fragment> function0 = new kotlin.jvm.functions.Function0<androidx.fragment.app.Fragment>() { // from class: com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment$special$$inlined$viewModels$default$1
            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            {
                super(0);
            }

            /* JADX INFO: renamed from: a, reason: merged with bridge method [inline-methods] */
            public final androidx.fragment.app.Fragment invoke() {
                return this;
            }
        };
        final kotlin.Lazy lazyA = kotlin.LazyKt.a(kotlin.LazyThreadSafetyMode.NONE, new kotlin.jvm.functions.Function0<androidx.lifecycle.ViewModelStoreOwner>() { // from class: com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment$special$$inlined$viewModels$default$2
            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            {
                super(0);
            }

            /* JADX INFO: renamed from: a, reason: merged with bridge method [inline-methods] */
            public final androidx.lifecycle.ViewModelStoreOwner invoke() {
                return (androidx.lifecycle.ViewModelStoreOwner) function0.invoke();
            }
        });
        final kotlin.jvm.functions.Function0 function1 = null;
        this.viewModel = androidx.fragment.app.FragmentViewModelLazyKt.c(this, kotlin.jvm.internal.Reflection.b(com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoViewModel.class), new kotlin.jvm.functions.Function0<androidx.lifecycle.ViewModelStore>() { // from class: com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment$special$$inlined$viewModels$default$3
            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            {
                super(0);
            }

            /* JADX INFO: renamed from: a, reason: merged with bridge method [inline-methods] */
            public final androidx.lifecycle.ViewModelStore invoke() {
                return androidx.fragment.app.FragmentViewModelLazyKt.b(lazyA).getViewModelStore();
            }
        }, new kotlin.jvm.functions.Function0<androidx.lifecycle.viewmodel.CreationExtras>() { // from class: com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment$special$$inlined$viewModels$default$4
            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            {
                super(0);
            }

            /* JADX INFO: renamed from: a, reason: merged with bridge method [inline-methods] */
            public final androidx.lifecycle.viewmodel.CreationExtras invoke() {
                androidx.lifecycle.viewmodel.CreationExtras creationExtras;
                kotlin.jvm.functions.Function0 function2 = function1;
                if (function2 != null && (creationExtras = (androidx.lifecycle.viewmodel.CreationExtras) function2.invoke()) != null) {
                    return creationExtras;
                }
                androidx.lifecycle.HasDefaultViewModelProviderFactory hasDefaultViewModelProviderFactoryB = androidx.fragment.app.FragmentViewModelLazyKt.b(lazyA);
                androidx.lifecycle.HasDefaultViewModelProviderFactory hasDefaultViewModelProviderFactory = hasDefaultViewModelProviderFactoryB instanceof androidx.lifecycle.HasDefaultViewModelProviderFactory ? hasDefaultViewModelProviderFactoryB : null;
                return hasDefaultViewModelProviderFactory != null ? hasDefaultViewModelProviderFactory.getDefaultViewModelCreationExtras() : androidx.lifecycle.viewmodel.CreationExtras.Empty.c;
            }
        }, new kotlin.jvm.functions.Function0<androidx.lifecycle.ViewModelProvider.Factory>() { // from class: com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment$special$$inlined$viewModels$default$5
            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            {
                super(0);
            }

            /* JADX INFO: renamed from: a, reason: merged with bridge method [inline-methods] */
            public final androidx.lifecycle.ViewModelProvider.Factory invoke() {
                androidx.lifecycle.ViewModelProvider.Factory defaultViewModelProviderFactory;
                androidx.lifecycle.HasDefaultViewModelProviderFactory hasDefaultViewModelProviderFactoryB = androidx.fragment.app.FragmentViewModelLazyKt.b(lazyA);
                androidx.lifecycle.HasDefaultViewModelProviderFactory hasDefaultViewModelProviderFactory = hasDefaultViewModelProviderFactoryB instanceof androidx.lifecycle.HasDefaultViewModelProviderFactory ? hasDefaultViewModelProviderFactoryB : null;
                return (hasDefaultViewModelProviderFactory == null || (defaultViewModelProviderFactory = hasDefaultViewModelProviderFactory.getDefaultViewModelProviderFactory()) == null) ? this.getDefaultViewModelProviderFactory() : defaultViewModelProviderFactory;
            }
        });
        this.listItemAdapter = kotlin.LazyKt.b(new kotlin.jvm.functions.Function0() { // from class: com.vinfast.vehicle.caraccess.global.roleinfo.l
            public final java.lang.Object invoke() {
                return com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment.M2();
            }
        });
        androidx.activity.result.ActivityResultLauncher activityResultLauncherRegisterForActivityResult = registerForActivityResult(new androidx.activity.result.contract.ActivityResultContracts.StartActivityForResult(), new androidx.activity.result.ActivityResultCallback() { // from class: com.vinfast.vehicle.caraccess.global.roleinfo.n
            public final void a(java.lang.Object obj) {
                com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment.r2(this.a, (androidx.activity.result.ActivityResult) obj);
            }
        });
        kotlin.jvm.internal.Intrinsics.k(activityResultLauncherRegisterForActivityResult, "registerForActivityResult(...)");
        this.addBillingAddressResult = activityResultLauncherRegisterForActivityResult;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final kotlin.Unit A2(com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment gLRoleInfoFragment, com.vinfast.companion.vehiclekit.model.RoleInfo roleInfo) {
        if (roleInfo != null) {
            gLRoleInfoFragment.Z2(roleInfo);
            boolean z = gLRoleInfoFragment.x2().s0() && roleInfo.d() == 314;
            com.vinfast.vehicle.databinding.FragmentGlRoleInfoBinding fragmentGlRoleInfoBinding = (com.vinfast.vehicle.databinding.FragmentGlRoleInfoBinding) gLRoleInfoFragment.T1();
            androidx.appcompat.widget.AppCompatCheckBox appCompatCheckBox = fragmentGlRoleInfoBinding.e;
            kotlin.jvm.internal.Intrinsics.k(appCompatCheckBox, "cbAcceptConsent");
            appCompatCheckBox.setVisibility(z ? 0 : 8);
            fragmentGlRoleInfoBinding.c.setEnabled(!z);
        }
        return kotlin.Unit.a;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final kotlin.Unit B2(com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment gLRoleInfoFragment, com.vinfast.vehicle.caraccess.global.roleinfo.TypeChangeData typeChangeData) {
        if (typeChangeData != null) {
            int i = com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment.WhenMappings.a[typeChangeData.ordinal()];
            if (i == 1) {
                android.content.Context contextRequireContext = gLRoleInfoFragment.requireContext();
                kotlin.jvm.internal.Intrinsics.k(contextRequireContext, "requireContext(...)");
                com.vinfast.companion.core.base.ui.widget.VFToastKt.c(contextRequireContext, com.vinfast.vehicle.R.string.CA10602_driver_account_removed, com.vinfast.companion.core.base.ui.widget.ToastType.BottomSuccess, false, 4, null);
                gLRoleInfoFragment.s2();
                com.vinfast.companion.core.base.fragment.BaseFragment.t1(gLRoleInfoFragment, false, 1, null);
            } else if (i == 2) {
                com.vinfast.companion.core.base.fragment.BaseFragment.t1(gLRoleInfoFragment, false, 1, null);
            } else if (i == 3) {
                gLRoleInfoFragment.S2();
            } else if (i == 4) {
                android.content.Context contextRequireContext2 = gLRoleInfoFragment.requireContext();
                kotlin.jvm.internal.Intrinsics.k(contextRequireContext2, "requireContext(...)");
                com.vinfast.companion.core.base.ui.widget.VFToastKt.c(contextRequireContext2, com.vinfast.vehicle.R.string.CA20101_request_rejected, com.vinfast.companion.core.base.ui.widget.ToastType.BottomSuccess, false, 4, null);
                gLRoleInfoFragment.s2();
                com.vinfast.companion.vehiclekit.model.RoleInfo roleInfo = (com.vinfast.companion.vehiclekit.model.RoleInfo) gLRoleInfoFragment.x2().getRoleInfo().f();
                if (roleInfo == null || roleInfo.d() != 313) {
                    gLRoleInfoFragment.requireActivity().finish();
                } else {
                    gLRoleInfoFragment.x2().z0(true);
                    com.vinfast.companion.core.base.fragment.BaseFragment.t1(gLRoleInfoFragment, false, 1, null);
                }
            } else if (i == 5) {
                com.vinfast.vehicle.caraccess.VerifyCodeDialogFragment verifyCodeDialogFragment = gLRoleInfoFragment.dialogVerify;
                if (verifyCodeDialogFragment != null) {
                    verifyCodeDialogFragment.dismiss();
                }
                gLRoleInfoFragment.x2().A0();
                if (gLRoleInfoFragment.x2().s0()) {
                    int i2 = com.vinfast.vehicle.R.string.CA20803_driver_account_added_detailed;
                    java.lang.String strH0 = gLRoleInfoFragment.x2().h0();
                    if (strH0 == null) {
                        strH0 = gLRoleInfoFragment.getString(com.vinfast.vehicle.R.string.common_value_unknown);
                        kotlin.jvm.internal.Intrinsics.k(strH0, "getString(...)");
                    }
                    java.lang.String string = gLRoleInfoFragment.getString(i2, new java.lang.Object[]{strH0});
                    kotlin.jvm.internal.Intrinsics.k(string, "getString(...)");
                    com.vinfast.companion.core.base.ui.widget.dialog.OptionsDialogFragment.Companion companion = com.vinfast.companion.core.base.ui.widget.dialog.OptionsDialogFragment.INSTANCE;
                    androidx.fragment.app.FragmentManager childFragmentManager = gLRoleInfoFragment.getChildFragmentManager();
                    kotlin.jvm.internal.Intrinsics.k(childFragmentManager, "getChildFragmentManager(...)");
                    companion.a(childFragmentManager, (6290294 & 2) != 0 ? false : true, (6290294 & 4) != 0 ? null : null, (6290294 & 8) != 0 ? null : java.lang.Integer.valueOf(com.vinfast.vehicle.R.string.CA20803_driver_account_added), (6290294 & 16) != 0 ? null : null, (6290294 & 32) != 0 ? false : false, (6290294 & 64) != 0 ? null : string, (6290294 & 128) != 0 ? null : null, (6290294 & 256) != 0 ? null : null, (6290294 & 512) != 0 ? null : null, (6290294 & 1024) != 0 ? null : null, (6290294 & 2048) != 0 ? null : null, (6290294 & 4096) != 0 ? null : null, (6290294 & 8192) != 0 ? null : null, (6290294 & 16384) != 0 ? null : java.lang.Integer.valueOf(com.vinfast.vehicle.R.string.common_btn_ok), (6290294 & 32768) != 0 ? null : null, (6290294 & 65536) != 0 ? false : false, (6290294 & 131072) != 0 ? null : null, (6290294 & 262144) != 0 ? null : null, (6290294 & 524288) != 0 ? null : null, (6290294 & 1048576) != 0 ? null : null, (6290294 & 2097152) != 0 ? null : null, (6290294 & 4194304) != 0 ? null : null, (6290294 & 8388608) != 0 ? null : null);
                } else {
                    android.content.Context contextRequireContext3 = gLRoleInfoFragment.requireContext();
                    kotlin.jvm.internal.Intrinsics.k(contextRequireContext3, "requireContext(...)");
                    com.vinfast.companion.core.base.ui.widget.VFToastKt.c(contextRequireContext3, com.vinfast.vehicle.R.string.CA20803_driver_account_added, com.vinfast.companion.core.base.ui.widget.ToastType.BottomSuccess, false, 4, null);
                }
            }
        }
        return kotlin.Unit.a;
    }

    /* JADX INFO: Access modifiers changed from: private */
    /* JADX INFO: Thrown type has an unknown type hierarchy: kotlin.UninitializedPropertyAccessException */
    /* JADX WARN: Code duplicated, block: B:36:0x0086  */
    /* JADX WARN: Code duplicated, block: B:42:0x00aa  */
    public static final kotlin.Unit C2(com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment gLRoleInfoFragment, com.vinfast.vehicle.caraccess.global.roleinfo.ResponseError responseError) throws kotlin.UninitializedPropertyAccessException {
        com.vinfast.companion.core.base.ViewModelState.Error error;
        java.lang.String error2;
        java.lang.String error3;
        if (responseError != null) {
            int i = com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment.WhenMappings.a[responseError.getTypeChangeData().ordinal()];
            if (i == 1) {
                com.vinfast.companion.core.base.ui.widget.dialog.OptionsDialogFragment.Companion companion = com.vinfast.companion.core.base.ui.widget.dialog.OptionsDialogFragment.INSTANCE;
                androidx.fragment.app.FragmentManager childFragmentManager = gLRoleInfoFragment.getChildFragmentManager();
                kotlin.jvm.internal.Intrinsics.k(childFragmentManager, "getChildFragmentManager(...)");
                companion.a(childFragmentManager, (6290294 & 2) != 0 ? false : false, (6290294 & 4) != 0 ? null : null, (6290294 & 8) != 0 ? null : java.lang.Integer.valueOf(com.vinfast.vehicle.R.string.common_error), (6290294 & 16) != 0 ? null : null, (6290294 & 32) != 0 ? false : false, (6290294 & 64) != 0 ? null : null, (6290294 & 128) != 0 ? null : java.lang.Integer.valueOf(com.vinfast.vehicle.R.string.CA20800_failed_to_remove), (6290294 & 256) != 0 ? null : null, (6290294 & 512) != 0 ? null : null, (6290294 & 1024) != 0 ? null : java.lang.Integer.valueOf(com.vinfast.vehicle.R.string.common_btn_ok), (6290294 & 2048) != 0 ? null : null, (6290294 & 4096) != 0 ? null : null, (6290294 & 8192) != 0 ? null : null, (6290294 & 16384) != 0 ? null : null, (6290294 & 32768) != 0 ? null : java.lang.Integer.valueOf(com.vinfast.vehicle.R.drawable.ic_close_red), (6290294 & 65536) != 0 ? false : false, (6290294 & 131072) != 0 ? null : null, (6290294 & 262144) != 0 ? null : null, (6290294 & 524288) != 0 ? null : null, (6290294 & 1048576) != 0 ? null : null, (6290294 & 2097152) != 0 ? null : null, (6290294 & 4194304) != 0 ? null : null, (6290294 & 8388608) != 0 ? null : null);
            } else if (i == 2) {
                android.content.Context contextRequireContext = gLRoleInfoFragment.requireContext();
                kotlin.jvm.internal.Intrinsics.k(contextRequireContext, "requireContext(...)");
                com.vinfast.companion.core.base.ui.widget.VFToastKt.c(contextRequireContext, com.vinfast.vehicle.R.string.CA20800_failed_cancel_request, com.vinfast.companion.core.base.ui.widget.ToastType.BottomFailed, false, 4, null);
            } else if (i == 3) {
                com.vinfast.companion.core.base.ui.widget.dialog.OptionsDialogFragment.Companion companion2 = com.vinfast.companion.core.base.ui.widget.dialog.OptionsDialogFragment.INSTANCE;
                androidx.fragment.app.FragmentManager childFragmentManager2 = gLRoleInfoFragment.getChildFragmentManager();
                kotlin.jvm.internal.Intrinsics.k(childFragmentManager2, "getChildFragmentManager(...)");
                companion2.a(childFragmentManager2, (6290294 & 2) != 0 ? false : false, (6290294 & 4) != 0 ? null : null, (6290294 & 8) != 0 ? null : java.lang.Integer.valueOf(com.vinfast.vehicle.R.string.common_error), (6290294 & 16) != 0 ? null : null, (6290294 & 32) != 0 ? false : false, (6290294 & 64) != 0 ? null : null, (6290294 & 128) != 0 ? null : java.lang.Integer.valueOf(com.vinfast.vehicle.R.string.CA20800_failed_to_remove), (6290294 & 256) != 0 ? null : null, (6290294 & 512) != 0 ? null : null, (6290294 & 1024) != 0 ? null : java.lang.Integer.valueOf(com.vinfast.vehicle.R.string.common_btn_ok), (6290294 & 2048) != 0 ? null : null, (6290294 & 4096) != 0 ? null : null, (6290294 & 8192) != 0 ? null : null, (6290294 & 16384) != 0 ? null : null, (6290294 & 32768) != 0 ? null : java.lang.Integer.valueOf(com.vinfast.vehicle.R.drawable.ic_close_red), (6290294 & 65536) != 0 ? false : false, (6290294 & 131072) != 0 ? null : null, (6290294 & 262144) != 0 ? null : null, (6290294 & 524288) != 0 ? null : null, (6290294 & 1048576) != 0 ? null : null, (6290294 & 2097152) != 0 ? null : null, (6290294 & 4194304) != 0 ? null : null, (6290294 & 8388608) != 0 ? null : null);
            } else if (i != 5) {
                com.vinfast.companion.core.base.ViewModelState.Error error4 = responseError.getError();
                if (error4 != null && (error3 = error4.getError()) != null) {
                    com.vinfast.companion.core.base.ui.widget.VFSnackBarKt.k(gLRoleInfoFragment, error3, com.vinfast.companion.core.base.ui.widget.SnackbarType.Failed);
                }
            } else {
                com.vinfast.companion.core.base.ViewModelState.Error error5 = responseError.getError();
                if (kotlin.jvm.internal.Intrinsics.g(error5 != null ? error5.getCode() : null, "400522")) {
                    com.vinfast.vehicle.caraccess.VerifyCodeDialogFragment verifyCodeDialogFragment = gLRoleInfoFragment.dialogVerify;
                    if (verifyCodeDialogFragment != null) {
                        verifyCodeDialogFragment.a1();
                    }
                } else {
                    com.vinfast.vehicle.caraccess.VerifyCodeDialogFragment verifyCodeDialogFragment2 = gLRoleInfoFragment.dialogVerify;
                    if (verifyCodeDialogFragment2 == null || !verifyCodeDialogFragment2.isVisible()) {
                        error = responseError.getError();
                        if (error != null && (error2 = error.getError()) != null) {
                            com.vinfast.companion.core.base.ui.widget.VFSnackBarKt.k(gLRoleInfoFragment, error2, com.vinfast.companion.core.base.ui.widget.SnackbarType.Failed);
                        }
                    } else {
                        com.vinfast.companion.core.base.ViewModelState.Error error6 = responseError.getError();
                        if (kotlin.jvm.internal.Intrinsics.g(error6 != null ? error6.getCode() : null, "offline")) {
                            android.content.Context contextRequireContext2 = gLRoleInfoFragment.requireContext();
                            kotlin.jvm.internal.Intrinsics.k(contextRequireContext2, "requireContext(...)");
                            java.lang.String string = gLRoleInfoFragment.getString(com.vinfast.vehicle.R.string.CA20803_failed_to_accept);
                            kotlin.jvm.internal.Intrinsics.k(string, "getString(...)");
                            com.vinfast.companion.core.base.ui.widget.VFToastKt.d(contextRequireContext2, string, com.vinfast.companion.core.base.ui.widget.ToastType.BottomFailed, false, 4, null);
                        } else {
                            error = responseError.getError();
                            if (error != null) {
                                com.vinfast.companion.core.base.ui.widget.VFSnackBarKt.k(gLRoleInfoFragment, error2, com.vinfast.companion.core.base.ui.widget.SnackbarType.Failed);
                            }
                        }
                    }
                }
            }
        }
        return kotlin.Unit.a;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final kotlin.Unit D2(com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment gLRoleInfoFragment, com.vinfast.companion.core.utils.notification.NotificationCategory notificationCategory) {
        if (notificationCategory != null) {
            switch (com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment.WhenMappings.b[notificationCategory.ordinal()]) {
                case 1:
                case 2:
                case 3:
                    androidx.navigation.fragment.FragmentKt.a(gLRoleInfoFragment).Z(com.vinfast.vehicle.R.id.GLRoleManagementFragment, false);
                    break;
                case 4:
                case 5:
                case 6:
                case 7:
                    gLRoleInfoFragment.requireActivity().finish();
                    break;
            }
        }
        return kotlin.Unit.a;
    }

    /* JADX INFO: Access modifiers changed from: private */
    /* JADX INFO: Thrown type has an unknown type hierarchy: kotlin.NoWhenBranchMatchedException */
    /* JADX INFO: Thrown type has an unknown type hierarchy: kotlin.UninitializedPropertyAccessException */
    public static final kotlin.Unit E2(com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment gLRoleInfoFragment, com.vinfast.vehicle.caraccess.global.roleinfo.TypeAccountInfo typeAccountInfo) throws kotlin.NoWhenBranchMatchedException, kotlin.UninitializedPropertyAccessException {
        com.vinfast.companion.core.base.ViewModelState.Error dataError;
        int i = typeAccountInfo == null ? -1 : com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment.WhenMappings.c[typeAccountInfo.ordinal()];
        if (i == 1) {
            u2(gLRoleInfoFragment, false, 1, null);
        } else if (i == 2) {
            gLRoleInfoFragment.t2(false);
        } else if (typeAccountInfo != null && (dataError = typeAccountInfo.getDataError()) != null) {
            gLRoleInfoFragment.y2(dataError);
        }
        return kotlin.Unit.a;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void G2(com.vinfast.vehicle.databinding.FragmentGlRoleInfoBinding fragmentGlRoleInfoBinding, android.widget.CompoundButton compoundButton, boolean z) {
        kotlin.jvm.internal.Intrinsics.l(compoundButton, "<unused var>");
        fragmentGlRoleInfoBinding.c.setEnabled(z);
    }

    /* JADX INFO: Access modifiers changed from: private */
    /* JADX INFO: Thrown type has an unknown type hierarchy: kotlin.NoWhenBranchMatchedException */
    public static final kotlin.Unit H2(com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment gLRoleInfoFragment, android.view.View view) throws kotlin.NoWhenBranchMatchedException {
        kotlin.jvm.internal.Intrinsics.l(view, "it");
        com.vinfast.companion.vehiclekit.model.RoleInfo roleInfo = (com.vinfast.companion.vehiclekit.model.RoleInfo) gLRoleInfoFragment.x2().getRoleInfo().f();
        java.lang.Integer numValueOf = roleInfo != null ? java.lang.Integer.valueOf(roleInfo.d()) : null;
        if (numValueOf != null && numValueOf.intValue() == 313) {
            gLRoleInfoFragment.X2();
        } else if (numValueOf != null && numValueOf.intValue() == 314) {
            if (gLRoleInfoFragment.x2().s0()) {
                gLRoleInfoFragment.x2().Z();
            } else {
                u2(gLRoleInfoFragment, false, 1, null);
            }
        }
        return kotlin.Unit.a;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final kotlin.Unit I2(final com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment gLRoleInfoFragment, android.view.View view) {
        kotlin.jvm.internal.Intrinsics.l(view, "it");
        com.vinfast.companion.vehiclekit.model.RoleInfo roleInfo = (com.vinfast.companion.vehiclekit.model.RoleInfo) gLRoleInfoFragment.x2().getRoleInfo().f();
        java.lang.Integer numValueOf = roleInfo != null ? java.lang.Integer.valueOf(roleInfo.d()) : null;
        if (numValueOf != null && numValueOf.intValue() == 310) {
            androidx.navigation.fragment.FragmentKt.a(gLRoleInfoFragment).Q(com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragmentDirections.INSTANCE.a(null, 10));
        } else if (numValueOf != null && numValueOf.intValue() == 312) {
            com.vinfast.companion.core.base.ui.widget.dialog.OptionsDialogFragment.Companion companion = com.vinfast.companion.core.base.ui.widget.dialog.OptionsDialogFragment.INSTANCE;
            androidx.fragment.app.FragmentManager childFragmentManager = gLRoleInfoFragment.getChildFragmentManager();
            kotlin.jvm.internal.Intrinsics.k(childFragmentManager, "getChildFragmentManager(...)");
            companion.a(childFragmentManager, (6290294 & 2) != 0 ? false : false, (6290294 & 4) != 0 ? null : null, (6290294 & 8) != 0 ? null : java.lang.Integer.valueOf(com.vinfast.vehicle.R.string.CA20800_remove_as_secondary), (6290294 & 16) != 0 ? null : null, (6290294 & 32) != 0 ? false : false, (6290294 & 64) != 0 ? null : null, (6290294 & 128) != 0 ? null : java.lang.Integer.valueOf(com.vinfast.vehicle.R.string.CA20800_this_will_remove_you), (6290294 & 256) != 0 ? null : null, (6290294 & 512) != 0 ? null : null, (6290294 & 1024) != 0 ? null : null, (6290294 & 2048) != 0 ? null : null, (6290294 & 4096) != 0 ? null : java.lang.Integer.valueOf(com.vinfast.vehicle.R.string.common_btn_remove), (6290294 & 8192) != 0 ? null : null, (6290294 & 16384) != 0 ? null : java.lang.Integer.valueOf(com.vinfast.vehicle.R.string.common_btn_cancel), (6290294 & 32768) != 0 ? null : null, (6290294 & 65536) != 0 ? false : false, (6290294 & 131072) != 0 ? null : null, (6290294 & 262144) != 0 ? null : null, (6290294 & 524288) != 0 ? null : new kotlin.jvm.functions.Function0() { // from class: com.vinfast.vehicle.caraccess.global.roleinfo.g
                public final java.lang.Object invoke() {
                    return com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment.J2(this.a);
                }
            }, (6290294 & 1048576) != 0 ? null : null, (6290294 & 2097152) != 0 ? null : null, (6290294 & 4194304) != 0 ? null : null, (6290294 & 8388608) != 0 ? null : null);
        } else if (numValueOf != null && numValueOf.intValue() == 315) {
            gLRoleInfoFragment.Q2();
        } else if (numValueOf != null && numValueOf.intValue() == 314) {
            java.lang.String str = gLRoleInfoFragment.getString(com.vinfast.vehicle.R.string.CA20803_you_wont_have) + "\n" + gLRoleInfoFragment.getString(com.vinfast.vehicle.R.string.CA20803_are_you_sure_reject_request);
            com.vinfast.companion.core.base.ui.widget.dialog.OptionsDialogFragment.Companion companion2 = com.vinfast.companion.core.base.ui.widget.dialog.OptionsDialogFragment.INSTANCE;
            androidx.fragment.app.FragmentManager childFragmentManager2 = gLRoleInfoFragment.getChildFragmentManager();
            kotlin.jvm.internal.Intrinsics.k(childFragmentManager2, "getChildFragmentManager(...)");
            companion2.a(childFragmentManager2, (6290294 & 2) != 0 ? false : false, (6290294 & 4) != 0 ? null : null, (6290294 & 8) != 0 ? null : java.lang.Integer.valueOf(com.vinfast.vehicle.R.string.CA20803_confirm_to_reject), (6290294 & 16) != 0 ? null : null, (6290294 & 32) != 0 ? false : false, (6290294 & 64) != 0 ? null : str, (6290294 & 128) != 0 ? null : null, (6290294 & 256) != 0 ? null : null, (6290294 & 512) != 0 ? null : null, (6290294 & 1024) != 0 ? null : null, (6290294 & 2048) != 0 ? null : null, (6290294 & 4096) != 0 ? null : java.lang.Integer.valueOf(com.vinfast.vehicle.R.string.CA20803_yes_reject), (6290294 & 8192) != 0 ? null : null, (6290294 & 16384) != 0 ? null : java.lang.Integer.valueOf(com.vinfast.vehicle.R.string.common_btn_no), (6290294 & 32768) != 0 ? null : null, (6290294 & 65536) != 0 ? false : false, (6290294 & 131072) != 0 ? null : null, (6290294 & 262144) != 0 ? null : null, (6290294 & 524288) != 0 ? null : new kotlin.jvm.functions.Function0() { // from class: com.vinfast.vehicle.caraccess.global.roleinfo.h
                public final java.lang.Object invoke() {
                    return com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment.K2(this.a);
                }
            }, (6290294 & 1048576) != 0 ? null : null, (6290294 & 2097152) != 0 ? null : null, (6290294 & 4194304) != 0 ? null : null, (6290294 & 8388608) != 0 ? null : null);
        }
        return kotlin.Unit.a;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final kotlin.Unit J2(com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment gLRoleInfoFragment) {
        gLRoleInfoFragment.typeCheckAuth = "type_driver_leave";
        gLRoleInfoFragment.O2();
        return kotlin.Unit.a;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final kotlin.Unit K2(com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment gLRoleInfoFragment) {
        gLRoleInfoFragment.typeCheckAuth = "type_driver_reject";
        gLRoleInfoFragment.x2().W("12345", "REJECTED");
        return kotlin.Unit.a;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final kotlin.Unit L2(com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment gLRoleInfoFragment, android.view.View view) {
        java.lang.String strL;
        kotlin.jvm.internal.Intrinsics.l(view, "it");
        com.vinfast.companion.vehiclekit.model.RoleInfo roleInfo = (com.vinfast.companion.vehiclekit.model.RoleInfo) gLRoleInfoFragment.x2().getRoleInfo().f();
        if (roleInfo != null && (strL = roleInfo.l()) != null) {
            android.content.Context contextRequireContext = gLRoleInfoFragment.requireContext();
            kotlin.jvm.internal.Intrinsics.k(contextRequireContext, "requireContext(...)");
            com.vinfast.companion.core.extensions.ContextExtensionKt.b(contextRequireContext, strL, null, null, java.lang.Integer.valueOf(com.vinfast.vehicle.R.string.CA20803_verification_code_copied), null, 22, null);
        }
        return kotlin.Unit.a;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final com.vinfast.companion.core.base.ui.adapter.ItemCustomAdapter M2() {
        return new com.vinfast.companion.core.base.ui.adapter.ItemCustomAdapter(true, null, null, null, null, new kotlin.jvm.functions.Function1() { // from class: com.vinfast.vehicle.caraccess.global.roleinfo.d
            public final java.lang.Object invoke(java.lang.Object obj) {
                return com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment.N2((com.vinfast.companion.core.base.ui.model.ItemCustom) obj);
            }
        }, null, null, 222, null);
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final kotlin.Unit N2(com.vinfast.companion.core.base.ui.model.ItemCustom itemCustom) {
        kotlin.jvm.internal.Intrinsics.l(itemCustom, "it");
        return kotlin.Unit.a;
    }

    private final void O2() {
        com.vinfast.companion.core.managers.IAccountAuthenticator.b(v2(), this, null, null, new com.vinfast.companion.core.managers.IAccountAuthenticator.BiometricDialogType.RequestAuthentication(com.vinfast.companion.core.managers.IAccountAuthenticator.AuthenticationMode.VerifyAccount), null, false, false, new kotlin.jvm.functions.Function1() { // from class: com.vinfast.vehicle.caraccess.global.roleinfo.k
            public final java.lang.Object invoke(java.lang.Object obj) {
                return com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment.P2(this.a, (com.vinfast.companion.core.managers.IAccountAuthenticator.VFAuthenticationResult) obj);
            }
        }, null, null, null, null, false, 8054, null);
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final kotlin.Unit P2(com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment gLRoleInfoFragment, com.vinfast.companion.core.managers.IAccountAuthenticator.VFAuthenticationResult vFAuthenticationResult) {
        kotlin.jvm.internal.Intrinsics.l(vFAuthenticationResult, "result");
        if (vFAuthenticationResult instanceof com.vinfast.companion.core.managers.IAccountAuthenticator.VFAuthenticationResult.AuthSuccess) {
            java.lang.String str = gLRoleInfoFragment.typeCheckAuth;
            if (kotlin.jvm.internal.Intrinsics.g(str, "type_remove_driver")) {
                gLRoleInfoFragment.x2().w0(com.vinfast.vehicle.caraccess.global.roleinfo.TypeChangeData.OwnerRemoveSecondDriver);
            } else if (kotlin.jvm.internal.Intrinsics.g(str, "type_driver_leave")) {
                gLRoleInfoFragment.x2().w0(com.vinfast.vehicle.caraccess.global.roleinfo.TypeChangeData.SecondDriverRemoveYourSelf);
            }
        }
        return kotlin.Unit.a;
    }

    private final void Q2() {
        java.lang.String strH;
        android.content.Context context = getContext();
        if (context == null || (strH = com.vinfast.companion.core.extensions.ContextExtensionKt.h(context, x2().g0(), null, 2, null)) == null) {
            strH = "";
        }
        java.lang.String str = strH;
        java.lang.String strL0 = x2().l0();
        int i = (strL0 == null || strL0.length() == 0) ? com.vinfast.vehicle.R.string.common_vin_colon : com.vinfast.vehicle.R.string.CA20800_license_plate_number;
        if (strL0 == null || strL0.length() == 0) {
            strL0 = x2().h0();
        }
        java.lang.String str2 = strL0;
        int i2 = i;
        com.vinfast.vehicle.caraccess.global.dialog.ConfirmToRemoveRoleDialogFragment.Companion companion = com.vinfast.vehicle.caraccess.global.dialog.ConfirmToRemoveRoleDialogFragment.INSTANCE;
        androidx.fragment.app.FragmentManager childFragmentManager = getChildFragmentManager();
        kotlin.jvm.internal.Intrinsics.k(childFragmentManager, "getChildFragmentManager(...)");
        companion.a(childFragmentManager, str, str2, java.lang.Integer.valueOf(i2), new kotlin.jvm.functions.Function1() { // from class: com.vinfast.vehicle.caraccess.global.roleinfo.m
            public final java.lang.Object invoke(java.lang.Object obj) {
                return com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment.R2(this.a, ((java.lang.Boolean) obj).booleanValue());
            }
        });
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final kotlin.Unit R2(com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment gLRoleInfoFragment, boolean z) {
        if (z) {
            gLRoleInfoFragment.typeCheckAuth = "type_remove_driver";
            gLRoleInfoFragment.O2();
        }
        return kotlin.Unit.a;
    }

    private final void S2() {
        java.lang.String strH;
        android.content.Context context = getContext();
        if (context == null || (strH = com.vinfast.companion.core.extensions.ContextExtensionKt.h(context, x2().g0(), null, 2, null)) == null) {
            strH = "";
        }
        com.vinfast.companion.core.base.ui.widget.dialog.OptionsDialogFragment.Companion companion = com.vinfast.companion.core.base.ui.widget.dialog.OptionsDialogFragment.INSTANCE;
        androidx.fragment.app.FragmentManager childFragmentManager = getChildFragmentManager();
        kotlin.jvm.internal.Intrinsics.k(childFragmentManager, "getChildFragmentManager(...)");
        companion.a(childFragmentManager, (6290294 & 2) != 0 ? false : true, (6290294 & 4) != 0 ? null : null, (6290294 & 8) != 0 ? null : java.lang.Integer.valueOf(com.vinfast.vehicle.R.string.CA20800_removed_successfully), (6290294 & 16) != 0 ? null : null, (6290294 & 32) != 0 ? false : false, (6290294 & 64) != 0 ? null : getString(com.vinfast.vehicle.R.string.CA20800_you_successfully_removed, new java.lang.Object[]{strH}), (6290294 & 128) != 0 ? null : null, (6290294 & 256) != 0 ? null : null, (6290294 & 512) != 0 ? null : null, (6290294 & 1024) != 0 ? null : java.lang.Integer.valueOf(com.vinfast.vehicle.R.string.common_btn_close), (6290294 & 2048) != 0 ? null : null, (6290294 & 4096) != 0 ? null : null, (6290294 & 8192) != 0 ? null : null, (6290294 & 16384) != 0 ? null : null, (6290294 & 32768) != 0 ? null : null, (6290294 & 65536) != 0 ? false : false, (6290294 & 131072) != 0 ? null : null, (6290294 & 262144) != 0 ? null : null, (6290294 & 524288) != 0 ? null : null, (6290294 & 1048576) != 0 ? null : null, (6290294 & 2097152) != 0 ? null : new kotlin.jvm.functions.Function0() { // from class: com.vinfast.vehicle.caraccess.global.roleinfo.i
            public final java.lang.Object invoke() {
                return com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment.T2(this.a);
            }
        }, (6290294 & 4194304) != 0 ? null : null, (6290294 & 8388608) != 0 ? null : null);
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final kotlin.Unit T2(com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment gLRoleInfoFragment) {
        gLRoleInfoFragment.requireActivity().finish();
        return kotlin.Unit.a;
    }

    private final void U2() {
        com.vinfast.vehicle.caraccess.VerifyCodeDialogFragment.Companion companion = com.vinfast.vehicle.caraccess.VerifyCodeDialogFragment.INSTANCE;
        androidx.fragment.app.FragmentManager childFragmentManager = getChildFragmentManager();
        kotlin.jvm.internal.Intrinsics.k(childFragmentManager, "getChildFragmentManager(...)");
        this.dialogVerify = companion.a(childFragmentManager, true, new kotlin.jvm.functions.Function1() { // from class: com.vinfast.vehicle.caraccess.global.roleinfo.e
            public final java.lang.Object invoke(java.lang.Object obj) {
                return com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment.V2(this.a, (java.lang.String) obj);
            }
        }, new kotlin.jvm.functions.Function0() { // from class: com.vinfast.vehicle.caraccess.global.roleinfo.f
            public final java.lang.Object invoke() {
                return com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment.W2(this.a);
            }
        });
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final kotlin.Unit V2(com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment gLRoleInfoFragment, java.lang.String str) {
        kotlin.jvm.internal.Intrinsics.l(str, "it");
        gLRoleInfoFragment.x2().W(str, "APPROVED");
        return kotlin.Unit.a;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final kotlin.Unit W2(com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment gLRoleInfoFragment) {
        gLRoleInfoFragment.dialogVerify = null;
        return kotlin.Unit.a;
    }

    private final void X2() {
        com.vinfast.companion.core.base.ui.widget.dialog.OptionsDialogFragment.Companion companion = com.vinfast.companion.core.base.ui.widget.dialog.OptionsDialogFragment.INSTANCE;
        androidx.fragment.app.FragmentManager childFragmentManager = getChildFragmentManager();
        kotlin.jvm.internal.Intrinsics.k(childFragmentManager, "getChildFragmentManager(...)");
        companion.a(childFragmentManager, (6290294 & 2) != 0 ? false : false, (6290294 & 4) != 0 ? null : null, (6290294 & 8) != 0 ? null : java.lang.Integer.valueOf(com.vinfast.vehicle.R.string.common_confirm_cancellation), (6290294 & 16) != 0 ? null : null, (6290294 & 32) != 0 ? false : false, (6290294 & 64) != 0 ? null : null, (6290294 & 128) != 0 ? null : java.lang.Integer.valueOf(com.vinfast.vehicle.R.string.CA20803_are_you_sure_cancel_driver), (6290294 & 256) != 0 ? null : null, (6290294 & 512) != 0 ? null : null, (6290294 & 1024) != 0 ? null : null, (6290294 & 2048) != 0 ? null : null, (6290294 & 4096) != 0 ? null : java.lang.Integer.valueOf(com.vinfast.vehicle.R.string.CA20803_yes_cancel_it), (6290294 & 8192) != 0 ? null : null, (6290294 & 16384) != 0 ? null : java.lang.Integer.valueOf(com.vinfast.vehicle.R.string.common_btn_no), (6290294 & 32768) != 0 ? null : null, (6290294 & 65536) != 0 ? false : false, (6290294 & 131072) != 0 ? null : null, (6290294 & 262144) != 0 ? null : null, (6290294 & 524288) != 0 ? null : new kotlin.jvm.functions.Function0() { // from class: com.vinfast.vehicle.caraccess.global.roleinfo.j
            public final java.lang.Object invoke() {
                return com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment.Y2(this.a);
            }
        }, (6290294 & 1048576) != 0 ? null : null, (6290294 & 2097152) != 0 ? null : null, (6290294 & 4194304) != 0 ? null : null, (6290294 & 8388608) != 0 ? null : null);
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final kotlin.Unit Y2(com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment gLRoleInfoFragment) {
        gLRoleInfoFragment.x2().w0(com.vinfast.vehicle.caraccess.global.roleinfo.TypeChangeData.OwnerCancelRequest);
        return kotlin.Unit.a;
    }

    private final void Z2(com.vinfast.companion.vehiclekit.model.RoleInfo roleInfo) {
        java.lang.String strH = roleInfo.h();
        if (strH != null) {
            if (roleInfo.d() == 310 || roleInfo.d() == 316 || roleInfo.d() == 311 || roleInfo.d() == 312 || roleInfo.d() == 314) {
                com.vinfast.companion.core.utils.imageUtis.ImageUtils imageUtils = com.vinfast.companion.core.utils.imageUtis.ImageUtils.a;
                android.widget.ImageView imageView = ((com.vinfast.vehicle.databinding.FragmentGlRoleInfoBinding) T1()).f;
                kotlin.jvm.internal.Intrinsics.k(imageView, "ivAvatar");
                com.vinfast.companion.core.utils.imageUtis.ImageUtils.j(imageUtils, imageView, strH, com.vinfast.vehicle.R.drawable.circle_background_avatar, null, 8, null);
            }
            kotlin.Unit unit = kotlin.Unit.a;
        }
        java.util.ArrayList arrayList = new java.util.ArrayList();
        com.vinfast.companion.core.utils.ItemCustomUtils.Companion companion = com.vinfast.companion.core.utils.ItemCustomUtils.INSTANCE;
        int i = com.vinfast.vehicle.R.string.common_full_name;
        arrayList.add(com.vinfast.companion.core.utils.ItemCustomUtils.Companion.b(companion, "item_name", null, java.lang.Integer.valueOf(i), false, false, roleInfo.j(), null, null, false, false, 0, 0, 0, 101, false, false, false, false, false, null, null, null, false, false, null, null, false, null, null, null, false, false, false, false, null, -10559534, 7, null));
        int i2 = com.vinfast.vehicle.R.string.common_email_address;
        arrayList.add(com.vinfast.companion.core.utils.ItemCustomUtils.Companion.b(companion, "item_email", null, java.lang.Integer.valueOf(i2), false, false, roleInfo.f(), null, null, false, false, 0, 0, 0, 102, false, false, false, false, false, null, null, null, false, false, null, null, false, null, null, null, false, false, false, false, null, -10493998, 7, null));
        switch (roleInfo.d()) {
            case 309:
            case 310:
            case 316:
                int i3 = com.vinfast.vehicle.R.string.CA20802_role;
                int i4 = com.vinfast.vehicle.R.string.common_role_owner;
                arrayList.add(com.vinfast.companion.core.utils.ItemCustomUtils.Companion.b(companion, "item_role", null, java.lang.Integer.valueOf(i3), false, false, getString(i4), null, null, false, false, 0, 0, 0, 103, false, false, false, false, false, null, null, null, false, false, null, null, false, null, null, null, false, false, false, false, null, -10493998, 7, null));
                com.vinfast.companion.core.base.ui.widget.CommonToolbar commonToolbarS0 = com.vinfast.companion.core.base.fragment.BaseFragment.S0(this, null, 1, null);
                if (commonToolbarS0 != null) {
                    commonToolbarS0.setTitleText(getString(i4));
                    kotlin.Unit unit2 = kotlin.Unit.a;
                }
                com.vinfast.vehicle.databinding.FragmentGlRoleInfoBinding fragmentGlRoleInfoBinding = (com.vinfast.vehicle.databinding.FragmentGlRoleInfoBinding) T1();
                if (roleInfo.d() == 310 && x2().t0()) {
                    android.widget.LinearLayout linearLayout = fragmentGlRoleInfoBinding.j;
                    kotlin.jvm.internal.Intrinsics.k(linearLayout, "viewAction");
                    com.vinfast.companion.core.extensions.ViewExtensionKt.S(linearLayout);
                    androidx.appcompat.widget.AppCompatTextView appCompatTextView = fragmentGlRoleInfoBinding.c;
                    kotlin.jvm.internal.Intrinsics.k(appCompatTextView, "btnPrimaryAction");
                    com.vinfast.companion.core.extensions.ViewExtensionKt.m(appCompatTextView);
                    androidx.appcompat.widget.AppCompatTextView appCompatTextView2 = fragmentGlRoleInfoBinding.d;
                    kotlin.jvm.internal.Intrinsics.k(appCompatTextView2, "btnSecondaryAction");
                    com.vinfast.companion.core.extensions.ViewExtensionKt.S(appCompatTextView2);
                    fragmentGlRoleInfoBinding.d.setText(com.vinfast.vehicle.R.string.feature_name_transfer_owner_control);
                } else {
                    android.widget.LinearLayout linearLayout2 = fragmentGlRoleInfoBinding.j;
                    kotlin.jvm.internal.Intrinsics.k(linearLayout2, "viewAction");
                    com.vinfast.companion.core.extensions.ViewExtensionKt.m(linearLayout2);
                }
                android.widget.LinearLayout linearLayout3 = fragmentGlRoleInfoBinding.k;
                kotlin.jvm.internal.Intrinsics.k(linearLayout3, "viewVerifyCode");
                com.vinfast.companion.core.extensions.ViewExtensionKt.m(linearLayout3);
                break;
            case 311:
                int i5 = com.vinfast.vehicle.R.string.CA20802_role;
                int i6 = com.vinfast.vehicle.R.string.common_role_primary_driver;
                arrayList.add(com.vinfast.companion.core.utils.ItemCustomUtils.Companion.b(companion, "item_role", null, java.lang.Integer.valueOf(i5), false, false, getString(i6), null, null, false, false, 0, 0, 0, 103, false, false, false, false, false, null, null, null, false, false, null, null, false, null, null, null, false, false, false, false, null, -10493998, 7, null));
                com.vinfast.companion.core.base.ui.widget.CommonToolbar commonToolbarS1 = com.vinfast.companion.core.base.fragment.BaseFragment.S0(this, null, 1, null);
                if (commonToolbarS1 != null) {
                    commonToolbarS1.setTitleText(getString(i6));
                    kotlin.Unit unit3 = kotlin.Unit.a;
                }
                com.vinfast.vehicle.databinding.FragmentGlRoleInfoBinding fragmentGlRoleInfoBinding2 = (com.vinfast.vehicle.databinding.FragmentGlRoleInfoBinding) T1();
                android.widget.LinearLayout linearLayout4 = fragmentGlRoleInfoBinding2.j;
                kotlin.jvm.internal.Intrinsics.k(linearLayout4, "viewAction");
                com.vinfast.companion.core.extensions.ViewExtensionKt.m(linearLayout4);
                android.widget.LinearLayout linearLayout5 = fragmentGlRoleInfoBinding2.k;
                kotlin.jvm.internal.Intrinsics.k(linearLayout5, "viewVerifyCode");
                com.vinfast.companion.core.extensions.ViewExtensionKt.m(linearLayout5);
                break;
            case 312:
            case 315:
                int i7 = com.vinfast.vehicle.R.string.CA20802_role;
                int i8 = com.vinfast.vehicle.R.string.common_role_seconday_driver;
                arrayList.add(com.vinfast.companion.core.utils.ItemCustomUtils.Companion.b(companion, "item_role", null, java.lang.Integer.valueOf(i7), false, false, getString(i8), null, null, false, false, 0, 0, 0, 102, false, false, false, false, false, null, null, null, false, false, null, null, false, null, null, null, false, false, false, false, null, -10493998, 7, null));
                java.lang.String string = getString(com.vinfast.vehicle.R.string.common_unknown);
                kotlin.jvm.internal.Intrinsics.k(string, "getString(...)");
                java.lang.Long lB = roleInfo.b();
                if (lB != null) {
                    long jLongValue = lB.longValue();
                    com.vinfast.companion.core.utils.unitconvert.CAppUnitConverter cAppUnitConverter = com.vinfast.companion.core.utils.unitconvert.CAppUnitConverter.a;
                    java.util.Date dateB0 = com.vinfast.companion.core.utils.TimeUtils.a.B0(java.lang.Long.valueOf(jLongValue));
                    android.content.Context contextRequireContext = requireContext();
                    kotlin.jvm.internal.Intrinsics.k(contextRequireContext, "requireContext(...)");
                    string = cAppUnitConverter.f(dateB0, com.vinfast.companion.core.utils.localehelper.LocaleHelperExtensionsKt.b(contextRequireContext));
                    kotlin.Unit unit4 = kotlin.Unit.a;
                }
                arrayList.add(com.vinfast.companion.core.utils.ItemCustomUtils.Companion.b(companion, "item_active_time", null, java.lang.Integer.valueOf(com.vinfast.vehicle.R.string.CA20803_activation_time), false, false, string, null, null, false, false, 0, 0, 0, 103, false, false, false, false, false, null, null, null, false, false, null, null, false, null, null, null, false, false, false, false, null, -10493998, 7, null));
                com.vinfast.companion.core.base.ui.widget.CommonToolbar commonToolbarS2 = com.vinfast.companion.core.base.fragment.BaseFragment.S0(this, null, 1, null);
                if (commonToolbarS2 != null) {
                    commonToolbarS2.setTitleText(getString(i8));
                    kotlin.Unit unit5 = kotlin.Unit.a;
                }
                com.vinfast.vehicle.databinding.FragmentGlRoleInfoBinding fragmentGlRoleInfoBinding3 = (com.vinfast.vehicle.databinding.FragmentGlRoleInfoBinding) T1();
                android.widget.LinearLayout linearLayout6 = fragmentGlRoleInfoBinding3.j;
                kotlin.jvm.internal.Intrinsics.k(linearLayout6, "viewAction");
                com.vinfast.companion.core.extensions.ViewExtensionKt.S(linearLayout6);
                androidx.appcompat.widget.AppCompatTextView appCompatTextView3 = fragmentGlRoleInfoBinding3.c;
                kotlin.jvm.internal.Intrinsics.k(appCompatTextView3, "btnPrimaryAction");
                com.vinfast.companion.core.extensions.ViewExtensionKt.m(appCompatTextView3);
                androidx.appcompat.widget.AppCompatTextView appCompatTextView4 = fragmentGlRoleInfoBinding3.d;
                kotlin.jvm.internal.Intrinsics.k(appCompatTextView4, "btnSecondaryAction");
                com.vinfast.companion.core.extensions.ViewExtensionKt.S(appCompatTextView4);
                android.widget.LinearLayout linearLayout7 = fragmentGlRoleInfoBinding3.k;
                kotlin.jvm.internal.Intrinsics.k(linearLayout7, "viewVerifyCode");
                com.vinfast.companion.core.extensions.ViewExtensionKt.m(linearLayout7);
                fragmentGlRoleInfoBinding3.d.setText(com.vinfast.vehicle.R.string.common_btn_remove);
                break;
            case 313:
                int i9 = com.vinfast.vehicle.R.string.CA20802_role;
                arrayList.add(com.vinfast.companion.core.utils.ItemCustomUtils.Companion.b(companion, "item_role", null, java.lang.Integer.valueOf(i9), false, false, getString(com.vinfast.vehicle.R.string.common_role_pending_driver), null, null, false, false, 0, 0, 0, 102, false, false, false, false, false, null, null, null, false, false, null, null, false, null, null, null, false, false, false, false, null, -10493998, 7, null));
                int i10 = com.vinfast.vehicle.R.string.common_unknown;
                java.lang.String string2 = getString(i10);
                kotlin.jvm.internal.Intrinsics.k(string2, "getString(...)");
                java.lang.Long lC = roleInfo.c();
                if (lC != null) {
                    long jLongValue2 = lC.longValue();
                    com.vinfast.companion.core.utils.unitconvert.CAppUnitConverter cAppUnitConverter2 = com.vinfast.companion.core.utils.unitconvert.CAppUnitConverter.a;
                    java.util.Date dateB1 = com.vinfast.companion.core.utils.TimeUtils.a.B0(java.lang.Long.valueOf(jLongValue2));
                    android.content.Context contextRequireContext2 = requireContext();
                    kotlin.jvm.internal.Intrinsics.k(contextRequireContext2, "requireContext(...)");
                    string2 = cAppUnitConverter2.f(dateB1, com.vinfast.companion.core.utils.localehelper.LocaleHelperExtensionsKt.b(contextRequireContext2));
                    kotlin.Unit unit6 = kotlin.Unit.a;
                }
                arrayList.add(com.vinfast.companion.core.utils.ItemCustomUtils.Companion.b(companion, "item_active_time", null, java.lang.Integer.valueOf(com.vinfast.vehicle.R.string.CA20803_request_expires_on), false, false, string2, null, null, false, false, 0, 0, 0, 103, false, false, false, false, false, null, null, null, false, false, null, null, false, null, null, null, false, false, false, false, null, -10493998, 7, null));
                com.vinfast.companion.core.base.ui.widget.CommonToolbar commonToolbarS3 = com.vinfast.companion.core.base.fragment.BaseFragment.S0(this, null, 1, null);
                if (commonToolbarS3 != null) {
                    commonToolbarS3.setTitleText(getString(com.vinfast.vehicle.R.string.common_role_seconday_driver));
                    kotlin.Unit unit7 = kotlin.Unit.a;
                }
                com.vinfast.vehicle.databinding.FragmentGlRoleInfoBinding fragmentGlRoleInfoBinding4 = (com.vinfast.vehicle.databinding.FragmentGlRoleInfoBinding) T1();
                android.widget.LinearLayout linearLayout8 = fragmentGlRoleInfoBinding4.j;
                kotlin.jvm.internal.Intrinsics.k(linearLayout8, "viewAction");
                com.vinfast.companion.core.extensions.ViewExtensionKt.S(linearLayout8);
                androidx.appcompat.widget.AppCompatTextView appCompatTextView5 = fragmentGlRoleInfoBinding4.c;
                kotlin.jvm.internal.Intrinsics.k(appCompatTextView5, "btnPrimaryAction");
                com.vinfast.companion.core.extensions.ViewExtensionKt.S(appCompatTextView5);
                androidx.appcompat.widget.AppCompatTextView appCompatTextView6 = fragmentGlRoleInfoBinding4.d;
                kotlin.jvm.internal.Intrinsics.k(appCompatTextView6, "btnSecondaryAction");
                com.vinfast.companion.core.extensions.ViewExtensionKt.m(appCompatTextView6);
                fragmentGlRoleInfoBinding4.c.setText(com.vinfast.vehicle.R.string.CA20803_cancel_request);
                android.widget.LinearLayout linearLayout9 = fragmentGlRoleInfoBinding4.k;
                kotlin.jvm.internal.Intrinsics.k(linearLayout9, "viewVerifyCode");
                com.vinfast.companion.core.extensions.ViewExtensionKt.S(linearLayout9);
                androidx.appcompat.widget.AppCompatTextView appCompatTextView7 = fragmentGlRoleInfoBinding4.i;
                java.lang.String strL = roleInfo.l();
                if (strL == null) {
                    strL = getString(i10);
                    kotlin.jvm.internal.Intrinsics.k(strL, "getString(...)");
                }
                appCompatTextView7.setText(strL);
                break;
            case 314:
                int i11 = com.vinfast.vehicle.R.string.CA20802_role;
                arrayList.add(com.vinfast.companion.core.utils.ItemCustomUtils.Companion.b(companion, "item_role", null, java.lang.Integer.valueOf(i11), false, false, getString(com.vinfast.vehicle.R.string.common_role_pending_driver), null, null, false, false, 0, 0, 0, 102, false, false, false, false, false, null, null, null, false, false, null, null, false, null, null, null, false, false, false, false, null, -10493998, 7, null));
                java.lang.String string3 = getString(com.vinfast.vehicle.R.string.common_unknown);
                kotlin.jvm.internal.Intrinsics.k(string3, "getString(...)");
                java.lang.Long lC2 = roleInfo.c();
                if (lC2 != null) {
                    long jLongValue3 = lC2.longValue();
                    com.vinfast.companion.core.utils.unitconvert.CAppUnitConverter cAppUnitConverter3 = com.vinfast.companion.core.utils.unitconvert.CAppUnitConverter.a;
                    java.util.Date dateB2 = com.vinfast.companion.core.utils.TimeUtils.a.B0(java.lang.Long.valueOf(jLongValue3));
                    android.content.Context contextRequireContext3 = requireContext();
                    kotlin.jvm.internal.Intrinsics.k(contextRequireContext3, "requireContext(...)");
                    string3 = cAppUnitConverter3.f(dateB2, com.vinfast.companion.core.utils.localehelper.LocaleHelperExtensionsKt.b(contextRequireContext3));
                    kotlin.Unit unit8 = kotlin.Unit.a;
                }
                arrayList.add(com.vinfast.companion.core.utils.ItemCustomUtils.Companion.b(companion, "item_active_time", null, java.lang.Integer.valueOf(com.vinfast.vehicle.R.string.CA20803_request_expires_on), false, false, string3, null, null, false, false, 0, 0, 0, 103, false, false, false, false, false, null, null, null, false, false, null, null, false, null, null, null, false, false, false, false, null, -10493998, 7, null));
                com.vinfast.companion.core.base.ui.widget.CommonToolbar commonToolbarS4 = com.vinfast.companion.core.base.fragment.BaseFragment.S0(this, null, 1, null);
                if (commonToolbarS4 != null) {
                    commonToolbarS4.setTitleText(getString(com.vinfast.vehicle.R.string.common_role_seconday_driver));
                    kotlin.Unit unit9 = kotlin.Unit.a;
                }
                com.vinfast.vehicle.databinding.FragmentGlRoleInfoBinding fragmentGlRoleInfoBinding5 = (com.vinfast.vehicle.databinding.FragmentGlRoleInfoBinding) T1();
                android.widget.LinearLayout linearLayout10 = fragmentGlRoleInfoBinding5.j;
                kotlin.jvm.internal.Intrinsics.k(linearLayout10, "viewAction");
                com.vinfast.companion.core.extensions.ViewExtensionKt.S(linearLayout10);
                androidx.appcompat.widget.AppCompatTextView appCompatTextView8 = fragmentGlRoleInfoBinding5.c;
                kotlin.jvm.internal.Intrinsics.k(appCompatTextView8, "btnPrimaryAction");
                com.vinfast.companion.core.extensions.ViewExtensionKt.S(appCompatTextView8);
                androidx.appcompat.widget.AppCompatTextView appCompatTextView9 = fragmentGlRoleInfoBinding5.d;
                kotlin.jvm.internal.Intrinsics.k(appCompatTextView9, "btnSecondaryAction");
                com.vinfast.companion.core.extensions.ViewExtensionKt.S(appCompatTextView9);
                fragmentGlRoleInfoBinding5.c.setText(com.vinfast.vehicle.R.string.CA20803_accept_request);
                fragmentGlRoleInfoBinding5.d.setText(com.vinfast.vehicle.R.string.CA20803_reject_request);
                android.widget.LinearLayout linearLayout11 = fragmentGlRoleInfoBinding5.k;
                kotlin.jvm.internal.Intrinsics.k(linearLayout11, "viewVerifyCode");
                com.vinfast.companion.core.extensions.ViewExtensionKt.m(linearLayout11);
                break;
        }
        w2().j(arrayList);
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final com.vinfast.vehicle.databinding.FragmentGlRoleInfoBinding q2(android.view.LayoutInflater layoutInflater) {
        kotlin.jvm.internal.Intrinsics.l(layoutInflater, "it");
        com.vinfast.vehicle.databinding.FragmentGlRoleInfoBinding fragmentGlRoleInfoBindingC = com.vinfast.vehicle.databinding.FragmentGlRoleInfoBinding.c(layoutInflater);
        kotlin.jvm.internal.Intrinsics.k(fragmentGlRoleInfoBindingC, "inflate(...)");
        return fragmentGlRoleInfoBindingC;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void r2(com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment gLRoleInfoFragment, androidx.activity.result.ActivityResult activityResult) {
        kotlin.jvm.internal.Intrinsics.l(activityResult, "it");
        if (activityResult.c() == 155) {
            gLRoleInfoFragment.x2().C0();
            androidx.fragment.app.FragmentKt.d(gLRoleInfoFragment, "key_update_billing_address", androidx.core.os.BundleKt.b(new kotlin.Pair[]{kotlin.TuplesKt.a("key_update_billing_address", java.lang.Boolean.TRUE)}));
            gLRoleInfoFragment.U2();
        }
    }

    private final void s2() {
        android.content.Intent intent = new android.content.Intent();
        intent.putExtra("key_reload_data_notification", true);
        requireActivity().setResult(-1, intent);
    }

    /* JADX INFO: Thrown type has an unknown type hierarchy: kotlin.NoWhenBranchMatchedException */
    private final void t2(boolean isCallAPI) throws kotlin.NoWhenBranchMatchedException {
        java.lang.Boolean containBillingAddress = x2().getContainBillingAddress();
        if (kotlin.jvm.internal.Intrinsics.g(containBillingAddress, java.lang.Boolean.TRUE)) {
            U2();
            return;
        }
        if (kotlin.jvm.internal.Intrinsics.g(containBillingAddress, java.lang.Boolean.FALSE)) {
            com.vinfast.companion.core.base.navigation.INavigator iNavigatorK0 = k0();
            android.content.Context contextRequireContext = requireContext();
            kotlin.jvm.internal.Intrinsics.k(contextRequireContext, "requireContext(...)");
            iNavigatorK0.o1(contextRequireContext, 27, true, this.addBillingAddressResult);
            return;
        }
        if (containBillingAddress != null) {
            throw new kotlin.NoWhenBranchMatchedException();
        }
        if (isCallAPI) {
            x2().d0();
        }
    }

    /* JADX INFO: Thrown type has an unknown type hierarchy: kotlin.NoWhenBranchMatchedException */
    static /* synthetic */ void u2(com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment gLRoleInfoFragment, boolean z, int i, java.lang.Object obj) throws kotlin.NoWhenBranchMatchedException {
        if ((i & 1) != 0) {
            z = true;
        }
        gLRoleInfoFragment.t2(z);
    }

    private final com.vinfast.companion.core.base.ui.adapter.ItemCustomAdapter w2() {
        return (com.vinfast.companion.core.base.ui.adapter.ItemCustomAdapter) this.listItemAdapter.getValue();
    }

    private final com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoViewModel x2() {
        return (com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoViewModel) this.viewModel.getValue();
    }

    /* JADX INFO: Thrown type has an unknown type hierarchy: kotlin.UninitializedPropertyAccessException */
    private final void y2(com.vinfast.companion.core.base.ViewModelState.Error error) throws kotlin.UninitializedPropertyAccessException {
        java.lang.String code = error.getCode();
        if (kotlin.jvm.internal.Intrinsics.g(code, "offline")) {
            com.vinfast.companion.core.base.ui.widget.dialog.ConnectionErrorDialogFragment.Companion companion = com.vinfast.companion.core.base.ui.widget.dialog.ConnectionErrorDialogFragment.INSTANCE;
            androidx.fragment.app.FragmentManager childFragmentManager = getChildFragmentManager();
            kotlin.jvm.internal.Intrinsics.k(childFragmentManager, "getChildFragmentManager(...)");
            com.vinfast.companion.core.base.ui.widget.dialog.ConnectionErrorDialogFragment.Companion.b(companion, childFragmentManager, com.vinfast.companion.core.base.ui.widget.dialog.ConnectionErrorDialogFragment.ConnectionErrorType.Offline, false, 4, null);
            return;
        }
        if (!kotlin.jvm.internal.Intrinsics.g(code, "timeout")) {
            com.vinfast.companion.core.base.ui.widget.VFSnackBarKt.k(this, error.getError(), com.vinfast.companion.core.base.ui.widget.SnackbarType.Failed);
            kotlin.Unit unit = kotlin.Unit.a;
        } else {
            com.vinfast.companion.core.base.ui.widget.dialog.ConnectionErrorDialogFragment.Companion companion2 = com.vinfast.companion.core.base.ui.widget.dialog.ConnectionErrorDialogFragment.INSTANCE;
            androidx.fragment.app.FragmentManager childFragmentManager2 = getChildFragmentManager();
            kotlin.jvm.internal.Intrinsics.k(childFragmentManager2, "getChildFragmentManager(...)");
            com.vinfast.companion.core.base.ui.widget.dialog.ConnectionErrorDialogFragment.Companion.b(companion2, childFragmentManager2, com.vinfast.companion.core.base.ui.widget.dialog.ConnectionErrorDialogFragment.ConnectionErrorType.Unstable, false, 4, null);
        }
    }

    private final void z2() {
        x2().getRoleInfo().j(getViewLifecycleOwner(), new com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment$sam$androidx_lifecycle_Observer$0(new kotlin.jvm.functions.Function1() { // from class: com.vinfast.vehicle.caraccess.global.roleinfo.o
            public final java.lang.Object invoke(java.lang.Object obj) {
                return com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment.A2(this.a, (com.vinfast.companion.vehiclekit.model.RoleInfo) obj);
            }
        }));
        com.vinfast.companion.core.extensions.SingleLiveData responseSuccess = x2().getResponseSuccess();
        androidx.lifecycle.LifecycleOwner viewLifecycleOwner = getViewLifecycleOwner();
        kotlin.jvm.internal.Intrinsics.k(viewLifecycleOwner, "getViewLifecycleOwner(...)");
        responseSuccess.j(viewLifecycleOwner, new com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment$sam$androidx_lifecycle_Observer$0(new kotlin.jvm.functions.Function1() { // from class: com.vinfast.vehicle.caraccess.global.roleinfo.p
            public final java.lang.Object invoke(java.lang.Object obj) {
                return com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment.B2(this.a, (com.vinfast.vehicle.caraccess.global.roleinfo.TypeChangeData) obj);
            }
        }));
        com.vinfast.companion.core.extensions.SingleLiveData responseFailure = x2().getResponseFailure();
        androidx.lifecycle.LifecycleOwner viewLifecycleOwner2 = getViewLifecycleOwner();
        kotlin.jvm.internal.Intrinsics.k(viewLifecycleOwner2, "getViewLifecycleOwner(...)");
        responseFailure.j(viewLifecycleOwner2, new com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment$sam$androidx_lifecycle_Observer$0(new kotlin.jvm.functions.Function1() { // from class: com.vinfast.vehicle.caraccess.global.roleinfo.q
            public final java.lang.Object invoke(java.lang.Object obj) {
                return com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment.C2(this.a, (com.vinfast.vehicle.caraccess.global.roleinfo.ResponseError) obj);
            }
        }));
        com.vinfast.companion.core.extensions.SingleLiveData changeRoleData = x2().getChangeRoleData();
        androidx.lifecycle.LifecycleOwner viewLifecycleOwner3 = getViewLifecycleOwner();
        kotlin.jvm.internal.Intrinsics.k(viewLifecycleOwner3, "getViewLifecycleOwner(...)");
        changeRoleData.j(viewLifecycleOwner3, new com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment$sam$androidx_lifecycle_Observer$0(new kotlin.jvm.functions.Function1() { // from class: com.vinfast.vehicle.caraccess.global.roleinfo.r
            public final java.lang.Object invoke(java.lang.Object obj) {
                return com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment.D2(this.a, (com.vinfast.companion.core.utils.notification.NotificationCategory) obj);
            }
        }));
        com.vinfast.companion.core.extensions.SingleLiveData responseGetAccountInfo = x2().getResponseGetAccountInfo();
        androidx.lifecycle.LifecycleOwner viewLifecycleOwner4 = getViewLifecycleOwner();
        kotlin.jvm.internal.Intrinsics.k(viewLifecycleOwner4, "getViewLifecycleOwner(...)");
        responseGetAccountInfo.j(viewLifecycleOwner4, new com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment$sam$androidx_lifecycle_Observer$0(new kotlin.jvm.functions.Function1() { // from class: com.vinfast.vehicle.caraccess.global.roleinfo.s
            public final java.lang.Object invoke(java.lang.Object obj) {
                return com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment.E2(this.a, (com.vinfast.vehicle.caraccess.global.roleinfo.TypeAccountInfo) obj);
            }
        }));
    }

    public final void F2() {
        final com.vinfast.vehicle.databinding.FragmentGlRoleInfoBinding fragmentGlRoleInfoBinding = (com.vinfast.vehicle.databinding.FragmentGlRoleInfoBinding) T1();
        android.widget.LinearLayout linearLayout = fragmentGlRoleInfoBinding.j;
        kotlin.jvm.internal.Intrinsics.k(linearLayout, "viewAction");
        com.vinfast.companion.core.extensions.ViewExtensionKt.m(linearLayout);
        android.widget.LinearLayout linearLayout2 = fragmentGlRoleInfoBinding.k;
        kotlin.jvm.internal.Intrinsics.k(linearLayout2, "viewVerifyCode");
        com.vinfast.companion.core.extensions.ViewExtensionKt.m(linearLayout2);
        fragmentGlRoleInfoBinding.e.setOnCheckedChangeListener(new android.widget.CompoundButton.OnCheckedChangeListener() { // from class: com.vinfast.vehicle.caraccess.global.roleinfo.t
            @Override // android.widget.CompoundButton.OnCheckedChangeListener
            public final void onCheckedChanged(android.widget.CompoundButton compoundButton, boolean z) {
                com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment.G2(fragmentGlRoleInfoBinding, compoundButton, z);
            }
        });
        androidx.appcompat.widget.AppCompatTextView appCompatTextView = fragmentGlRoleInfoBinding.c;
        kotlin.jvm.internal.Intrinsics.k(appCompatTextView, "btnPrimaryAction");
        com.vinfast.companion.core.extensions.ViewExtensionKt.G(appCompatTextView, new kotlin.jvm.functions.Function1() { // from class: com.vinfast.vehicle.caraccess.global.roleinfo.u
            public final java.lang.Object invoke(java.lang.Object obj) {
                return com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment.H2(this.a, (android.view.View) obj);
            }
        });
        androidx.appcompat.widget.AppCompatTextView appCompatTextView2 = fragmentGlRoleInfoBinding.d;
        kotlin.jvm.internal.Intrinsics.k(appCompatTextView2, "btnSecondaryAction");
        com.vinfast.companion.core.extensions.ViewExtensionKt.G(appCompatTextView2, new kotlin.jvm.functions.Function1() { // from class: com.vinfast.vehicle.caraccess.global.roleinfo.b
            public final java.lang.Object invoke(java.lang.Object obj) {
                return com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment.I2(this.a, (android.view.View) obj);
            }
        });
        fragmentGlRoleInfoBinding.g.setAdapter(w2());
        androidx.appcompat.widget.AppCompatTextView appCompatTextView3 = fragmentGlRoleInfoBinding.b;
        kotlin.jvm.internal.Intrinsics.k(appCompatTextView3, "btnCopyVerifyCode");
        com.vinfast.companion.core.extensions.ViewExtensionKt.G(appCompatTextView3, new kotlin.jvm.functions.Function1() { // from class: com.vinfast.vehicle.caraccess.global.roleinfo.c
            public final java.lang.Object invoke(java.lang.Object obj) {
                return com.vinfast.vehicle.caraccess.global.roleinfo.GLRoleInfoFragment.L2(this.a, (android.view.View) obj);
            }
        });
    }

    @Override // com.vinfast.companion.core.base.fragment.BaseFragment
    public void I0(com.vinfast.companion.core.base.ViewModelState.Error error) {
        kotlin.jvm.internal.Intrinsics.l(error, "error");
    }

    @Override // com.vinfast.companion.core.base.fragment.BaseFragment
    public boolean P1() {
        return true;
    }

    @Override // com.vinfast.companion.core.base.fragment.BaseFragment
    public com.vinfast.companion.core.base.fragment.ToolbarConfiguration T0() {
        return com.vinfast.companion.core.base.fragment.ToolbarConfiguration.Builder.z(new com.vinfast.companion.core.base.fragment.ToolbarConfiguration.Builder().r(true).t(false), false, 0, 2, null).a();
    }

    @Override // com.vinfast.companion.core.base.fragment.BaseFragment
    public com.vinfast.companion.core.base.BaseViewModel U1() {
        return x2();
    }

    @Override // com.vinfast.companion.core.base.fragment.BaseFragment
    public void s1(boolean navigateUp) {
        androidx.lifecycle.SavedStateHandle savedStateHandleJ;
        if (x2().getFlagReloadData()) {
            androidx.navigation.NavBackStackEntry navBackStackEntryC = androidx.navigation.fragment.FragmentKt.a(this).C();
            if (navBackStackEntryC != null && (savedStateHandleJ = navBackStackEntryC.j()) != null) {
                savedStateHandleJ.i("flag_refresh_data", java.lang.Boolean.TRUE);
            }
            x2().z0(false);
        }
        androidx.navigation.fragment.FragmentKt.a(this).Z(com.vinfast.vehicle.R.id.GLRoleManagementFragment, false);
    }

    public final com.vinfast.companion.core.managers.IAccountAuthenticator v2() {
        com.vinfast.companion.core.managers.IAccountAuthenticator iAccountAuthenticator = this.accountAuthenticator;
        if (iAccountAuthenticator != null) {
            return iAccountAuthenticator;
        }
        kotlin.jvm.internal.Intrinsics.C("accountAuthenticator");
        return null;
    }

    @Override // com.vinfast.companion.core.base.fragment.BaseFragment
    public void y1(android.view.View view, android.os.Bundle savedInstanceState) {
        kotlin.jvm.internal.Intrinsics.l(view, "view");
        android.os.Bundle arguments = getArguments();
        java.lang.Object obj = arguments != null ? arguments.get("key_role_data") : null;
        com.vinfast.companion.vehiclekit.model.RoleInfo roleInfo = obj instanceof com.vinfast.companion.vehiclekit.model.RoleInfo ? (com.vinfast.companion.vehiclekit.model.RoleInfo) obj : null;
        android.os.Bundle arguments2 = getArguments();
        java.lang.Boolean boolValueOf = arguments2 != null ? java.lang.Boolean.valueOf(arguments2.getBoolean("key_load_driver_info", false)) : null;
        F2();
        z2();
        x2().D0(roleInfo);
        if (kotlin.jvm.internal.Intrinsics.g(boolValueOf, java.lang.Boolean.TRUE)) {
            x2().i0(roleInfo != null ? roleInfo.m() : null, roleInfo != null ? roleInfo.k() : null, roleInfo != null ? roleInfo.g() : null);
        }
    }
}
