package ca.canadapost.module.track.views;

import android.app.Activity;
import android.content.Context;
import android.os.Build;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.activity.s;
import androidx.core.view.h0;
import androidx.core.view.h1;
import androidx.core.view.s0;
import androidx.lifecycle.c1;
import androidx.lifecycle.e1;
import androidx.lifecycle.u;
import androidx.lifecycle.z0;
import androidx.recyclerview.widget.RecyclerView;
import ca.canadapost.core.data.model.ResultWrapper;
import ca.canadapost.core.data.model.ValidationError;
import ca.canadapost.module.track.model.EmailInfo;
import ca.canadapost.module.track.views.TrackEmailNotificationFragment;
import ca.canadapost.module.track.views.l;
import com.google.firebase.messaging.Constants;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import jg.i5;
import jg.j5;
import jg.q5;
import kotlin.Metadata;
import kotlin.jvm.internal.t;
import kotlin.jvm.internal.v;
import l8.h;
import rm.n0;
import rm.q;
import sm.p;
import u7.x;
import u8.g;
import w8.d0;
import w8.o;
import w8.p0;

@Metadata(d1 = {"\u0000\u009e\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\u0010\u000b\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\u0000\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\n\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\f\u0018\u0000 U2\u00020\u00012\b\u0012\u0004\u0012\u00020\u00030\u00022\u00020\u00042\u00020\u0005:\u0002'VB\u0007¢\u0006\u0004\bS\u0010TJ\b\u0010\u0007\u001a\u00020\u0006H\u0002J5\u0010\u0013\u001a\u00020\u00122\u0006\u0010\t\u001a\u00020\b2\b\u0010\u000b\u001a\u0004\u0018\u00010\n2\b\u0010\r\u001a\u0004\u0018\u00010\f2\u0006\u0010\u000f\u001a\u00020\u000e2\u0006\u0010\u0011\u001a\u00020\u0010H\u0096\u0001J\u0019\u0010\u0019\u001a\u00020\u00182\u0006\u0010\u0015\u001a\u00020\u00142\u0006\u0010\u0017\u001a\u00020\u0016H\u0096\u0001J\u001b\u0010\u001f\u001a\u00020\u001e2\b\u0010\u001b\u001a\u0004\u0018\u00010\u001a2\u0006\u0010\u001d\u001a\u00020\u001cH\u0096\u0001J#\u0010\"\u001a\u00020\u001e2\u0006\u0010 \u001a\u00020\u001e2\b\u0010!\u001a\u0004\u0018\u00010\u001e2\u0006\u0010\u001d\u001a\u00020\u001cH\u0096\u0001J\u001b\u0010#\u001a\u00020\u001e2\b\u0010\u001b\u001a\u0004\u0018\u00010\u001a2\u0006\u0010\u001d\u001a\u00020\u001cH\u0096\u0001J\u0019\u0010$\u001a\u00020\u001e2\u0006\u0010 \u001a\u00020\u001e2\u0006\u0010\u001d\u001a\u00020\u001cH\u0096\u0001J\u0011\u0010%\u001a\u00020\u001e2\u0006\u0010\u001d\u001a\u00020\u001cH\u0096\u0001J\u0011\u0010&\u001a\u00020\u001e2\u0006\u0010\u001d\u001a\u00020\u001cH\u0096\u0001J\u0011\u0010'\u001a\u00020\u001e2\u0006\u0010\u001d\u001a\u00020\u001cH\u0096\u0001J\u0019\u0010)\u001a\u00020\u00182\u0006\u0010\u0015\u001a\u00020(2\u0006\u0010\u001d\u001a\u00020\u001cH\u0096\u0001J\u0019\u0010*\u001a\u00020\u00182\u0006\u0010\u0017\u001a\u00020\u00162\u0006\u0010\u0015\u001a\u00020(H\u0096\u0001J\u0011\u0010+\u001a\u00020\u00182\u0006\u0010\u001d\u001a\u00020\u001cH\u0096\u0001J\u0019\u0010,\u001a\u00020\u00182\u0006\u0010\u0017\u001a\u00020\u00162\u0006\u0010\u0015\u001a\u00020(H\u0096\u0001J\u001b\u0010.\u001a\u00020\u00182\b\u0010-\u001a\u0004\u0018\u00010\u001a2\u0006\u0010\u001d\u001a\u00020\u001cH\u0096\u0001J\u0019\u00101\u001a\u00020\u00182\u0006\u00100\u001a\u00020/2\u0006\u0010\u0017\u001a\u00020\u0016H\u0096\u0001J\u0019\u00106\u001a\u00020\u00182\u0006\u00103\u001a\u0002022\u0006\u00105\u001a\u000204H\u0096\u0001J\u0019\u00107\u001a\u00020\u00182\u0006\u0010\u0017\u001a\u00020\u00162\u0006\u00105\u001a\u000204H\u0096\u0001J\u0012\u00108\u001a\u00020\u00182\b\u0010\r\u001a\u0004\u0018\u00010\fH\u0016J$\u00109\u001a\u00020\u00122\u0006\u0010\t\u001a\u00020\b2\b\u0010\u000b\u001a\u0004\u0018\u00010\n2\b\u0010\r\u001a\u0004\u0018\u00010\fH\u0016J\u001a\u0010;\u001a\u00020\u00182\u0006\u0010:\u001a\u00020\u00122\b\u0010\r\u001a\u0004\u0018\u00010\fH\u0016J\b\u0010<\u001a\u00020\u0006H\u0016J\u0010\u0010>\u001a\u00020\u00182\u0006\u0010=\u001a\u00020\fH\u0016R\u0016\u0010B\u001a\u00020?8\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\b@\u0010AR\"\u0010J\u001a\u00020C8\u0006@\u0006X\u0087.¢\u0006\u0012\n\u0004\bD\u0010E\u001a\u0004\bF\u0010G\"\u0004\bH\u0010IR\u001b\u0010\u0011\u001a\u00020K8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\bL\u0010M\u001a\u0004\bN\u0010OR\u0014\u0010R\u001a\u00020\u00038\u0016X\u0096\u0005¢\u0006\u0006\u001a\u0004\bP\u0010Q¨\u0006W"}, d2 = {"Lca/canadapost/module/track/views/TrackEmailNotificationFragment;", "Lu8/b;", "", "Lzf/i;", "Lw8/o;", "Lw8/p0;", "", "R", "Landroid/view/LayoutInflater;", "inflater", "Landroid/view/ViewGroup;", "container", "Landroid/os/Bundle;", "savedInstanceState", "Landroidx/lifecycle/u;", "viewLifecycleOwner", "Landroidx/lifecycle/z0;", "viewModel", "Landroid/view/View;", "P", "Ll8/c;", Constants.IPC_BUNDLE_KEY_SEND_ERROR, "Landroidx/fragment/app/f;", "fragment", "Lrm/n0;", "K", "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", "L", "Landroid/app/Activity;", "activity", "Ll8/h$b;", "event", "c", "p", "onCreate", "onCreateView", "view", "onViewCreated", "E", "outState", "onSaveInstanceState", "Ljg/q5;", "v", "Ljg/q5;", "adapter", "Ljg/j5;", "w", "Ljg/j5;", "N", "()Ljg/j5;", "setTrackEmailNotificationsViewModelFactory", "(Ljg/j5;)V", "trackEmailNotificationsViewModelFactory", "Ljg/i5;", "x", "Lrm/o;", "O", "()Ljg/i5;", "M", "()Lzf/i;", "binding", "<init>", "()V", "y", "b", "track_productionRelease"}, k = 1, mv = {1, 9, 0})
/* loaded from: classes4.dex */
public final class TrackEmailNotificationFragment extends u8.b implements o, p0 {

