package ca.canadapost.module.login.twostepverification;

import android.os.Bundle;
import androidx.databinding.n;
import androidx.navigation.fragment.NavHostFragment;
import ca.canadapost.core.data.model.CoreConstants;
import kotlin.Metadata;
import kotlin.jvm.internal.t;
import ld.j;
import ld.k;
import ld.l;
import m8.i;
import v4.f;
import v4.p;
import y4.d;

@Metadata(d1 = {"\u0000&\n\u0002\u0018\u0002\n\u0002\u0018\u0002\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\u0006\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u000e\u0010\u000fJ\b\u0010\u0003\u001a\u00020\u0002H\u0002J\b\u0010\u0004\u001a\u00020\u0002H\u0002J\u0012\u0010\u0007\u001a\u00020\u00022\b\u0010\u0006\u001a\u0004\u0018\u00010\u0005H\u0014J\b\u0010\t\u001a\u00020\bH\u0016R\u0016\u0010\r\u001a\u00020\n8\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\b\u000b\u0010\f¨\u0006\u0010"}, d2 = {"Lca/canadapost/module/login/twostepverification/TwoSVRegisterActivity;", "Lca/canadapost/core/common/navigation/ui/b;", "Lrm/n0;", "y0", "z0", "Landroid/os/Bundle;", "savedInstanceState", "onCreate", "Lm8/i;", "d", "Lod/e;", "I", "Lod/e;", "binding", "<init>", "()V", "login_productionRelease"}, k = 1, mv = {1, 9, 0})
/* loaded from: classes4.dex */
public final class TwoSVRegisterActivity extends ca.canadapost.core.common.navigation.ui.b {

    /* renamed from: I, reason: from kotlin metadata */
    private od.e binding;

    private final void y0() {
        androidx.fragment.app.f k02 = getSupportFragmentManager().k0(j.Q);
        t.e(k02, "null cannot be cast to non-null type androidx.navigation.fragment.NavHostFragment");
        v4.j A = ((NavHostFragment) k02).A();
        p b10 = A.F().b(l.f27969c);
        Bundle bundleExtra = getIntent().getBundleExtra(CoreConstants.FRAG_ARGS);
        boolean z10 = bundleExtra != null ? bundleExtra.getBoolean(CoreConstants.ARG_MANAGE_2SV_FLOW) : false;
        Boolean valueOf = bundleExtra != null ? Boolean.valueOf(bundleExtra.getBoolean(CoreConstants.ARG_BYPASS_FIRST_FRAGMENT)) : null;
        boolean z11 = bundleExtra != null ? bundleExtra.getBoolean(CoreConstants.ARG_SHOW_SKIP_BUTTON_OPTION) : false;
        b10.e(CoreConstants.ARG_NOT_RETURN_TO_MANAGE_FRAGMENT, new f.a().b(Boolean.valueOf(bundleExtra != null ? bundleExtra.getBoolean(CoreConstants.ARG_NOT_RETURN_TO_MANAGE_FRAGMENT) : false)).a());
        b10.e(CoreConstants.ARG_SHOW_SKIP_BUTTON_OPTION, new f.a().b(Boolean.valueOf(z11)).a());
        b10.b0(z10 ? t.b(valueOf, Boolean.TRUE) ? j.Y : j.P : t.b(valueOf, Boolean.TRUE) ? j.Y : j.Z);
        A.k0(b10);
    }

    private final void z0() {
        androidx.fragment.app.f k02 = getSupportFragmentManager().k0(j.Q);
        t.e(k02, "null cannot be cast to non-null type androidx.navigation.fragment.NavHostFragment");
        v4.j A = ((NavHostFragment) k02).A();
        A.p(new o8.l(this, k0(), new d.a(A.D()).a()));
    }

    @Override // m8.m
    public i d() {
        return i.NAV_LOGIN;
    }

    /* JADX INFO: Access modifiers changed from: protected */
    @Override // ca.canadapost.core.common.navigation.ui.b, androidx.fragment.app.k, androidx.activity.h, androidx.core.app.f, android.app.Activity
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        n j10 = androidx.databinding.f.j(this, k.f27943c);
        t.f(j10, "setContentView(...)");
        od.e eVar = (od.e) j10;
        this.binding = eVar;
        od.e eVar2 = null;
        if (eVar == null) {
            t.y("binding");
            eVar = null;
        }
        eVar.O(this);
        od.e eVar3 = this.binding;
        if (eVar3 == null) {
            t.y("binding");
        } else {
            eVar2 = eVar3;
        }
        v0(eVar2.A.B);
        N(m0());
        z0();
        if (bundle == null) {
            y0();
        }
    }
}
