package ca.canadapost.module.epostprofile.account.notifications;

import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.compose.foundation.layout.l;
import androidx.compose.ui.platform.AndroidCompositionLocals_androidKt;
import androidx.fragment.app.k;
import androidx.fragment.app.p0;
import androidx.lifecycle.c1;
import androidx.lifecycle.d1;
import androidx.lifecycle.e1;
import androidx.lifecycle.g0;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import dn.p;
import h2.e0;
import j2.g;
import kotlin.Metadata;
import kotlin.jvm.internal.t;
import kotlin.jvm.internal.v;
import l1.c;
import l1.i;
import l7.n;
import n8.m;
import rm.n0;
import rm.o;
import v0.z1;
import w8.w;
import y0.d4;
import y0.l2;
import y0.m;
import y0.x2;
import y0.y;
import z.a0;

@Metadata(d1 = {"\u0000?\n\u0002\u0018\u0002\n\u0002\u0018\u0002\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\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\b\u0007*\u0001\u0017\b\u0007\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u001b\u0010\u001cJ\u0017\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u0002H\u0003¢\u0006\u0004\b\u0005\u0010\u0006J$\u0010\u000e\u001a\u00020\r2\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\u0010\u001a\u00020\u00042\u0006\u0010\u000f\u001a\u00020\r2\b\u0010\f\u001a\u0004\u0018\u00010\u000bH\u0016R\u001b\u0010\u0016\u001a\u00020\u00118BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b\u0012\u0010\u0013\u001a\u0004\b\u0014\u0010\u0015R\u0014\u0010\u001a\u001a\u00020\u00178\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0018\u0010\u0019¨\u0006\u001d"}, d2 = {"Lca/canadapost/module/epostprofile/account/notifications/AnonymousTextNotificationsFragment;", "Lu8/b;", "Lwb/a;", "viewState", "Lrm/n0;", "G", "(Lwb/a;Ly0/m;I)V", "Landroid/view/LayoutInflater;", "inflater", "Landroid/view/ViewGroup;", "container", "Landroid/os/Bundle;", "savedInstanceState", "Landroid/view/View;", "onCreateView", "view", "onViewCreated", "Lwb/b;", "s", "Lrm/o;", "K", "()Lwb/b;", "viewModel", "ca/canadapost/module/epostprofile/account/notifications/AnonymousTextNotificationsFragment$f", "t", "Lca/canadapost/module/epostprofile/account/notifications/AnonymousTextNotificationsFragment$f;", "previewState", "<init>", "()V", "epostprofile_productionRelease"}, k = 1, mv = {1, 9, 0})
/* loaded from: classes4.dex */
public final class AnonymousTextNotificationsFragment extends u8.b {

    /* renamed from: s, reason: collision with root package name and from kotlin metadata */
    private final o viewModel = p0.a(this, kotlin.jvm.internal.p0.b(wb.b.class), new i(new h(this)), new j());

    /* renamed from: t, reason: collision with root package name and from kotlin metadata */
    private final f previewState = new f();

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes4.dex */
    public static final class a extends v implements p {

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

        /* JADX INFO: Access modifiers changed from: package-private */
        /* renamed from: ca.canadapost.module.epostprofile.account.notifications.AnonymousTextNotificationsFragment$a$a, reason: collision with other inner class name */
        /* loaded from: classes4.dex */
        public static final class C0242a extends v implements dn.a {

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

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

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

            /* renamed from: invoke, reason: collision with other method in class */
            public final void m96invoke() {
                this.f8661p.B();
            }
        }

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        a(wb.a aVar) {
            super(2);
            this.f8660p = aVar;
        }

