22 lines
725 B
Java
22 lines
725 B
Java
package com.discord.api.botuikit;
|
|
|
|
import java.util.List;
|
|
import kotlin.Unit;
|
|
import kotlin.jvm.functions.Function2;
|
|
/* compiled from: Component.kt */
|
|
public final class ComponentUtils {
|
|
public static final ComponentUtils INSTANCE = new ComponentUtils();
|
|
|
|
public final int a(List<? extends Component> list, int i, Function2<? super Integer, ? super Component, Unit> function2) {
|
|
for (Component component : list) {
|
|
Integer valueOf = Integer.valueOf(i);
|
|
i++;
|
|
function2.invoke(valueOf, component);
|
|
if (component instanceof LayoutComponent) {
|
|
i = a(((LayoutComponent) component).a(), i, function2);
|
|
}
|
|
}
|
|
return i;
|
|
}
|
|
}
|