package ca.canadapost.module.mymail.waitlist;

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.lifecycle.c1;
import androidx.lifecycle.d1;
import androidx.lifecycle.e1;
import androidx.lifecycle.u;
import androidx.lifecycle.z0;
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.waitlist.MyMailWaitListFragment;
import com.google.firebase.messaging.Constants;
import kotlin.Metadata;
import kotlin.jvm.internal.n;
import kotlin.jvm.internal.t;
import kotlin.jvm.internal.v;
import l8.h;
import n8.e0;
import o8.d0;
import o8.g0;
import o8.h0;
import rm.n0;
import u7.x;
import w8.l;
import w8.o;
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\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\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\n\u0018\u00002\u00020\u00012\b\u0012\u0004\u0012\u00020\u00030\u00022\u00020\u00042\u00020\u00052\u00020\u0006B\u0007¢\u0006\u0004\bO\u0010PJ5\u0010\u0012\u001a\u00020\u00112\u0006\u0010\b\u001a\u00020\u00072\b\u0010\n\u001a\u0004\u0018\u00010\t2\b\u0010\f\u001a\u0004\u0018\u00010\u000b2\u0006\u0010\u000e\u001a\u00020\r2\u0006\u0010\u0010\u001a\u00020\u000fH\u0096\u0001J\u0019\u0010\u0018\u001a\u00020\u00172\u0006\u0010\u0014\u001a\u00020\u00132\u0006\u0010\u0016\u001a\u00020\u0015H\u0096\u0001J\u001b\u0010\u001e\u001a\u00020\u001d2\b\u0010\u001a\u001a\u0004\u0018\u00010\u00192\u0006\u0010\u001c\u001a\u00020\u001bH\u0096\u0001J#\u0010!\u001a\u00020\u001d2\u0006\u0010\u001f\u001a\u00020\u001d2\b\u0010 \u001a\u0004\u0018\u00010\u001d2\u0006\u0010\u001c\u001a\u00020\u001bH\u0096\u0001J\u001b\u0010\"\u001a\u00020\u001d2\b\u0010\u001a\u001a\u0004\u0018\u00010\u00192\u0006\u0010\u001c\u001a\u00020\u001bH\u0096\u0001J\u0019\u0010#\u001a\u00020\u001d2\u0006\u0010\u001f\u001a\u00020\u001d2\u0006\u0010\u001c\u001a\u00020\u001bH\u0096\u0001J\u0011\u0010$\u001a\u00020\u001d2\u0006\u0010\u001c\u001a\u00020\u001bH\u0096\u0001J\u0011\u0010%\u001a\u00020\u001d2\u0006\u0010\u001c\u001a\u00020\u001bH\u0096\u0001J\u0011\u0010&\u001a\u00020\u001d2\u0006\u0010\u001c\u001a\u00020\u001bH\u0096\u0001J\u0019\u0010(\u001a\u00020\u00172\u0006\u0010\u0014\u001a\u00020'2\u0006\u0010\u001c\u001a\u00020\u001bH\u0096\u0001J\u0019\u0010)\u001a\u00020\u00172\u0006\u0010\u0016\u001a\u00020\u00152\u0006\u0010\u0014\u001a\u00020'H\u0096\u0001J\u0011\u0010*\u001a\u00020\u00172\u0006\u0010\u001c\u001a\u00020\u001bH\u0096\u0001J\u0019\u0010+\u001a\u00020\u00172\u0006\u0010\u0016\u001a\u00020\u00152\u0006\u0010\u0014\u001a\u00020'H\u0096\u0001J\u001b\u0010-\u001a\u00020\u00172\b\u0010,\u001a\u0004\u0018\u00010\u00192\u0006\u0010\u001c\u001a\u00020\u001bH\u0096\u0001J\u0019\u00100\u001a\u00020\u00172\u0006\u0010/\u001a\u00020.2\u0006\u0010\u0016\u001a\u00020\u0015H\u0096\u0001J\u0019\u00105\u001a\u00020\u00172\u0006\u00102\u001a\u0002012\u0006\u00104\u001a\u000203H\u0096\u0001J\u0019\u00106\u001a\u00020\u00172\u0006\u0010\u0016\u001a\u00020\u00152\u0006\u00104\u001a\u000203H\u0096\u0001J#\u0010;\u001a\u00020\u00172\u0006\u00108\u001a\u0002072\u0006\u0010\u0016\u001a\u00020\u00152\b\b\u0002\u0010:\u001a\u000209H\u0096\u0001J#\u0010=\u001a\u00020\u00172\u0006\u00108\u001a\u0002072\u0006\u00102\u001a\u00020<2\b\b\u0002\u0010:\u001a\u000209H\u0096\u0001J$\u0010>\u001a\u00020\u00112\u0006\u0010\b\u001a\u00020\u00072\b\u0010\n\u001a\u0004\u0018\u00010\t2\b\u0010\f\u001a\u0004\u0018\u00010\u000bH\u0016J\u001a\u0010@\u001a\u00020\u00172\u0006\u0010?\u001a\u00020\u00112\b\u0010\f\u001a\u0004\u0018\u00010\u000bH\u0016J\b\u0010A\u001a\u00020\u0017H\u0016R\u001b\u0010\u0010\u001a\u00020B8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\bC\u0010D\u001a\u0004\bE\u0010FR\u001b\u0010K\u001a\u00020G8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\bH\u0010D\u001a\u0004\bI\u0010JR\u0014\u0010N\u001a\u00020\u00038\u0016X\u0096\u0005¢\u0006\u0006\u001a\u0004\bL\u0010M¨\u0006Q"}, d2 = {"Lca/canadapost/module/mymail/waitlist/MyMailWaitListFragment;", "Lu8/b;", "", "Lae/o;", "Lw8/o;", "Lw8/p0;", "Lca/canadapost/core/common/navigation/ui/d;", "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", "Lo8/h0;", "profileNavigationVMHandler", "", "showTwoSv", "f", "Landroidx/fragment/app/k;", "b", "onCreateView", "view", "onViewCreated", "onResume", "Lqe/c;", "w", "Lrm/o;", "O", "()Lqe/c;", "Lo8/d0;", "x", "N", "()Lo8/d0;", "navViewModel", "M", "()Lae/o;", "binding", "<init>", "()V", "mymail_productionRelease"}, k = 1, mv = {1, 9, 0})
/* loaded from: classes4.dex */
public final class MyMailWaitListFragment extends u8.b implements o, p0, ca.canadapost.core.common.navigation.ui.d {

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