        public final void a(m mVar, int i10) {
            if ((i10 & 11) == 2 && mVar.v()) {
                mVar.A();
                return;
            }
            if (y0.p.H()) {
                y0.p.Q(-394333642, i10, -1, "ca.canadapost.module.epostprofile.account.notifications.AnonymousTextNotificationsFragment.AnonymousTextNotificationsScreen.<anonymous> (AnonymousTextNotificationsFragment.kt:63)");
            }
            i.a aVar = l1.i.f27362a;
            l1.i h10 = androidx.compose.foundation.layout.o.h(aVar, BitmapDescriptorFactory.HUE_RED, 1, null);
            n7.a aVar2 = n7.a.f29827a;
            int i11 = n7.a.f29828b;
            l1.i m10 = l.m(h10, aVar2.b(mVar, i11).H(), BitmapDescriptorFactory.HUE_RED, aVar2.b(mVar, i11).H(), BitmapDescriptorFactory.HUE_RED, 10, null);
            wb.a aVar3 = this.f8660p;
            c.a aVar4 = l1.c.f27332a;
            e0 h11 = androidx.compose.foundation.layout.b.h(aVar4.o(), false);
            int a10 = y0.j.a(mVar, 0);
            y D = mVar.D();
            l1.i e10 = l1.h.e(mVar, m10);
            g.a aVar5 = j2.g.f23616d;
            dn.a a11 = aVar5.a();
            if (!(mVar.w() instanceof y0.f)) {
                y0.j.c();
            }
            mVar.u();
            if (mVar.n()) {
                mVar.o(a11);
            } else {
                mVar.F();
            }
            m a12 = d4.a(mVar);
            d4.b(a12, h11, aVar5.c());
            d4.b(a12, D, aVar5.e());
            p b10 = aVar5.b();
            if (a12.n() || !t.b(a12.f(), Integer.valueOf(a10))) {
                a12.I(Integer.valueOf(a10));
                a12.l(Integer.valueOf(a10), b10);
            }
            d4.b(a12, e10, aVar5.d());
            androidx.compose.foundation.layout.d dVar = androidx.compose.foundation.layout.d.f1828a;
            l1.i a13 = dVar.a(androidx.compose.foundation.layout.o.g(aVar, 1.0f), aVar4.m());
            e0 a14 = e0.d.a(e0.b.f16607a.h(), aVar4.k(), mVar, 0);
            int a15 = y0.j.a(mVar, 0);
            y D2 = mVar.D();
            l1.i e11 = l1.h.e(mVar, a13);
            dn.a a16 = aVar5.a();
            if (!(mVar.w() instanceof y0.f)) {
                y0.j.c();
            }
            mVar.u();
            if (mVar.n()) {
                mVar.o(a16);
            } else {
                mVar.F();
            }
            m a17 = d4.a(mVar);
            d4.b(a17, a14, aVar5.c());
            d4.b(a17, D2, aVar5.e());
            p b11 = aVar5.b();
            if (a17.n() || !t.b(a17.f(), Integer.valueOf(a15))) {
                a17.I(Integer.valueOf(a15));
                a17.l(Integer.valueOf(a15), b11);
            }
            d4.b(a17, e11, aVar5.d());
            e0.g gVar = e0.g.f16653a;
            float f10 = 24;
            float t10 = c3.h.t(f10);
            l7.o oVar = l7.o.Vertical;
            n.a(t10, oVar, mVar, 54);
            l1.i h12 = androidx.compose.foundation.layout.o.h(aVar, BitmapDescriptorFactory.HUE_RED, 1, null);
            e0 h13 = androidx.compose.foundation.layout.b.h(aVar4.o(), false);
            int a18 = y0.j.a(mVar, 0);
            y D3 = mVar.D();
            l1.i e12 = l1.h.e(mVar, h12);
            dn.a a19 = aVar5.a();
            if (!(mVar.w() instanceof y0.f)) {
                y0.j.c();
            }
            mVar.u();
            if (mVar.n()) {
                mVar.o(a19);
            } else {
                mVar.F();
            }
            m a20 = d4.a(mVar);
            d4.b(a20, h13, aVar5.c());
            d4.b(a20, D3, aVar5.e());
            p b12 = aVar5.b();
            if (a20.n() || !t.b(a20.f(), Integer.valueOf(a18))) {
                a20.I(Integer.valueOf(a18));
                a20.l(Integer.valueOf(a18), b12);
            }
            d4.b(a20, e12, aVar5.d());
            a0.a(m2.e.c(ob.h.f31139z, mVar, 0), ((Context) mVar.t(AndroidCompositionLocals_androidKt.g())).getString(ob.l.E0), dVar.a(aVar, aVar4.e()), null, null, BitmapDescriptorFactory.HUE_RED, null, mVar, 8, 120);
            mVar.O();
            n.a(c3.h.t(16), oVar, mVar, 54);
            z1.b(m2.j.b(ob.l.F0, mVar, 0), null, aVar2.a(mVar, i11).f().c(), 0L, null, null, null, 0L, null, null, 0L, 0, false, 0, 0, null, aVar2.c(mVar, i11).u(), mVar, 0, 0, 65530);
            n.a(c3.h.t(6), oVar, mVar, 54);
            z1.b(m2.j.b(ob.l.D0, mVar, 0), null, aVar2.a(mVar, i11).f().c(), 0L, null, null, null, 0L, null, null, 0L, 0, false, 0, 0, null, aVar2.c(mVar, i11).b(), mVar, 0, 0, 65530);
            n.a(c3.h.t(f10), oVar, mVar, 54);
            l1.i h14 = androidx.compose.foundation.layout.o.h(aVar, BitmapDescriptorFactory.HUE_RED, 1, null);
            mVar.e(-1853611868);
            boolean R = mVar.R(aVar3);
            Object f11 = mVar.f();
            if (R || f11 == m.f51621a.a()) {
                f11 = new C0242a(aVar3);
                mVar.I(f11);
            }
            mVar.N();
            l7.f.b(h14, (dn.a) f11, wb.d.f48949a.a(), mVar, 390, 0);
            mVar.O();
            mVar.O();
            if (y0.p.H()) {
                y0.p.P();
            }
        }

