package ca.canadapost.module.mymail.subscribed;

import ae.u0;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.fragment.app.z;
import androidx.lifecycle.c1;
import androidx.lifecycle.d1;
import androidx.lifecycle.n;
import androidx.lifecycle.r;
import androidx.lifecycle.z0;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import androidx.viewpager2.widget.ViewPager2;
import ca.canadapost.core.common.navigation.ui.d;
import ca.canadapost.core.data.model.ResultWrapper;
import ca.canadapost.core.data.model.ValidationError;
import ca.canadapost.core.data.mymail.model.MyMailStatus;
import ca.canadapost.module.mymail.subscribed.m;
import com.google.android.material.tabs.TabLayout;
import com.google.android.material.tabs.d;
import com.google.firebase.messaging.Constants;
import java.util.List;
import kotlin.Metadata;
import kotlin.jvm.internal.t;
import kotlin.jvm.internal.v;
import l8.h;
import o8.d0;
import o8.g0;
import o8.h0;
import rm.n0;
import sm.u;
import u7.x;
import w8.p0;
import w8.w;

@Metadata(d1 = {"\u0000Í\u0001\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\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\u0000\n\u0002\u0010\u000e\n\u0002\b\t\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\b\n\u0002\b\u0006\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\t*\u0001Y\u0018\u00002\u00020\u00012\b\u0012\u0004\u0012\u00020\u00030\u00022\u00020\u00042\u00020\u00052\u00020\u0006B\u0007¢\u0006\u0004\bd\u0010eJ\u0016\u0010\u000b\u001a\u00020\n2\f\u0010\t\u001a\b\u0012\u0004\u0012\u00020\b0\u0007H\u0002J5\u0010\u0017\u001a\u00020\u00162\u0006\u0010\r\u001a\u00020\f2\b\u0010\u000f\u001a\u0004\u0018\u00010\u000e2\b\u0010\u0011\u001a\u0004\u0018\u00010\u00102\u0006\u0010\u0013\u001a\u00020\u00122\u0006\u0010\u0015\u001a\u00020\u0014H\u0096\u0001J\u0019\u0010\u001c\u001a\u00020\n2\u0006\u0010\u0019\u001a\u00020\u00182\u0006\u0010\u001b\u001a\u00020\u001aH\u0096\u0001J\u001b\u0010\"\u001a\u00020!2\b\u0010\u001e\u001a\u0004\u0018\u00010\u001d2\u0006\u0010 \u001a\u00020\u001fH\u0096\u0001J#\u0010%\u001a\u00020!2\u0006\u0010#\u001a\u00020!2\b\u0010$\u001a\u0004\u0018\u00010!2\u0006\u0010 \u001a\u00020\u001fH\u0096\u0001J\u001b\u0010&\u001a\u00020!2\b\u0010\u001e\u001a\u0004\u0018\u00010\u001d2\u0006\u0010 \u001a\u00020\u001fH\u0096\u0001J\u0019\u0010'\u001a\u00020!2\u0006\u0010#\u001a\u00020!2\u0006\u0010 \u001a\u00020\u001fH\u0096\u0001J\u0011\u0010(\u001a\u00020!2\u0006\u0010 \u001a\u00020\u001fH\u0096\u0001J\u0011\u0010)\u001a\u00020!2\u0006\u0010 \u001a\u00020\u001fH\u0096\u0001J\u0011\u0010*\u001a\u00020!2\u0006\u0010 \u001a\u00020\u001fH\u0096\u0001J\u0019\u0010,\u001a\u00020\n2\u0006\u0010\u0019\u001a\u00020+2\u0006\u0010 \u001a\u00020\u001fH\u0096\u0001J\u0019\u0010-\u001a\u00020\n2\u0006\u0010\u001b\u001a\u00020\u001a2\u0006\u0010\u0019\u001a\u00020+H\u0096\u0001J\u0011\u0010.\u001a\u00020\n2\u0006\u0010 \u001a\u00020\u001fH\u0096\u0001J\u0019\u0010/\u001a\u00020\n2\u0006\u0010\u001b\u001a\u00020\u001a2\u0006\u0010\u0019\u001a\u00020+H\u0096\u0001J\u001b\u00101\u001a\u00020\n2\b\u00100\u001a\u0004\u0018\u00010\u001d2\u0006\u0010 \u001a\u00020\u001fH\u0096\u0001J\u0019\u00104\u001a\u00020\n2\u0006\u00103\u001a\u0002022\u0006\u0010\u001b\u001a\u00020\u001aH\u0096\u0001J\u0019\u00109\u001a\u00020\n2\u0006\u00106\u001a\u0002052\u0006\u00108\u001a\u000207H\u0096\u0001J\u0019\u0010:\u001a\u00020\n2\u0006\u0010\u001b\u001a\u00020\u001a2\u0006\u00108\u001a\u000207H\u0096\u0001J#\u0010?\u001a\u00020\n2\u0006\u0010<\u001a\u00020;2\u0006\u0010\u001b\u001a\u00020\u001a2\b\b\u0002\u0010>\u001a\u00020=H\u0096\u0001J#\u0010A\u001a\u00020\n2\u0006\u0010<\u001a\u00020;2\u0006\u00106\u001a\u00020@2\b\b\u0002\u0010>\u001a\u00020=H\u0096\u0001J\u0012\u0010B\u001a\u00020\n2\b\u0010\u0011\u001a\u0004\u0018\u00010\u0010H\u0016J$\u0010C\u001a\u00020\u00162\u0006\u0010\r\u001a\u00020\f2\b\u0010\u000f\u001a\u0004\u0018\u00010\u000e2\b\u0010\u0011\u001a\u0004\u0018\u00010\u0010H\u0016J\u001a\u0010E\u001a\u00020\n2\u0006\u0010D\u001a\u00020\u00162\b\u0010\u0011\u001a\u0004\u0018\u00010\u0010H\u0016J\b\u0010F\u001a\u00020\nH\u0016J\b\u0010G\u001a\u00020\nH\u0016R\u001b\u0010\u0015\u001a\u00020H8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\bI\u0010J\u001a\u0004\bK\u0010LR\u001b\u0010Q\u001a\u00020M8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\bN\u0010J\u001a\u0004\bO\u0010PR\u001a\u0010U\u001a\b\u0012\u0004\u0012\u00020R0\u00078\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\bS\u0010TR\u0016\u0010X\u001a\u00020=8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\bV\u0010WR\u0014\u0010\\\u001a\u00020Y8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\bZ\u0010[R\u0014\u0010`\u001a\u00020]8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b^\u0010_R\u0014\u0010c\u001a\u00020\u00038\u0016X\u0096\u0005¢\u0006\u0006\u001a\u0004\ba\u0010b¨\u0006f"}, d2 = {"Lca/canadapost/module/mymail/subscribed/MyMailSubscribedTabsFragment;", "Lu8/b;", "", "Lae/u0;", "Lw8/o;", "Lw8/p0;", "Lca/canadapost/core/common/navigation/ui/d;", "", "Lca/canadapost/module/mymail/subscribed/i$a;", "tabs", "Lrm/n0;", "O", "Landroid/view/LayoutInflater;", "inflater", "Landroid/view/ViewGroup;", "container", "Landroid/os/Bundle;", "savedInstanceState", "Landroidx/lifecycle/u;", "viewLifecycleOwner", "Landroidx/lifecycle/z0;", "viewModel", "Landroid/view/View;", "U", "Ll8/c;", Constants.IPC_BUNDLE_KEY_SEND_ERROR, "Landroidx/fragment/app/f;", "fragment", "M", "Lca/canadapost/core/data/model/ValidationError;", "validationError", "Landroid/content/Context;", "context", "", "m", "code", "message", "n", "i", "j", "h", "d", "a", "Lca/canadapost/core/data/model/ResultWrapper$Error;", "e", "l", "o", "g", "valError", "k", "Ll8/h;", "spinnerVM", "N", "Landroid/app/Activity;", "activity", "Ll8/h$b;", "event", "c", "p", "Lo8/h0;", "profileNavigationVMHandler", "", "showTwoSv", "f", "Landroidx/fragment/app/k;", "b", "onCreate", "onCreateView", "view", "onViewCreated", "onStop", "onDestroy", "Lca/canadapost/module/mymail/subscribed/m;", "w", "Lrm/o;", "S", "()Lca/canadapost/module/mymail/subscribed/m;", "Lo8/d0;", "x", "R", "()Lo8/d0;", "navViewModel", "", "y", "Ljava/util/List;", "tabTitles", "z", "Z", "firstRender", "ca/canadapost/module/mymail/subscribed/MyMailSubscribedTabsFragment$b", "A", "Lca/canadapost/module/mymail/subscribed/MyMailSubscribedTabsFragment$b;", "onPageChangeCallback", "Landroidx/lifecycle/r;", "B", "Landroidx/lifecycle/r;", "lifecycleEventObserver", "Q", "()Lae/u0;", "binding", "<init>", "()V", "mymail_productionRelease"}, k = 1, mv = {1, 9, 0})
/* loaded from: classes4.dex */
public final class MyMailSubscribedTabsFragment extends u8.b implements w8.o, p0, ca.canadapost.core.common.navigation.ui.d {