    /* renamed from: s, reason: collision with root package name */
    private final /* synthetic */ x f11103s = new x(yf.e.f52508g);

    /* renamed from: t, reason: collision with root package name */
    private final /* synthetic */ b f11104t = new b();

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

    /* renamed from: v, reason: collision with root package name and from kotlin metadata */
    private q5 adapter;

    /* renamed from: w, reason: collision with root package name and from kotlin metadata */
    public j5 trackEmailNotificationsViewModelFactory;

    /* renamed from: x, reason: collision with root package name and from kotlin metadata */
    private final rm.o viewModel;

    /* JADX INFO: Access modifiers changed from: private */
    /* loaded from: classes4.dex */
    public static final class b implements o {
        @Override // w8.o
        public String a(Context context) {
            return o.a.h(this, context);
        }

        public void b(l8.c cVar, androidx.fragment.app.f fVar) {
            o.a.a(this, cVar, fVar);
        }

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

        @Override // w8.o
        public void e(ResultWrapper.Error error, Context context) {
            o.a.i(this, error, context);
        }

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

        @Override // w8.o
        public String h(Context context) {
            return o.a.f(this, context);
        }

        @Override // w8.o
        public String i(ValidationError validationError, Context context) {
            return o.a.d(this, validationError, context);
        }

