package o; import android.animation.Animator; import android.animation.ObjectAnimator; import android.animation.TimeInterpolator; import android.content.Context; import android.content.res.ColorStateList; import android.graphics.Typeface; import android.text.TextUtils; import android.util.Property; import android.view.View; import android.widget.EditText; import android.widget.FrameLayout; import android.widget.LinearLayout; import android.widget.TextView; import androidx.core.view.ViewCompat; import com.google.android.gms.maps.model.BitmapDescriptorFactory; import com.google.android.material.textfield.TextInputLayout; import java.util.List; import o.C17052tZT; import org.bouncycastle.crypto.tls.CipherSuite; /* loaded from: classes2.dex */ public final class XRC { private int C; private final float D; public int a; public final Context b; public boolean c; public int d; public Animator e; public CharSequence f; public CharSequence g; public TextView h; public int i; public int j; public boolean k; public int l; public ColorStateList m; public CharSequence n; /* renamed from: o, reason: collision with root package name */ public TextView f8444o; public ColorStateList p; private final int q; public Typeface r; public final TextInputLayout s; private FrameLayout t; private final TimeInterpolator u; private final int v; private final TimeInterpolator w; private final TimeInterpolator x; private final int y; private LinearLayout z; public XRC(TextInputLayout textInputLayout) { Context context = textInputLayout.getContext(); this.b = context; this.s = textInputLayout; this.D = context.getResources().getDimensionPixelSize(C17052tZT.HBt.design_textinput_caption_translate_y); this.y = DAZ.a(context, C17052tZT.IeS.motionDurationShort4, 217); this.q = DAZ.a(context, C17052tZT.IeS.motionDurationMedium4, CipherSuite.TLS_DH_anon_WITH_AES_256_GCM_SHA384); this.v = DAZ.a(context, C17052tZT.IeS.motionDurationShort4, CipherSuite.TLS_DH_anon_WITH_AES_256_GCM_SHA384); this.w = DAZ.Kh_(context, C17052tZT.IeS.motionEasingEmphasizedDecelerateInterpolator, C6217cMa.b); this.x = DAZ.Kh_(context, C17052tZT.IeS.motionEasingEmphasizedDecelerateInterpolator, C6217cMa.e); this.u = DAZ.Kh_(context, C17052tZT.IeS.motionEasingLinearInterpolator, C6217cMa.e); } public final void a() { this.g = null; Animator animator = this.e; if (animator != null) { animator.cancel(); } if (this.d == 1) { this.a = (!this.k || TextUtils.isEmpty(this.n)) ? 0 : 2; } e(this.d, this.a, Mt_(this.h, "")); } public final boolean Mt_(TextView textView, CharSequence charSequence) { return ViewCompat.G(this.s) && this.s.isEnabled() && !(this.a == this.d && textView != null && TextUtils.equals(textView.getText(), charSequence)); } /* JADX WARN: Removed duplicated region for block: B:12:0x004b */ /* JADX WARN: Removed duplicated region for block: B:19:0x0052 */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ public final void e(int r18, int r19, boolean r20) { /* r17 = this; r7 = r17 r8 = r18 r9 = r19 r10 = r20 if (r8 != r9) goto Lb return Lb: r11 = 0 r12 = 2 r13 = 0 r14 = 1 if (r10 == 0) goto L68 android.animation.AnimatorSet r15 = new android.animation.AnimatorSet r15.() r7.e = r15 java.util.ArrayList r6 = new java.util.ArrayList r6.() boolean r2 = r7.k android.widget.TextView r3 = r7.f8444o r4 = 2 r0 = r17 r1 = r6 r5 = r18 r16 = r6 r6 = r19 r0.Ms_(r1, r2, r3, r4, r5, r6) boolean r2 = r7.c android.widget.TextView r3 = r7.h r4 = 1 r1 = r16 r0.Ms_(r1, r2, r3, r4, r5, r6) r0 = r16 o.vnt.HC_(r15, r0) if (r8 == r14) goto L46 if (r8 == r12) goto L43 r3 = r13 goto L49 L43: android.widget.TextView r0 = r7.f8444o goto L48 L46: android.widget.TextView r0 = r7.h L48: r3 = r0 L49: if (r9 == r14) goto L52 if (r9 == r12) goto L4f r5 = r13 goto L55 L4f: android.widget.TextView r0 = r7.f8444o goto L54 L52: android.widget.TextView r0 = r7.h L54: r5 = r0 L55: o.XRC$1 r6 = new o.XRC$1 r0 = r6 r1 = r17 r2 = r19 r4 = r18 r0.(r1, r2, r3, r4, r5) r15.addListener(r6) r15.start() goto L9b L68: if (r8 == r9) goto L9b if (r9 == 0) goto L81 if (r9 == r14) goto L75 if (r9 == r12) goto L72 r0 = r13 goto L77 L72: android.widget.TextView r0 = r7.f8444o goto L77 L75: android.widget.TextView r0 = r7.h L77: if (r0 == 0) goto L81 r0.setVisibility(r11) r1 = 1065353216(0x3f800000, float:1.0) r0.setAlpha(r1) L81: if (r8 == 0) goto L99 if (r8 == r14) goto L8c if (r8 == r12) goto L89 r0 = r13 goto L8e L89: android.widget.TextView r0 = r7.f8444o goto L8e L8c: android.widget.TextView r0 = r7.h L8e: if (r0 == 0) goto L99 r1 = 4 r0.setVisibility(r1) if (r8 != r14) goto L99 r0.setText(r13) L99: r7.d = r9 L9b: com.google.android.material.textfield.TextInputLayout r0 = r7.s r0.a() com.google.android.material.textfield.TextInputLayout r0 = r7.s r0.a(r10, r11) com.google.android.material.textfield.TextInputLayout r0 = r7.s r0.j() return */ throw new UnsupportedOperationException("Method not decompiled: o.XRC.e(int, int, boolean):void"); } public final void b() { if (this.z == null || this.s.f == null) { return; } EditText editText = this.s.f; boolean z = this.b.getResources().getConfiguration().fontScale >= 1.3f; LinearLayout linearLayout = this.z; int i = C17052tZT.HBt.material_helper_text_font_1_3_padding_horizontal; int q = ViewCompat.q(editText); if (z) { q = this.b.getResources().getDimensionPixelSize(i); } int i2 = C17052tZT.HBt.material_helper_text_font_1_3_padding_top; int dimensionPixelSize = this.b.getResources().getDimensionPixelSize(C17052tZT.HBt.material_helper_text_default_padding_top); if (z) { dimensionPixelSize = this.b.getResources().getDimensionPixelSize(i2); } int i3 = C17052tZT.HBt.material_helper_text_font_1_3_padding_horizontal; int r = ViewCompat.r(editText); if (z) { r = this.b.getResources().getDimensionPixelSize(i3); } ViewCompat.a(linearLayout, q, dimensionPixelSize, r, 0); } public final void Mu_(TextView textView, int i) { if (this.z == null && this.t == null) { LinearLayout linearLayout = new LinearLayout(this.b); this.z = linearLayout; linearLayout.setOrientation(0); this.s.addView(this.z, -1, -2); this.t = new FrameLayout(this.b); this.z.addView(this.t, new LinearLayout.LayoutParams(0, -2, 1.0f)); if (this.s.f != null) { b(); } } if (i == 0 || i == 1) { this.t.setVisibility(0); this.t.addView(textView); } else { this.z.addView(textView, new LinearLayout.LayoutParams(-2, -2)); } this.z.setVisibility(0); this.C++; } public final void Mv_(TextView textView, int i) { FrameLayout frameLayout; LinearLayout linearLayout = this.z; if (linearLayout == null) { return; } if ((i == 0 || i == 1) && (frameLayout = this.t) != null) { frameLayout.removeView(textView); } else { linearLayout.removeView(textView); } int i2 = this.C - 1; this.C = i2; LinearLayout linearLayout2 = this.z; if (i2 == 0) { linearLayout2.setVisibility(8); } } public final boolean c() { return (this.a != 1 || this.h == null || TextUtils.isEmpty(this.g)) ? false : true; } private void Ms_(List list, boolean z, TextView textView, int i, int i2, int i3) { if (textView == null || !z) { return; } if (i == i3 || i == i2) { boolean z2 = i3 == i; ObjectAnimator ofFloat = ObjectAnimator.ofFloat(textView, (Property) View.ALPHA, z2 ? 1.0f : 0.0f); ofFloat.setDuration(z2 ? this.q : this.v); ofFloat.setInterpolator(z2 ? this.x : this.u); if (i == i3 && i2 != 0) { ofFloat.setStartDelay(this.v); } list.add(ofFloat); if (i3 != i || i2 == 0) { return; } ObjectAnimator ofFloat2 = ObjectAnimator.ofFloat(textView, (Property) View.TRANSLATION_Y, -this.D, BitmapDescriptorFactory.HUE_RED); ofFloat2.setDuration(this.y); ofFloat2.setInterpolator(this.w); ofFloat2.setStartDelay(this.v); list.add(ofFloat2); } } }