    /* renamed from: A, reason: from kotlin metadata */
    private final b onPageChangeCallback;

    /* renamed from: B, reason: from kotlin metadata */
    private final r lifecycleEventObserver;

    /* renamed from: s, reason: collision with root package name */
    private final /* synthetic */ x f10420s = new x(yd.j.f52334x);

    /* renamed from: t, reason: collision with root package name */
    private final /* synthetic */ w8.k f10421t = new w8.k(Integer.valueOf(yd.k.f52353n), Integer.valueOf(yd.k.f52364y), null, 4, null);

    /* renamed from: u, reason: collision with root package name */
    private final /* synthetic */ w8.l f10422u = new w8.l();

    /* renamed from: v, reason: collision with root package name */
    private final /* synthetic */ g0 f10423v = new g0();

    /* renamed from: w, reason: collision with root package name and from kotlin metadata */
    private final rm.o viewModel = androidx.fragment.app.p0.a(this, kotlin.jvm.internal.p0.b(m.class), new i(this), new k());

    /* renamed from: x, reason: collision with root package name and from kotlin metadata */
    private final rm.o navViewModel = androidx.fragment.app.p0.a(this, kotlin.jvm.internal.p0.b(d0.class), new j(this), new a());

    /* renamed from: y, reason: collision with root package name and from kotlin metadata */
    private final List tabTitles;

