discord-jadx/app/src/main/java/c/a/g/a.java

117 lines
3.6 KiB
Java

package c.a.g;
import android.view.View;
import com.discord.chips_view.ChipsView;
import com.discord.chips_view.ChipsView.a;
import d0.z.d.m;
import java.util.Objects;
/* compiled from: Chip.kt */
public final class a<K, T extends ChipsView.a> implements View.OnClickListener {
public c.a.g.h.a i;
public boolean j;
public String k;
public String l;
public final K m;
public final T n;
public final C0025a o;
public final ChipsView<K, T> p;
/* compiled from: Chip.kt */
/* renamed from: c.a.g.a$a reason: collision with other inner class name */
public static final class C0025a {
public final int a;
public final int b;
/* renamed from: c reason: collision with root package name */
public final int f55c;
public final int d;
public final int e;
public final int f;
public C0025a(int i, float f, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9) {
this.a = i;
this.b = i2;
this.f55c = i3;
this.d = i4;
this.e = i5;
this.f = i8;
}
}
public a(String str, String str2, K k, T t, C0025a aVar, ChipsView<K, T> chipsView) {
m.checkNotNullParameter(aVar, "params");
m.checkNotNullParameter(chipsView, "container");
this.k = str;
this.l = str2;
this.m = k;
this.n = t;
this.o = aVar;
this.p = chipsView;
String str3 = null;
if (str == null) {
this.k = t != null ? t.getDisplayString() : null;
}
String str4 = this.k;
if ((str4 != null ? str4.length() : 0) > 30) {
String str5 = this.k;
if (str5 != null) {
str3 = str5.substring(0, 30);
m.checkNotNullExpressionValue(str3, "(this as java.lang.Strin…ing(startIndex, endIndex)");
}
this.k = m.stringPlus(str3, "...");
}
}
@Override // java.lang.Object
public boolean equals(Object obj) {
if (obj instanceof a) {
return m.areEqual(this.n, ((a) obj).n);
}
return false;
}
@Override // java.lang.Object
public int hashCode() {
String str = this.k;
int i = 0;
int hashCode = (str != null ? str.hashCode() : 0) * 31;
String str2 = this.l;
int hashCode2 = (hashCode + (str2 != null ? str2.hashCode() : 0)) * 31;
K k = this.m;
int hashCode3 = (hashCode2 + (k != null ? k.hashCode() : 0)) * 31;
T t = this.n;
int hashCode4 = (this.p.hashCode() + ((this.o.hashCode() + ((hashCode3 + (t != null ? t.hashCode() : 0)) * 31)) * 31)) * 31;
c.a.g.h.a aVar = this.i;
if (aVar != null) {
i = aVar.hashCode();
}
return c.a(this.j) + ((hashCode4 + i) * 31);
}
@Override // android.view.View.OnClickListener
public void onClick(View view) {
m.checkNotNullParameter(view, "v");
this.p.f1598z.clearFocus();
ChipsView<K, T> chipsView = this.p;
Objects.requireNonNull(chipsView);
m.checkNotNullParameter(this, "chip");
chipsView.f(this);
chipsView.e(this);
}
@Override // java.lang.Object
public String toString() {
StringBuilder K = c.d.b.a.a.K("{[Data: ");
K.append(this.n);
K.append(']');
K.append("[Label: ");
K.append(this.k);
K.append(']');
K.append("[ImageDescription: ");
K.append(this.l);
K.append(']');
K.append('}');
return K.toString();
}
}