    /* renamed from: t, reason: collision with root package name */
    private final /* synthetic */ w8.k f10591t = 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 */ l f10592u = new l();

    /* renamed from: v, reason: collision with root package name */
    private final /* synthetic */ g0 f10593v = 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(qe.c.class), new j(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 h(this), new a());

    /* 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 MyMailWaitListFragment.this.y();
        }
    }

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

        public final void a(n0 n0Var) {
            w.d(x4.d.a(MyMailWaitListFragment.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 c extends v implements dn.l {
        c() {
            super(1);
        }

        public final void a(n0 n0Var) {
            w.d(x4.d.a(MyMailWaitListFragment.this), yd.i.f52285d, 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 d extends v implements dn.l {
        d() {
            super(1);
        }

        public final void a(n0 n0Var) {
            w.d(x4.d.a(MyMailWaitListFragment.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(MyMailStatus myMailStatus) {
            MyMailWaitListFragment.this.O().o0(myMailStatus);
        }

        @Override // dn.l
        public /* bridge */ /* synthetic */ Object invoke(Object obj) {
            a((MyMailStatus) 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) {
            x4.d.a(MyMailWaitListFragment.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 g implements androidx.lifecycle.g0, n {

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

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

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

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

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

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

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

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

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

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

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

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

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

    /* 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 */ dn.a f10605p;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public j(dn.a aVar) {
            super(0);
            this.f10605p = aVar;
        }

        @Override // dn.a
        /* renamed from: a, reason: merged with bridge method [inline-methods] */
        public final d1 invoke() {
            d1 viewModelStore = ((e1) this.f10605p.invoke()).getViewModelStore();
            t.f(viewModelStore, "ownerProducer().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 MyMailWaitListFragment.this.y();
        }
    }

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

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

    /* JADX INFO: Access modifiers changed from: private */
    public static final void Q(MyMailWaitListFragment this$0, View view) {
        t.g(this$0, "this$0");
        e0.a aVar = e0.f29852a;
        Context requireContext = this$0.requireContext();
        t.f(requireContext, "requireContext(...)");
        String string = this$0.getString(yd.k.f52340c0);
        t.f(string, "getString(...)");
        aVar.a(requireContext, string);
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void R(MyMailWaitListFragment this$0, View view) {
        t.g(this$0, "this$0");
        w.d(x4.d.a(this$0), yd.i.f52297m, null, null, 6, null);
    }

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

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

    public ae.o M() {
        return (ae.o) this.f10590s.b();
    }

    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.f10590s.c(inflater, container, savedInstanceState, viewLifecycleOwner, viewModel);
    }

    @Override // w8.o
    public String a(Context context) {
        t.g(context, "context");
        return this.f10591t.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.f10593v.b(profileNavigationVMHandler, activity, z10);
    }

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

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

    @Override // w8.o
    public void e(ResultWrapper.Error error, Context context) {
        t.g(error, "error");
        t.g(context, "context");
        this.f10591t.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.f10593v.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.f10591t.g(fragment, error);
    }

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

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

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

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

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

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

    @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 // u8.b, androidx.fragment.app.f
    public void onResume() {
        super.onResume();
        N().P0(!O().t0());
        O().u0();
    }

    @Override // u8.b, androidx.fragment.app.f
    public void onViewCreated(View view, Bundle bundle) {
        t.g(view, "view");
        super.onViewCreated(view, bundle);
        L(O(), this);
        K(O(), this);
        d.a.a(this, O(), this, false, 4, null);
        M().A.setOnClickListener(new View.OnClickListener() { // from class: qe.a
            @Override // android.view.View.OnClickListener
            public final void onClick(View view2) {
                MyMailWaitListFragment.Q(MyMailWaitListFragment.this, view2);
            }
        });
        M().B.setOnClickListener(new View.OnClickListener() { // from class: qe.b
            @Override // android.view.View.OnClickListener
            public final void onClick(View view2) {
                MyMailWaitListFragment.R(MyMailWaitListFragment.this, view2);
            }
        });
        O().r0().j(getViewLifecycleOwner(), new g(new b()));
        O().s0().j(getViewLifecycleOwner(), new g(new c()));
        O().p0().j(getViewLifecycleOwner(), new g(new d()));
        O().W().j(getViewLifecycleOwner(), new g(new e()));
        O().q0().j(getViewLifecycleOwner(), new g(new f()));
    }

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