package gc;

import android.app.Application;
import android.content.Context;
import ca.canadapost.core.data.model.Event;
import d9.f;

/* loaded from: classes4.dex */
public final class q0 extends androidx.lifecycle.b {

    /* renamed from: c, reason: collision with root package name */
    private final g9.k f19771c;

    /* renamed from: d, reason: collision with root package name */
    private final d9.f f19772d;

    /* renamed from: e, reason: collision with root package name */
    private final ja.d f19773e;

    /* renamed from: f, reason: collision with root package name */
    private final androidx.lifecycle.f0 f19774f;

    /* renamed from: g, reason: collision with root package name */
    private final androidx.lifecycle.a0 f19775g;

    /* renamed from: h, reason: collision with root package name */
    private final androidx.lifecycle.f0 f19776h;

    /* renamed from: i, reason: collision with root package name */
    private final androidx.lifecycle.a0 f19777i;

    /* renamed from: j, reason: collision with root package name */
    private final androidx.lifecycle.a0 f19778j;

    /* loaded from: classes4.dex */
    static final class a extends kotlin.jvm.internal.v implements dn.l {

        /* renamed from: p, reason: collision with root package name */
        public static final a f19779p = new a();

        a() {
            super(1);
        }

        public final Event a(boolean z10) {
            return new Event(Boolean.valueOf(z10));
        }

        @Override // dn.l
        public /* bridge */ /* synthetic */ Object invoke(Object obj) {
            return a(((Boolean) obj).booleanValue());
        }
    }

    /* JADX WARN: Illegal instructions before constructor call */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public q0(t7.c contextService, g9.d sessionRepository, g9.k registrationRepository, d9.f analytics, ja.d sharedPrefsService) {
        super((Application) r2);
        kotlin.jvm.internal.t.g(contextService, "contextService");
        kotlin.jvm.internal.t.g(sessionRepository, "sessionRepository");
        kotlin.jvm.internal.t.g(registrationRepository, "registrationRepository");
        kotlin.jvm.internal.t.g(analytics, "analytics");
        kotlin.jvm.internal.t.g(sharedPrefsService, "sharedPrefsService");
        Context a10 = contextService.a();
        kotlin.jvm.internal.t.e(a10, "null cannot be cast to non-null type android.app.Application");
        this.f19771c = registrationRepository;
        this.f19772d = analytics;
        this.f19773e = sharedPrefsService;
        Boolean bool = Boolean.FALSE;
        androidx.lifecycle.f0 f0Var = new androidx.lifecycle.f0(new Event(bool));
        this.f19774f = f0Var;
        this.f19775g = f0Var;
        androidx.lifecycle.f0 f0Var2 = new androidx.lifecycle.f0(new Event(bool));
        this.f19776h = f0Var2;
        this.f19777i = f0Var2;
        this.f19778j = androidx.lifecycle.y0.a(sessionRepository.i(), a.f19779p);
    }

    private final void V() {
        this.f19771c.m("MOBILE_ANDROID_FLEX", "Flexdelivery_landing_page", "Flexdelivery_landing_page");
    }

    public final androidx.lifecycle.a0 Q() {
        return this.f19778j;
    }

    public final androidx.lifecycle.a0 R() {
        return this.f19775g;
    }

    public final androidx.lifecycle.a0 S() {
        return this.f19777i;
    }

    public final void T() {
        V();
        this.f19774f.q(new Event(Boolean.TRUE));
        this.f19773e.putBoolean("FLEX_ONBOARD_SIGN_IN_PRESSED", true);
    }

    public final void U() {
        V();
        this.f19776h.q(new Event(Boolean.TRUE));
        f.a.a(this.f19772d, "Flex_Registration_Adobe", null, 2, null);
    }
}
