package ca.canadapost.module.postal;

import android.os.Bundle;
import androidx.activity.h;
import androidx.fragment.app.f;
import androidx.lifecycle.b1;
import androidx.lifecycle.c1;
import androidx.lifecycle.d1;
import androidx.navigation.fragment.NavHostFragment;
import kotlin.Metadata;
import kotlin.jvm.internal.p0;
import kotlin.jvm.internal.t;
import kotlin.jvm.internal.v;
import m8.i;
import re.k;
import re.n;
import rm.o;
import y4.g;

@Metadata(d1 = {"\u00000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0006\u0018\u00002\u00020\u00012\u00020\u0002B\u0007¢\u0006\u0004\b\u0014\u0010\u0015J\b\u0010\u0004\u001a\u00020\u0003H\u0002J\u0012\u0010\u0007\u001a\u00020\u00032\b\u0010\u0006\u001a\u0004\u0018\u00010\u0005H\u0014J\b\u0010\t\u001a\u00020\bH\u0016R\u001b\u0010\u000f\u001a\u00020\n8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b\u000b\u0010\f\u001a\u0004\b\r\u0010\u000eR\u0016\u0010\u0013\u001a\u00020\u00108\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\b\u0011\u0010\u0012¨\u0006\u0016"}, d2 = {"Lca/canadapost/module/postal/PostalActivity;", "Lca/canadapost/core/common/navigation/ui/b;", "Lnm/e;", "Lrm/n0;", "A0", "Landroid/os/Bundle;", "savedInstanceState", "onCreate", "Lm8/i;", "d", "Lre/k;", "I", "Lrm/o;", "z0", "()Lre/k;", "viewModel", "Lse/a;", "J", "Lse/a;", "binding", "<init>", "()V", "findpostal_productionRelease"}, k = 1, mv = {1, 9, 0})
/* loaded from: classes4.dex */
public final class PostalActivity extends ca.canadapost.core.common.navigation.ui.b {

    /* renamed from: I, reason: from kotlin metadata */
    private final o viewModel = new b1(p0.b(k.class), new a(this), new c(), new b(null, this));

    /* renamed from: J, reason: from kotlin metadata */
    private se.a binding;

    /* loaded from: classes4.dex */
    public static final class a extends v implements dn.a {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ h f10631p;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public a(h hVar) {
            super(0);
            this.f10631p = hVar;
        }

        @Override // dn.a
        /* renamed from: a, reason: merged with bridge method [inline-methods] */
        public final d1 invoke() {
            return this.f10631p.getViewModelStore();
        }
    }

    /* loaded from: classes4.dex */
    public static final class b extends v implements dn.a {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ dn.a f10632p;

        /* renamed from: q, reason: collision with root package name */
        final /* synthetic */ h f10633q;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public b(dn.a aVar, h hVar) {
            super(0);
            this.f10632p = aVar;
            this.f10633q = hVar;
        }

        @Override // dn.a
        /* renamed from: a, reason: merged with bridge method [inline-methods] */
        public final s4.a invoke() {
            s4.a aVar;
            dn.a aVar2 = this.f10632p;
            return (aVar2 == null || (aVar = (s4.a) aVar2.invoke()) == null) ? this.f10633q.getDefaultViewModelCreationExtras() : aVar;
        }
    }

    /* loaded from: classes4.dex */
    static final class c extends v implements dn.a {
        c() {
            super(0);
        }

        @Override // dn.a
        /* renamed from: a, reason: merged with bridge method [inline-methods] */
        public final c1.c invoke() {
            return PostalActivity.this.n0();
        }
    }

    private final void A0() {
        f k02 = getSupportFragmentManager().k0(n.f34668c);
        t.e(k02, "null cannot be cast to non-null type androidx.navigation.fragment.NavHostFragment");
        g.e(this, ((NavHostFragment) k02).A(), null, 4, null);
    }

    private final k z0() {
        return (k) this.viewModel.getValue();
    }

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

    /* 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);
        androidx.databinding.n j10 = androidx.databinding.f.j(this, re.o.f34674a);
        t.f(j10, "setContentView(...)");
        se.a aVar = (se.a) j10;
        this.binding = aVar;
        se.a aVar2 = null;
        if (aVar == null) {
            t.y("binding");
            aVar = null;
        }
        aVar.V(z0());
        se.a aVar3 = this.binding;
        if (aVar3 == null) {
            t.y("binding");
            aVar3 = null;
        }
        aVar3.U(k0());
        se.a aVar4 = this.binding;
        if (aVar4 == null) {
            t.y("binding");
        } else {
            aVar2 = aVar4;
        }
        v0(aVar2.D.B);
        N(m0());
        A0();
    }
}
