package l7;

import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.google.firebase.crashlytics.internal.metadata.UserMetadata;
import e0.b;
import e0.c0;
import e0.f0;
import h2.e0;
import j2.g;
import kotlin.jvm.internal.t;
import kotlin.jvm.internal.v;
import l1.c;
import l1.i;
import rm.n0;
import v0.z1;
import y0.d4;
import y0.l2;
import y0.x2;
import y0.y;

/* loaded from: classes.dex */
public abstract class j {

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

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ q2.d f27700p;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        a(q2.d dVar) {
            super(3);
            this.f27700p = dVar;
        }

        public final void a(x.d AnimatedVisibility, y0.m mVar, int i10) {
            t.g(AnimatedVisibility, "$this$AnimatedVisibility");
            if (y0.p.H()) {
                y0.p.Q(-2101664618, i10, -1, "ca.canadapost.core.common.compose.components.CpcExpandableItem.<anonymous>.<anonymous> (CpcExpandableItem.kt:60)");
            }
            q2.d dVar = this.f27700p;
            l1.i h10 = androidx.compose.foundation.layout.o.h(l1.i.f27362a, BitmapDescriptorFactory.HUE_RED, 1, null);
            n7.a aVar = n7.a.f29827a;
            z1.c(dVar, androidx.compose.foundation.layout.l.m(h10, aVar.b(mVar, 6).w(), aVar.b(mVar, 6).w(), aVar.b(mVar, 6).w(), BitmapDescriptorFactory.HUE_RED, 8, null), 0L, 0L, null, null, null, 0L, null, null, 0L, 0, false, 0, 0, null, null, null, mVar, 0, 0, 262140);
            if (y0.p.H()) {
                y0.p.P();
            }
        }

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

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

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ String f27701p;

        /* renamed from: q, reason: collision with root package name */
        final /* synthetic */ q2.d f27702q;

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

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

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

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        b(String str, q2.d dVar, boolean z10, dn.a aVar, int i10) {
            super(2);
            this.f27701p = str;
            this.f27702q = dVar;
            this.f27703r = z10;
            this.f27704s = aVar;
            this.f27705t = i10;
        }

        public final void a(y0.m mVar, int i10) {
            j.a(this.f27701p, this.f27702q, this.f27703r, this.f27704s, mVar, l2.a(this.f27705t | 1));
        }

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

