package o; import java.util.HashMap; import o.C1230Yni; import o.C17026tNn; /* loaded from: classes.dex */ public final class WAE extends C17026tNn { public boolean aj; public float ai = -1.0f; public int e = -1; public int am = -1; private boolean ap = true; public C1230Yni c = this.V; public int a = 0; private int an = 0; @Override // o.C17026tNn public final boolean c() { return true; } public WAE() { this.i.clear(); this.i.add(this.c); int length = this.C.length; for (int i = 0; i < length; i++) { this.C[i] = this.c; } } @Override // o.C17026tNn public final void e(C17026tNn c17026tNn, HashMap hashMap) { super.e(c17026tNn, hashMap); WAE wae = (WAE) c17026tNn; this.ai = wae.ai; this.e = wae.e; this.am = wae.am; this.ap = wae.ap; o(wae.a); } public final void o(int i) { if (this.a == i) { return; } this.a = i; this.i.clear(); if (this.a == 1) { this.c = this.D; } else { this.c = this.V; } this.i.add(this.c); int length = this.C.length; for (int i2 = 0; i2 < length; i2++) { this.C[i2] = this.c; } } /* renamed from: o.WAE$3, reason: invalid class name */ /* loaded from: classes.dex */ static /* synthetic */ class AnonymousClass3 { static final int[] c; static { int[] iArr = new int[C1230Yni.HBt.values().length]; c = iArr; try { iArr[C1230Yni.HBt.LEFT.ordinal()] = 1; } catch (NoSuchFieldError unused) { } try { c[C1230Yni.HBt.RIGHT.ordinal()] = 2; } catch (NoSuchFieldError unused2) { } try { c[C1230Yni.HBt.TOP.ordinal()] = 3; } catch (NoSuchFieldError unused3) { } try { c[C1230Yni.HBt.BOTTOM.ordinal()] = 4; } catch (NoSuchFieldError unused4) { } try { c[C1230Yni.HBt.BASELINE.ordinal()] = 5; } catch (NoSuchFieldError unused5) { } try { c[C1230Yni.HBt.CENTER.ordinal()] = 6; } catch (NoSuchFieldError unused6) { } try { c[C1230Yni.HBt.CENTER_X.ordinal()] = 7; } catch (NoSuchFieldError unused7) { } try { c[C1230Yni.HBt.CENTER_Y.ordinal()] = 8; } catch (NoSuchFieldError unused8) { } try { c[C1230Yni.HBt.NONE.ordinal()] = 9; } catch (NoSuchFieldError unused9) { } } } @Override // o.C17026tNn public final C1230Yni e(C1230Yni.HBt hBt) { int i = AnonymousClass3.c[hBt.ordinal()]; if (i == 1 || i == 2) { if (this.a == 1) { return this.c; } return null; } if ((i == 3 || i == 4) && this.a == 0) { return this.c; } return null; } @Override // o.C17026tNn public final void d(Npn npn, boolean z) { WqU wqU = (WqU) this.S; if (wqU == null) { return; } C1230Yni e = wqU.e(C1230Yni.HBt.LEFT); C1230Yni e2 = wqU.e(C1230Yni.HBt.RIGHT); boolean z2 = true; boolean z3 = this.S != null && this.S.B[0] == C17026tNn.LWm.WRAP_CONTENT; if (this.a == 0) { e = wqU.e(C1230Yni.HBt.TOP); e2 = wqU.e(C1230Yni.HBt.BOTTOM); if (this.S == null || this.S.B[1] != C17026tNn.LWm.WRAP_CONTENT) { z2 = false; } } else { z2 = z3; } if (this.aj && this.c.d) { EsB b = npn.b(this.c); C1230Yni c1230Yni = this.c; npn.c(b, !c1230Yni.d ? 0 : c1230Yni.c); if (this.e != -1) { if (z2) { npn.e(npn.b(e2), b, 0, 5); } } else if (this.am != -1 && z2) { EsB b2 = npn.b(e2); npn.e(b, npn.b(e), 0, 5); npn.e(b2, b, 0, 5); } this.aj = false; return; } if (this.e != -1) { EsB b3 = npn.b(this.c); npn.b(b3, npn.b(e), this.e, 8); if (z2) { npn.e(npn.b(e2), b3, 0, 5); return; } return; } if (this.am == -1) { if (this.ai != -1.0f) { npn.e(npn.c().d(npn.b(this.c), npn.b(e2), this.ai)); return; } return; } EsB b4 = npn.b(this.c); EsB b5 = npn.b(e2); npn.b(b4, b5, -this.am, 8); if (z2) { npn.e(b4, npn.b(e), 0, 5); npn.e(b5, b4, 0, 5); } } @Override // o.C17026tNn public final void a(boolean z) { if (this.S == null) { return; } EsB esB = this.c.h; int i = esB != null ? (int) (esB.c + 0.5f) : 0; if (this.a == 1) { f(i); h(0); C17026tNn c17026tNn = this.S; c(c17026tNn.Z == 8 ? 0 : c17026tNn.p); i(0); return; } f(0); h(i); C17026tNn c17026tNn2 = this.S; i(c17026tNn2.Z == 8 ? 0 : c17026tNn2.ac); c(0); } @Override // o.C17026tNn public final boolean d() { return this.aj; } @Override // o.C17026tNn public final boolean a() { return this.aj; } }