    /* renamed from: z, reason: collision with root package name and from kotlin metadata */
    private boolean firstRender;

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

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

    /* loaded from: classes4.dex */
    public static final class b extends ViewPager2.i {
        b() {
        }

        @Override // androidx.viewpager2.widget.ViewPager2.i
        public void c(int i10) {
            super.c(i10);
            MyMailSubscribedTabsFragment.this.S().K0(i10);
        }
    }

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

        public final void a(MyMailStatus myMailStatus) {
            MyMailSubscribedTabsFragment.this.S().z0(myMailStatus);
        }

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

    /* loaded from: classes4.dex */
    static final class d extends v implements dn.l {
        d() {
            super(1);
        }

        public final void a(n0 n0Var) {
            w.d(x4.d.a(MyMailSubscribedTabsFragment.this), yd.i.f52283c, null, null, 6, null);
        }

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

    /* loaded from: classes4.dex */
    static final class e extends v implements dn.l {
        e() {
            super(1);
        }

        public final void a(n0 n0Var) {
            w.d(x4.d.a(MyMailSubscribedTabsFragment.this), yd.i.f52287e, null, null, 6, null);
        }

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

    /* loaded from: classes4.dex */
    static final class f extends v implements dn.l {
        f() {
            super(1);
        }

        public final void a(List list) {
            MyMailSubscribedTabsFragment myMailSubscribedTabsFragment = MyMailSubscribedTabsFragment.this;
            t.d(list);
            myMailSubscribedTabsFragment.O(list);
        }

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

    /* loaded from: classes4.dex */
    static final class g extends v implements dn.l {
        g() {
            super(1);
        }

        public final void a(Boolean bool) {
            SwipeRefreshLayout swipeRefreshLayout = MyMailSubscribedTabsFragment.this.Q().B;
            t.d(bool);
            swipeRefreshLayout.setRefreshing(bool.booleanValue());
        }

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

    /* loaded from: classes4.dex */
    static final class h implements androidx.lifecycle.g0, kotlin.jvm.internal.n {

        /* renamed from: a, reason: collision with root package name */
        private final /* synthetic */ dn.l f10435a;

        h(dn.l function) {
            t.g(function, "function");
            this.f10435a = function;
        }

        @Override // kotlin.jvm.internal.n
        public final rm.i b() {
            return this.f10435a;
        }

        @Override // androidx.lifecycle.g0
        public final /* synthetic */ void d(Object obj) {
            this.f10435a.invoke(obj);
        }

        public final boolean equals(Object obj) {
            if ((obj instanceof androidx.lifecycle.g0) && (obj instanceof kotlin.jvm.internal.n)) {
                return t.b(b(), ((kotlin.jvm.internal.n) obj).b());
            }
            return false;
        }