    public static final void a(String title, q2.d description, boolean z10, dn.a onToggle, y0.m mVar, int i10) {
        int i11;
        y0.m mVar2;
        int i12;
        w1.b c10;
        int i13;
        t.g(title, "title");
        t.g(description, "description");
        t.g(onToggle, "onToggle");
        y0.m r10 = mVar.r(-1648985564);
        if ((i10 & 14) == 0) {
            i11 = (r10.R(title) ? 4 : 2) | i10;
        } else {
            i11 = i10;
        }
        if ((i10 & 112) == 0) {
            i11 |= r10.R(description) ? 32 : 16;
        }
        if ((i10 & 896) == 0) {
            i11 |= r10.c(z10) ? 256 : 128;
        }
        if ((i10 & 7168) == 0) {
            i11 |= r10.m(onToggle) ? 2048 : UserMetadata.MAX_ATTRIBUTE_SIZE;
        }
        int i14 = i11;
        if ((i14 & 5851) == 1170 && r10.v()) {
            r10.A();
            mVar2 = r10;
        } else {
            if (y0.p.H()) {
                y0.p.Q(-1648985564, i14, -1, "ca.canadapost.core.common.compose.components.CpcExpandableItem (CpcExpandableItem.kt:28)");
            }
            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;
            l1.i k10 = androidx.compose.foundation.layout.l.k(h10, BitmapDescriptorFactory.HUE_RED, aVar2.b(r10, 6).w(), 1, null);
            e0.b bVar = e0.b.f16607a;
            b.m h11 = bVar.h();
            c.a aVar3 = l1.c.f27332a;
            e0 a10 = e0.d.a(h11, aVar3.k(), r10, 0);
            int a11 = y0.j.a(r10, 0);
            y D = r10.D();
            l1.i e10 = l1.h.e(r10, k10);
            g.a aVar4 = j2.g.f23616d;
            dn.a a12 = aVar4.a();
            if (!(r10.w() instanceof y0.f)) {
                y0.j.c();
            }
            r10.u();
            if (r10.n()) {
                r10.o(a12);
            } else {
                r10.F();
            }
            y0.m a13 = d4.a(r10);
            d4.b(a13, a10, aVar4.c());
            d4.b(a13, D, aVar4.e());
            dn.p b10 = aVar4.b();
            if (a13.n() || !t.b(a13.f(), Integer.valueOf(a11))) {
                a13.I(Integer.valueOf(a11));
                a13.l(Integer.valueOf(a11), b10);
            }
            d4.b(a13, e10, aVar4.d());
            e0.g gVar = e0.g.f16653a;
            l1.i h12 = androidx.compose.foundation.layout.o.h(aVar, BitmapDescriptorFactory.HUE_RED, 1, null);
            e0 b11 = c0.b(bVar.e(), aVar3.i(), r10, 54);
            int a14 = y0.j.a(r10, 0);
            y D2 = r10.D();
            l1.i e11 = l1.h.e(r10, h12);
            dn.a a15 = aVar4.a();
            if (!(r10.w() instanceof y0.f)) {
                y0.j.c();
            }
            r10.u();
            if (r10.n()) {
                r10.o(a15);
            } else {
                r10.F();
            }
            y0.m a16 = d4.a(r10);
            d4.b(a16, b11, aVar4.c());
            d4.b(a16, D2, aVar4.e());
            dn.p b12 = aVar4.b();
            if (a16.n() || !t.b(a16.f(), Integer.valueOf(a14))) {
                a16.I(Integer.valueOf(a14));
                a16.l(Integer.valueOf(a14), b12);
            }
            d4.b(a16, e11, aVar4.d());
            z1.b(title, e0.e0.b(f0.f16652a, aVar, 1.0f, false, 2, null), 0L, 0L, null, null, null, 0L, null, null, 0L, 0, false, 0, 0, null, aVar2.c(r10, 6).t(), r10, i14 & 14, 0, 65532);
            if (z10) {
                mVar2 = r10;
                mVar2.e(-335448793);
                i12 = 0;
                c10 = m2.e.c(h7.h.f21009n, mVar2, 0);
                mVar2.N();
            } else {
                mVar2 = r10;
                i12 = 0;
                mVar2.e(-335448716);
                c10 = m2.e.c(h7.h.f21007m, mVar2, 0);
                mVar2.N();
            }
            w1.b bVar2 = c10;
            if (z10) {
                mVar2.e(-335448566);
                i13 = h7.l.N;
            } else {
                mVar2.e(-335448517);
                i13 = h7.l.f21179n0;
            }
            String b13 = m2.j.b(i13, mVar2, i12);
            mVar2.N();
            y0.m mVar3 = mVar2;
            v0.f0.a(bVar2, b13, androidx.compose.foundation.d.d(androidx.compose.foundation.layout.l.k(aVar, aVar2.b(mVar2, 6).w(), BitmapDescriptorFactory.HUE_RED, 2, null), false, null, null, onToggle, 7, null), 0L, mVar3, 8, 8);
            mVar2.O();
            x.c.d(gVar, z10, null, null, null, null, g1.c.b(mVar2, -2101664618, true, new a(description)), mVar3, 1572870 | ((i14 >> 3) & 112), 30);
            mVar2.O();
            if (y0.p.H()) {
                y0.p.P();
            }
        }
        x2 y10 = mVar2.y();
        if (y10 != null) {
            y10.a(new b(title, description, z10, onToggle, i10));
        }
    }
}
