package ca.canadapost.core.common.navigation.ui;

import androidx.fragment.app.f;
import androidx.fragment.app.k;
import androidx.navigation.fragment.NavHostFragment;
import ca.canadapost.core.common.navigation.ui.d;
import h7.i;
import kotlin.jvm.internal.t;
import o8.d0;
import o8.g0;
import o8.h0;
import o8.l;
import v4.j;
import y4.d;

/* loaded from: classes.dex */
public final class e implements d {

    /* renamed from: p, reason: collision with root package name */
    private final b f7917p;

    /* renamed from: q, reason: collision with root package name */
    private final d0 f7918q;

    /* renamed from: r, reason: collision with root package name */
    private final String f7919r;

    /* renamed from: s, reason: collision with root package name */
    private final /* synthetic */ g0 f7920s;

    /* renamed from: t, reason: collision with root package name */
    private final j f7921t;

    public e(b moduleActivity, d0 navViewModel, String analyticsPageName) {
        t.g(moduleActivity, "moduleActivity");
        t.g(navViewModel, "navViewModel");
        t.g(analyticsPageName, "analyticsPageName");
        this.f7917p = moduleActivity;
        this.f7918q = navViewModel;
        this.f7919r = analyticsPageName;
        this.f7920s = new g0();
        f k02 = moduleActivity.getSupportFragmentManager().k0(i.Y);
        t.e(k02, "null cannot be cast to non-null type androidx.navigation.fragment.NavHostFragment");
        this.f7921t = ((NavHostFragment) k02).A();
    }

    public static /* synthetic */ void c(e eVar, y4.d dVar, int i10, Object obj) {
        if ((i10 & 1) != 0) {
            dVar = new d.a(eVar.f7921t.D()).a();
        }
        eVar.a(dVar);
    }

    public final void a(y4.d appBarConfiguration) {
        t.g(appBarConfiguration, "appBarConfiguration");
        this.f7921t.p(new l(this.f7917p, this.f7918q, appBarConfiguration));
        d.a.b(this, this.f7918q, this.f7917p, false, 4, null);
    }

    @Override // ca.canadapost.core.common.navigation.ui.d
    public void b(h0 profileNavigationVMHandler, k activity, boolean z10) {
        t.g(profileNavigationVMHandler, "profileNavigationVMHandler");
        t.g(activity, "activity");
        this.f7920s.b(profileNavigationVMHandler, activity, z10);
    }

    public final void d() {
        this.f7918q.I0(this.f7919r);
    }

    @Override // ca.canadapost.core.common.navigation.ui.d
    public void f(h0 profileNavigationVMHandler, f fragment, boolean z10) {
        t.g(profileNavigationVMHandler, "profileNavigationVMHandler");
        t.g(fragment, "fragment");
        this.f7920s.f(profileNavigationVMHandler, fragment, z10);
    }
}
