package androidx.compose.ui.layout; import androidx.compose.ui.layout.SubcomposeSlotReusePolicy; import java.util.Iterator; import kotlin.Metadata; import kotlin.jvm.internal.Intrinsics; /* compiled from: SubcomposeLayout.kt */ @Metadata(d1 = {"\u0000,\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\b\u0002\u0018\u00002\u00020\u0001B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\u001c\u0010\u0005\u001a\u00020\u00062\b\u0010\u0007\u001a\u0004\u0018\u00010\b2\b\u0010\t\u001a\u0004\u0018\u00010\bH\u0016J\u0010\u0010\n\u001a\u00020\u000b2\u0006\u0010\f\u001a\u00020\rH\u0016R\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\u000e"}, d2 = {"Landroidx/compose/ui/layout/FixedCountSubcomposeSlotReusePolicy;", "Landroidx/compose/ui/layout/SubcomposeSlotReusePolicy;", "maxSlotsToRetainForReuse", "", "(I)V", "areCompatible", "", "slotId", "", "reusableSlotId", "getSlotsToRetain", "", "slotIds", "Landroidx/compose/ui/layout/SubcomposeSlotReusePolicy$SlotIdsSet;", "ui_release"}, k = 1, mv = {1, 8, 0}, xi = 48) /* loaded from: classes.dex */ final class FixedCountSubcomposeSlotReusePolicy implements SubcomposeSlotReusePolicy { private final int maxSlotsToRetainForReuse; @Override // androidx.compose.ui.layout.SubcomposeSlotReusePolicy public boolean areCompatible(Object slotId, Object reusableSlotId) { return true; } public FixedCountSubcomposeSlotReusePolicy(int i) { this.maxSlotsToRetainForReuse = i; } @Override // androidx.compose.ui.layout.SubcomposeSlotReusePolicy public void getSlotsToRetain(SubcomposeSlotReusePolicy.SlotIdsSet slotIds) { Intrinsics.checkNotNullParameter(slotIds, "slotIds"); if (slotIds.size() > this.maxSlotsToRetainForReuse) { Iterator it = slotIds.iterator(); int i = 0; while (it.hasNext()) { it.next(); i++; if (i > this.maxSlotsToRetainForReuse) { it.remove(); } } } } }