        public final int hashCode() {
            return b().hashCode();
        }
    }

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

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ androidx.fragment.app.f f10436p;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public i(androidx.fragment.app.f fVar) {
            super(0);
            this.f10436p = fVar;
        }

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

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

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ androidx.fragment.app.f f10437p;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public j(androidx.fragment.app.f fVar) {
            super(0);
            this.f10437p = fVar;
        }

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

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

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

    public MyMailSubscribedTabsFragment() {
        List n10;
        n10 = u.n(Integer.valueOf(yd.k.f52336a0), Integer.valueOf(yd.k.Z));
        this.tabTitles = n10;
        this.firstRender = true;
        this.onPageChangeCallback = new b();
        this.lifecycleEventObserver = new r() { // from class: ca.canadapost.module.mymail.subscribed.j
            @Override // androidx.lifecycle.r
            public final void f(androidx.lifecycle.u uVar, n.a aVar) {
                MyMailSubscribedTabsFragment.T(MyMailSubscribedTabsFragment.this, uVar, aVar);
            }
        };
    }

    /* JADX INFO: Access modifiers changed from: private */
    public final void O(List list) {
        ViewPager2 viewPager2 = Q().A;
        z childFragmentManager = getChildFragmentManager();
        t.f(childFragmentManager, "getChildFragmentManager(...)");
        androidx.lifecycle.n lifecycle = getLifecycle();
        t.f(lifecycle, "<get-lifecycle>(...)");
        viewPager2.setAdapter(new ca.canadapost.module.mymail.subscribed.i(list, childFragmentManager, lifecycle));
        new com.google.android.material.tabs.d(Q().C, Q().A, new d.b() { // from class: ca.canadapost.module.mymail.subscribed.l
            @Override // com.google.android.material.tabs.d.b
            public final void a(TabLayout.g gVar, int i10) {
                MyMailSubscribedTabsFragment.P(MyMailSubscribedTabsFragment.this, gVar, i10);
            }
        }).a();
        Q().A.j(S().D0(), false);
        Q().A.g(this.onPageChangeCallback);
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void P(MyMailSubscribedTabsFragment this$0, TabLayout.g tab, int i10) {
        t.g(this$0, "this$0");
        t.g(tab, "tab");
        this$0.Q().A.j(tab.g(), true);
        tab.p(this$0.getString(((Number) this$0.tabTitles.get(i10)).intValue()));
    }

    private final d0 R() {
        return (d0) this.navViewModel.getValue();
    }

    /* JADX INFO: Access modifiers changed from: private */
    public final m S() {
        return (m) this.viewModel.getValue();
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void T(MyMailSubscribedTabsFragment this$0, androidx.lifecycle.u uVar, n.a event) {
        t.g(this$0, "this$0");
        t.g(uVar, "<anonymous parameter 0>");
        t.g(event, "event");
        if (event == n.a.ON_RESUME) {
            m.a aVar = m.F;
            if (aVar.a()) {
                this$0.S().H0();
            }
            aVar.b(true);
        }
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void V(MyMailSubscribedTabsFragment this$0) {
        t.g(this$0, "this$0");
        this$0.S().I0(false);
    }

    public void M(l8.c error, androidx.fragment.app.f fragment) {
        t.g(error, "error");
        t.g(fragment, "fragment");
        this.f10421t.b(error, fragment);
    }

    public void N(l8.h spinnerVM, androidx.fragment.app.f fragment) {
        t.g(spinnerVM, "spinnerVM");
        t.g(fragment, "fragment");
        this.f10422u.b(spinnerVM, fragment);
    }

    public u0 Q() {
        return (u0) this.f10420s.b();
    }

    public View U(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState, androidx.lifecycle.u viewLifecycleOwner, z0 viewModel) {
        t.g(inflater, "inflater");
        t.g(viewLifecycleOwner, "viewLifecycleOwner");
        t.g(viewModel, "viewModel");
        return this.f10420s.c(inflater, container, savedInstanceState, viewLifecycleOwner, viewModel);
    }

    @Override // w8.o
    public String a(Context context) {
        t.g(context, "context");
        return this.f10421t.a(context);
    }

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

    @Override // w8.p0
    public void c(Activity activity, h.b event) {
        t.g(activity, "activity");
        t.g(event, "event");
        this.f10422u.c(activity, event);
    }

    @Override // w8.o
    public String d(Context context) {
        t.g(context, "context");
        return this.f10421t.d(context);
    }

    @Override // w8.o
    public void e(ResultWrapper.Error error, Context context) {
        t.g(error, "error");
        t.g(context, "context");
        this.f10421t.e(error, context);
    }

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

    @Override // w8.o
    public void g(androidx.fragment.app.f fragment, ResultWrapper.Error error) {
        t.g(fragment, "fragment");
        t.g(error, "error");
        this.f10421t.g(fragment, error);
    }

    @Override // w8.o
    public String h(Context context) {
        t.g(context, "context");
        return this.f10421t.h(context);
    }

    @Override // w8.o
    public String i(ValidationError validationError, Context context) {
        t.g(context, "context");
        return this.f10421t.i(validationError, context);
    }

    @Override // w8.o
    public String j(String code, Context context) {
        t.g(code, "code");
        t.g(context, "context");
        return this.f10421t.j(code, context);
    }

    @Override // w8.o
    public void k(ValidationError validationError, Context context) {
        t.g(context, "context");
        this.f10421t.k(validationError, context);
    }

    @Override // w8.o
    public void l(androidx.fragment.app.f fragment, ResultWrapper.Error error) {
        t.g(fragment, "fragment");
        t.g(error, "error");
        this.f10421t.l(fragment, error);
    }

    @Override // w8.o
    public String m(ValidationError validationError, Context context) {
        t.g(context, "context");
        return this.f10421t.m(validationError, context);
    }

    @Override // w8.o
    public String n(String code, String message, Context context) {
        t.g(code, "code");
        t.g(context, "context");
        return this.f10421t.n(code, message, context);
    }

    @Override // w8.o
    public void o(Context context) {
        t.g(context, "context");
        this.f10421t.o(context);
    }

    @Override // u8.b, androidx.fragment.app.f
    public void onCreate(Bundle bundle) {
        androidx.lifecycle.n lifecycle;
        super.onCreate(bundle);
        androidx.fragment.app.k activity = getActivity();
        if (activity == null || (lifecycle = activity.getLifecycle()) == null) {
            return;
        }
        lifecycle.a(this.lifecycleEventObserver);
    }

    @Override // androidx.fragment.app.f
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        t.g(inflater, "inflater");
        androidx.lifecycle.u viewLifecycleOwner = getViewLifecycleOwner();
        t.f(viewLifecycleOwner, "getViewLifecycleOwner(...)");
        return U(inflater, container, savedInstanceState, viewLifecycleOwner, S());
    }

    @Override // androidx.fragment.app.f
    public void onDestroy() {
        androidx.lifecycle.n lifecycle;
        super.onDestroy();
        androidx.fragment.app.k activity = getActivity();
        if (activity != null && (lifecycle = activity.getLifecycle()) != null) {
            lifecycle.d(this.lifecycleEventObserver);
        }
        m.F.b(false);
    }

    @Override // androidx.fragment.app.f
    public void onStop() {
        super.onStop();
        Q().A.n(this.onPageChangeCallback);
    }

    @Override // u8.b, androidx.fragment.app.f
    public void onViewCreated(View view, Bundle bundle) {
        t.g(view, "view");
        super.onViewCreated(view, bundle);
        N(S(), this);
        M(S(), this);
        d.a.a(this, S(), this, false, 4, null);
        R().P0(true);
        if (this.firstRender) {
            S().I0(true);
            this.firstRender = false;
        }
        S().W().j(getViewLifecycleOwner(), new h(new c()));
        S().B0().j(getViewLifecycleOwner(), new h(new d()));
        S().C0().j(getViewLifecycleOwner(), new h(new e()));
        S().F0().j(getViewLifecycleOwner(), new h(new f()));
        Q().B.setOnRefreshListener(new SwipeRefreshLayout.j() { // from class: ca.canadapost.module.mymail.subscribed.k
            @Override // androidx.swiperefreshlayout.widget.SwipeRefreshLayout.j
            public final void a() {
                MyMailSubscribedTabsFragment.V(MyMailSubscribedTabsFragment.this);
            }
        });
        S().G0().j(getViewLifecycleOwner(), new h(new g()));
    }

    @Override // w8.p0
    public void p(androidx.fragment.app.f fragment, h.b event) {
        t.g(fragment, "fragment");
        t.g(event, "event");
        this.f10422u.p(fragment, event);
    }
}
