68 lines
2.2 KiB
Java
68 lines
2.2 KiB
Java
package com.discord.i18n;
|
|
|
|
import android.view.View;
|
|
import androidx.annotation.ColorInt;
|
|
import c.a.k.d;
|
|
import com.discord.i18n.Hook;
|
|
import d0.z.d.m;
|
|
import d0.z.d.o;
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Objects;
|
|
import kotlin.Unit;
|
|
import kotlin.jvm.functions.Function1;
|
|
/* compiled from: RenderContext.kt */
|
|
public final class RenderContext {
|
|
public final Map<String, String> a = new HashMap();
|
|
public final Map<String, Hook> b = new HashMap();
|
|
|
|
/* renamed from: c reason: collision with root package name */
|
|
public List<? extends Object> f2031c;
|
|
@ColorInt
|
|
public Integer d;
|
|
@ColorInt
|
|
public Integer e;
|
|
public boolean f;
|
|
public boolean g;
|
|
|
|
/* compiled from: RenderContext.kt */
|
|
public static final class a extends o implements Function1<Hook, Unit> {
|
|
public final /* synthetic */ Function1 $onClick;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public a(Function1 function1) {
|
|
super(1);
|
|
this.$onClick = function1;
|
|
}
|
|
|
|
/* Return type fixed from 'java.lang.Object' to match base method */
|
|
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
|
|
@Override // kotlin.jvm.functions.Function1
|
|
public Unit invoke(Hook hook) {
|
|
Hook hook2 = hook;
|
|
m.checkNotNullParameter(hook2, "$receiver");
|
|
d dVar = new d(this);
|
|
Objects.requireNonNull(hook2);
|
|
m.checkNotNullParameter(dVar, "onClick");
|
|
hook2.f2030c = new Hook.a(null, dVar);
|
|
return Unit.a;
|
|
}
|
|
}
|
|
|
|
public final void a(String str, Function1<? super Hook, Unit> function1) {
|
|
m.checkNotNullParameter(str, "key");
|
|
m.checkNotNullParameter(function1, "hookInitializer");
|
|
Map<String, Hook> map = this.b;
|
|
Hook hook = new Hook();
|
|
function1.invoke(hook);
|
|
map.put(str, hook);
|
|
}
|
|
|
|
public final void b(String str, Function1<? super View, Unit> function1) {
|
|
m.checkNotNullParameter(str, "key");
|
|
m.checkNotNullParameter(function1, "onClick");
|
|
a(str, new a(function1));
|
|
}
|
|
}
|