        @Override // dn.p
        public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2) {
            a((m) obj, ((Number) obj2).intValue());
            return n0.f34904a;
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes4.dex */
    public static final class b extends v implements p {

        /* renamed from: q, reason: collision with root package name */
        final /* synthetic */ wb.a f8663q;

        /* renamed from: r, reason: collision with root package name */
        final /* synthetic */ int f8664r;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        b(wb.a aVar, int i10) {
            super(2);
            this.f8663q = aVar;
            this.f8664r = i10;
        }

        public final void a(m mVar, int i10) {
            AnonymousTextNotificationsFragment.this.G(this.f8663q, mVar, l2.a(this.f8664r | 1));
        }

        @Override // dn.p
        public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2) {
            a((m) obj, ((Number) obj2).intValue());
            return n0.f34904a;
        }
    }

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

        public final void a(m mVar, int i10) {
            if ((i10 & 11) == 2 && mVar.v()) {
                mVar.A();
                return;
            }
            if (y0.p.H()) {
                y0.p.Q(1780144686, i10, -1, "ca.canadapost.module.epostprofile.account.notifications.AnonymousTextNotificationsFragment.onCreateView.<anonymous> (AnonymousTextNotificationsFragment.kt:42)");
            }
            AnonymousTextNotificationsFragment anonymousTextNotificationsFragment = AnonymousTextNotificationsFragment.this;
            anonymousTextNotificationsFragment.G(anonymousTextNotificationsFragment.K(), mVar, 64);
            if (y0.p.H()) {
                y0.p.P();
            }
        }

        @Override // dn.p
        public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2) {
            a((m) obj, ((Number) obj2).intValue());
            return n0.f34904a;
        }
    }

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

        public final void a(Boolean bool) {
            t.d(bool);
            if (bool.booleanValue()) {
                x4.d.a(AnonymousTextNotificationsFragment.this).U();
                w.d(x4.d.a(AnonymousTextNotificationsFragment.this), ob.i.U, null, null, 6, null);
            }
        }

        @Override // dn.l
        public /* bridge */ /* synthetic */ Object invoke(Object obj) {
            a((Boolean) 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) {
            m.a aVar = n8.m.f29859a;
            k requireActivity = AnonymousTextNotificationsFragment.this.requireActivity();
            t.f(requireActivity, "requireActivity(...)");
            m.a.b(aVar, requireActivity, null, true, 2, null);
        }

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

    /* loaded from: classes4.dex */
    public static final class f implements wb.a {
        f() {
        }

        @Override // wb.a
        public void B() {
        }
    }

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

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

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

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

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

        public final boolean equals(Object obj) {
            if ((obj instanceof 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 h extends v implements dn.a {

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

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

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

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

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

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

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

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

    /* JADX INFO: Access modifiers changed from: private */
    public final void G(wb.a aVar, y0.m mVar, int i10) {
        int i11;
        y0.m r10 = mVar.r(-2053363017);
        if ((i10 & 14) == 0) {
            i11 = (r10.R(aVar) ? 4 : 2) | i10;
        } else {
            i11 = i10;
        }
        if ((i11 & 11) == 2 && r10.v()) {
            r10.A();
        } else {
            if (y0.p.H()) {
                y0.p.Q(-2053363017, i11, -1, "ca.canadapost.module.epostprofile.account.notifications.AnonymousTextNotificationsFragment.AnonymousTextNotificationsScreen (AnonymousTextNotificationsFragment.kt:62)");
            }
            n7.b.a(false, g1.c.b(r10, -394333642, true, new a(aVar)), r10, 48, 1);
            if (y0.p.H()) {
                y0.p.P();
            }
        }
        x2 y10 = r10.y();
        if (y10 != null) {
            y10.a(new b(aVar, i10));
        }
    }

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

    @Override // androidx.fragment.app.f
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        t.g(inflater, "inflater");
        return k7.a.a(this, g1.c.c(1780144686, true, new c()));
    }

    @Override // u8.b, androidx.fragment.app.f
    public void onViewCreated(View view, Bundle bundle) {
        t.g(view, "view");
        super.onViewCreated(view, bundle);
        K().Q().i().j(getViewLifecycleOwner(), new g(new d()));
        K().S().j(getViewLifecycleOwner(), new g(new e()));
    }
}
