package ca.canadapost.module.mymail;

import ae.s;
import android.content.Intent;
import android.os.Bundle;
import androidx.databinding.f;
import androidx.databinding.n;
import androidx.navigation.fragment.NavHostFragment;
import ca.canadapost.core.common.navigation.ui.b;
import ca.canadapost.core.common.navigation.ui.e;
import h8.a;
import java.util.Set;
import kotlin.Metadata;
import kotlin.jvm.internal.t;
import m8.i;
import o8.d0;
import o8.l;
import sm.x0;
import y4.d;
import yd.j;

@Metadata(d1 = {"\u0000<\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\n\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u001d\u0010\u001eJ\u0012\u0010\u0005\u001a\u00020\u00042\b\u0010\u0003\u001a\u0004\u0018\u00010\u0002H\u0002J\u0012\u0010\b\u001a\u00020\u00042\b\u0010\u0007\u001a\u0004\u0018\u00010\u0006H\u0014J\b\u0010\t\u001a\u00020\u0004H\u0016J\b\u0010\u000b\u001a\u00020\nH\u0016J\u0012\u0010\f\u001a\u00020\u00042\b\u0010\u0003\u001a\u0004\u0018\u00010\u0002H\u0014R\u0016\u0010\u0010\u001a\u00020\r8\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\b\u000e\u0010\u000fR\u0016\u0010\u0014\u001a\u00020\u00118\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\b\u0012\u0010\u0013R\"\u0010\u001c\u001a\u00020\u00158\u0006@\u0006X\u0087.¢\u0006\u0012\n\u0004\b\u0016\u0010\u0017\u001a\u0004\b\u0018\u0010\u0019\"\u0004\b\u001a\u0010\u001b¨\u0006\u001f"}, d2 = {"Lca/canadapost/module/mymail/MyMailActivity;", "Lca/canadapost/core/common/navigation/ui/b;", "Landroid/content/Intent;", "intent", "Lrm/n0;", "z0", "Landroid/os/Bundle;", "savedInstanceState", "onCreate", "p0", "Lm8/i;", "d", "onNewIntent", "Lae/s;", "I", "Lae/s;", "binding", "Lca/canadapost/core/common/navigation/ui/e;", "J", "Lca/canadapost/core/common/navigation/ui/e;", "toolbarDecorator", "Lh8/a;", "K", "Lh8/a;", "y0", "()Lh8/a;", "setMaintenanceUtility", "(Lh8/a;)V", "maintenanceUtility", "<init>", "()V", "mymail_productionRelease"}, k = 1, mv = {1, 9, 0})
/* loaded from: classes4.dex */
public final class MyMailActivity extends b {

    /* renamed from: I, reason: from kotlin metadata */
    private s binding;

    /* renamed from: J, reason: from kotlin metadata */
    private e toolbarDecorator;

    /* renamed from: K, reason: from kotlin metadata */
    public a maintenanceUtility;

    private final void z0(Intent intent) {
        j0().a(true);
        d9.a.f15931a.i(intent != null ? intent.getData() : null);
    }

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

    /* 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) {
        Set h10;
        super.onCreate(bundle);
        n j10 = f.j(this, j.f52320j);
        t.f(j10, "setContentView(...)");
        s sVar = (s) j10;
        this.binding = sVar;
        if (sVar == null) {
            t.y("binding");
            sVar = null;
        }
        sVar.U(k0());
        s sVar2 = this.binding;
        if (sVar2 == null) {
            t.y("binding");
            sVar2 = null;
        }
        sVar2.O(this);
        s sVar3 = this.binding;
        if (sVar3 == null) {
            t.y("binding");
            sVar3 = null;
        }
        v0(sVar3.A.B);
        N(m0());
        e eVar = new e(this, k0(), "TrackList");
        this.toolbarDecorator = eVar;
        e.c(eVar, null, 1, null);
        androidx.fragment.app.f k02 = getSupportFragmentManager().k0(yd.i.P);
        t.e(k02, "null cannot be cast to non-null type androidx.navigation.fragment.NavHostFragment");
        v4.j A = ((NavHostFragment) k02).A();
        d0 k03 = k0();
        h10 = x0.h(Integer.valueOf(yd.i.M), Integer.valueOf(yd.i.N), Integer.valueOf(yd.i.f52290f0));
        A.p(new l(this, k03, new d.a(h10).a()));
    }

    /* JADX INFO: Access modifiers changed from: protected */
    @Override // ca.canadapost.core.common.navigation.ui.b, androidx.activity.h, android.app.Activity
    public void onNewIntent(Intent intent) {
        super.onNewIntent(intent);
        j0().a(true);
        if (y0().d()) {
            return;
        }
        z0(intent);
    }

    @Override // ca.canadapost.core.common.navigation.ui.b
    public void p0() {
        e eVar = this.toolbarDecorator;
        if (eVar == null) {
            t.y("toolbarDecorator");
            eVar = null;
        }
        eVar.d();
    }

    public final a y0() {
        a aVar = this.maintenanceUtility;
        if (aVar != null) {
            return aVar;
        }
        t.y("maintenanceUtility");
        return null;
    }
}
