package j2;

import B.f1;
import androidx.compose.runtime.snapshots.SnapshotStateList;
import androidx.lifecycle.EnumC1107p;
import androidx.lifecycle.InterfaceC1111u;
import androidx.lifecycle.InterfaceC1113w;
import androidx.navigation.C1137l;

/* JADX INFO: renamed from: j2.n, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C2336n extends kotlin.jvm.internal.p implements J4.c {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final /* synthetic */ C1137l f19505a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ boolean f19506b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final /* synthetic */ SnapshotStateList f19507c;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C2336n(SnapshotStateList snapshotStateList, C1137l c1137l, boolean z6) {
        super(1);
        this.f19505a = c1137l;
        this.f19506b = z6;
        this.f19507c = snapshotStateList;
    }

    @Override // J4.c
    public final Object invoke(Object obj) {
        final C1137l c1137l = this.f19505a;
        final boolean z6 = this.f19506b;
        final SnapshotStateList snapshotStateList = this.f19507c;
        InterfaceC1111u interfaceC1111u = new InterfaceC1111u() { // from class: j2.m
            @Override // androidx.lifecycle.InterfaceC1111u
            public final void a(InterfaceC1113w interfaceC1113w, EnumC1107p enumC1107p) {
                C1137l c1137l2 = c1137l;
                boolean z7 = z6;
                SnapshotStateList snapshotStateList2 = snapshotStateList;
                if (z7 && !snapshotStateList2.contains(c1137l2)) {
                    snapshotStateList2.add(c1137l2);
                }
                if (enumC1107p == EnumC1107p.ON_START && !snapshotStateList2.contains(c1137l2)) {
                    snapshotStateList2.add(c1137l2);
                }
                if (enumC1107p == EnumC1107p.ON_STOP) {
                    snapshotStateList2.remove(c1137l2);
                }
            }
        };
        c1137l.f12763k.addObserver(interfaceC1111u);
        return new f1(10, c1137l, interfaceC1111u);
    }
}