        @Override // w8.o
        public String j(String code, Context context) {
            String[] strArr;
            boolean N;
            t.g(code, "code");
            t.g(context, "context");
            strArr = l.f11220a;
            N = p.N(strArr, code);
            if (!N) {
                return o.a.e(this, code, context);
            }
            String string = context.getString(yf.h.B0);
            t.d(string);
            return string;
        }

        @Override // w8.o
        public void k(ValidationError validationError, Context context) {
            o.a.m(this, validationError, context);
        }

        @Override // w8.o
        public void l(androidx.fragment.app.f fVar, ResultWrapper.Error error) {
            o.a.j(this, fVar, error);
        }

        @Override // w8.o
        public String m(ValidationError validationError, Context context) {
            return o.a.b(this, validationError, context);
        }

        @Override // w8.o
        public String n(String code, String str, Context context) {
            String[] strArr;
            boolean N;
            t.g(code, "code");
            t.g(context, "context");
            strArr = l.f11220a;
            N = p.N(strArr, code);
            if (!N) {
                return o.a.c(this, code, str, context);
            }
            String string = context.getString(yf.h.A0);
            t.d(string);
            return string;
        }

        @Override // w8.o
        public void o(Context context) {
            o.a.k(this, context);
        }
    }

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

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

        /* renamed from: invoke, reason: collision with other method in class */
        public final void m187invoke() {
            i5 O = TrackEmailNotificationFragment.this.O();
            q5 q5Var = TrackEmailNotificationFragment.this.adapter;
            if (q5Var == null) {
                t.y("adapter");
                q5Var = null;
            }
            O.j0(q5Var.g());
        }
    }

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

        public final void a(List list) {
            List list2 = list;
            if (list2 == null || list2.isEmpty()) {
                return;
            }
            q5 q5Var = TrackEmailNotificationFragment.this.adapter;
            q5 q5Var2 = null;
            if (q5Var == null) {
                t.y("adapter");
                q5Var = null;
            }
            t.d(list);
            q5Var.M(list);
            i5 O = TrackEmailNotificationFragment.this.O();
            q5 q5Var3 = TrackEmailNotificationFragment.this.adapter;
            if (q5Var3 == null) {
                t.y("adapter");
            } else {
                q5Var2 = q5Var3;
            }
            O.j0(q5Var2.g());
        }

        @Override // dn.l
        public /* bridge */ /* synthetic */ Object invoke(Object obj) {
            a((List) 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) {
            TrackEmailNotificationFragment.this.C();
            q5 q5Var = TrackEmailNotificationFragment.this.adapter;
            q5 q5Var2 = null;
            if (q5Var == null) {
                t.y("adapter");
                q5Var = null;
            }
            q5Var.I();
            i5 O = TrackEmailNotificationFragment.this.O();
            q5 q5Var3 = TrackEmailNotificationFragment.this.adapter;
            if (q5Var3 == null) {
                t.y("adapter");
            } else {
                q5Var2 = q5Var3;
            }
            O.j0(q5Var2.g());
        }

        @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(n0 n0Var) {
            TrackEmailNotificationFragment.this.C();
            i5 O = TrackEmailNotificationFragment.this.O();
            q5 q5Var = TrackEmailNotificationFragment.this.adapter;
            if (q5Var == null) {
                t.y("adapter");
                q5Var = null;
            }
            O.i0(q5Var.J());
        }

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

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

        public final void a(n0 n0Var) {
            View x10 = TrackEmailNotificationFragment.this.M().x();
            t.f(x10, "getRoot(...)");
            String string = TrackEmailNotificationFragment.this.getString(yf.h.f52637r2);
            t.f(string, "getString(...)");
            d0.v(x10, string);
            x4.d.a(TrackEmailNotificationFragment.this).U();
        }

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

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

        public final void a(androidx.activity.p addCallback) {
            t.g(addCallback, "$this$addCallback");
            if (TrackEmailNotificationFragment.this.R()) {
                return;
            }
            x4.d.a(TrackEmailNotificationFragment.this).U();
        }

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

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes4.dex */
    public static final class i extends v implements dn.a {
        i() {
            super(0);
        }

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

        /* renamed from: invoke, reason: collision with other method in class */
        public final void m188invoke() {
            x4.d.a(TrackEmailNotificationFragment.this).U();
        }
    }

    /* 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 f11116p;

        /* 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.f11116p = fVar;
        }

        @Override // dn.a
        /* renamed from: a, reason: merged with bridge method [inline-methods] */
        public final androidx.fragment.app.f invoke() {
            return this.f11116p;
        }
    }

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

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

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

        /* loaded from: classes4.dex */
        public static final class a implements c1.c {

            /* renamed from: b, reason: collision with root package name */
            final /* synthetic */ TrackEmailNotificationFragment f11119b;

            public a(TrackEmailNotificationFragment trackEmailNotificationFragment) {
                this.f11119b = trackEmailNotificationFragment;
            }

            @Override // androidx.lifecycle.c1.c
            public z0 a(Class modelClass) {
                t.g(modelClass, "modelClass");
                j5 N = this.f11119b.N();
                Bundle arguments = this.f11119b.getArguments();
                String string = arguments != null ? arguments.getString("item_number") : null;
                if (string == null) {
                    string = "";
                }
                i5 a10 = N.a(string);
                t.e(a10, "null cannot be cast to non-null type U of ca.canadapost.core.common.utils.KotlinExtensionsKt.viewModels.<no name provided>.invoke.<no name provided>.create");
                return a10;
            }
        }

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public k(dn.a aVar, TrackEmailNotificationFragment trackEmailNotificationFragment) {
            super(0);
            this.f11117p = aVar;
            this.f11118q = trackEmailNotificationFragment;
        }

        @Override // dn.a
        /* renamed from: a, reason: merged with bridge method [inline-methods] */
        public final z0 invoke() {
            return new c1((e1) this.f11117p.invoke(), new a(this.f11118q)).a(i5.class);
        }
    }

    public TrackEmailNotificationFragment() {
        rm.o a10;
        a10 = q.a(new k(new j(this), this));
        this.viewModel = a10;
    }

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

    /* JADX INFO: Access modifiers changed from: private */
    public static final h1 Q(View v10, h1 windowInsets) {
        t.g(v10, "v");
        t.g(windowInsets, "windowInsets");
        androidx.core.graphics.b f10 = windowInsets.f(h1.l.f());
        t.f(f10, "getInsets(...)");
        ViewGroup.LayoutParams layoutParams = v10.getLayoutParams();
        if (layoutParams == null) {
            throw new NullPointerException("null cannot be cast to non-null type android.view.ViewGroup.MarginLayoutParams");
        }
        ViewGroup.MarginLayoutParams marginLayoutParams = (ViewGroup.MarginLayoutParams) layoutParams;
        marginLayoutParams.bottomMargin = f10.f3727d;
        v10.setLayoutParams(marginLayoutParams);
        return h1.f3850b;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public final boolean R() {
        q5 q5Var = this.adapter;
        if (q5Var == null) {
            t.y("adapter");
            q5Var = null;
        }
        List J = q5Var.J();
        boolean z10 = false;
        if (!(J instanceof Collection) || !J.isEmpty()) {
            Iterator it = J.iterator();
            while (true) {
                if (!it.hasNext()) {
                    break;
                }
                if (((EmailInfo) it.next()).getEmail().length() > 0) {
                    z10 = true;
                    break;
                }
            }
        }
        if (z10) {
            g.a aVar = u8.g.f36993k;
            Context requireContext = requireContext();
            String string = getString(yf.h.f52670y0);
            t.f(string, "getString(...)");
            u8.g l10 = aVar.l(requireContext, string, getString(h7.l.f21139f0));
            l10.n(getString(h7.l.f21129d0));
            l10.p(getString(h7.l.B));
            l10.o(new i());
            l10.x(requireContext());
        }
        return z10;
    }

    @Override // u8.b
    public boolean E() {
        return R();
    }

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

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

    public zf.i M() {
        return (zf.i) this.f11103s.b();
    }

    public final j5 N() {
        j5 j5Var = this.trackEmailNotificationsViewModelFactory;
        if (j5Var != null) {
            return j5Var;
        }
        t.y("trackEmailNotificationsViewModelFactory");
        return null;
    }

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

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

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

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

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

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

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

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

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

    @Override // w8.o
    public void k(ValidationError validationError, Context context) {
        t.g(context, "context");
        this.f11104t.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.f11104t.l(fragment, error);
    }

    @Override // w8.o
    public String m(ValidationError validationError, Context context) {
        t.g(context, "context");
        return this.f11104t.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.f11104t.n(code, message, context);
    }

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

    @Override // u8.b, androidx.fragment.app.f
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        this.adapter = new q5(new c(), O().Y());
    }

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

    @Override // androidx.fragment.app.f
    public void onSaveInstanceState(Bundle outState) {
        t.g(outState, "outState");
        super.onSaveInstanceState(outState);
        i5 O = O();
        q5 q5Var = this.adapter;
        if (q5Var == null) {
            t.y("adapter");
            q5Var = null;
        }
        O.k0(q5Var.J());
    }

    @Override // u8.b, androidx.fragment.app.f
    public void onViewCreated(View view, Bundle bundle) {
        t.g(view, "view");
        super.onViewCreated(view, bundle);
        K(O(), this);
        L(O(), this);
        RecyclerView recyclerView = M().D;
        q5 q5Var = this.adapter;
        if (q5Var == null) {
            t.y("adapter");
            q5Var = null;
        }
        recyclerView.setAdapter(q5Var);
        O().X().j(getViewLifecycleOwner(), new l.a(new d()));
        O().U().j(getViewLifecycleOwner(), new l.a(new e()));
        O().c0().j(getViewLifecycleOwner(), new l.a(new f()));
        O().f0().j(getViewLifecycleOwner(), new l.a(new g()));
        androidx.activity.q onBackPressedDispatcher = requireActivity().getOnBackPressedDispatcher();
        t.f(onBackPressedDispatcher, "<get-onBackPressedDispatcher>(...)");
        s.b(onBackPressedDispatcher, getViewLifecycleOwner(), false, new h(), 2, null);
        if (Build.VERSION.SDK_INT >= 35) {
            s0.A0(M().B, new h0() { // from class: jg.g5
                @Override // androidx.core.view.h0
                public final androidx.core.view.h1 a(View view2, androidx.core.view.h1 h1Var) {
                    androidx.core.view.h1 Q;
                    Q = TrackEmailNotificationFragment.Q(view2, h1Var);
                    return Q;
                }
            });
        }
    }

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