package androidx.appcompat.widget;

import X6FRs_4.IMuAHx_6.EuDEkJe_12.BVpCZyH_19;
import X6FRs_4.IMuAHx_6.WwEq_13.QxJ9d_1;
import X6FRs_4.IMuAHx_6.WwEq_13.Xgtqvk_8;
import X6FRs_4.KQgRr5e_0.KQgRr5e_0;
import X6FRs_4.KQgRr5e_0.LGe8pk_15.Mqv2r_3;
import X6FRs_4.KQgRr5e_0.LGe8pk_15.Nm6q_10;
import X6FRs_4.KQgRr5e_0.LGe8pk_15.XDsvEfm_26;
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.view.ActionMode;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
import android.widget.Button;
/* loaded from: classes.dex */
public class AppCompatButton extends Button implements BVpCZyH_19, QxJ9d_1 {
    public final Mqv2r_3 mBackgroundTintHelper;
    public final Nm6q_10 mTextHelper;

    public AppCompatButton(Context context) {
        this(context, null);
    }

    @Override // android.widget.TextView, android.view.View
    public void drawableStateChanged() {
        super.drawableStateChanged();
        Mqv2r_3 mqv2r_3 = this.mBackgroundTintHelper;
        if (mqv2r_3 != null) {
            mqv2r_3.m406KQgRr5e_0();
        }
        Nm6q_10 nm6q_10 = this.mTextHelper;
        if (nm6q_10 != null) {
            nm6q_10.m412KQgRr5e_0();
        }
    }

    @Override // android.widget.TextView
    public int getAutoSizeMaxTextSize() {
        if (QxJ9d_1.KQgRr5e_0) {
            return super.getAutoSizeMaxTextSize();
        }
        Nm6q_10 nm6q_10 = this.mTextHelper;
        if (nm6q_10 != null) {
            return nm6q_10.KQgRr5e_0();
        }
        return -1;
    }

    @Override // android.widget.TextView
    public int getAutoSizeMinTextSize() {
        if (QxJ9d_1.KQgRr5e_0) {
            return super.getAutoSizeMinTextSize();
        }
        Nm6q_10 nm6q_10 = this.mTextHelper;
        if (nm6q_10 != null) {
            return nm6q_10.QxJ9d_1();
        }
        return -1;
    }

    @Override // android.widget.TextView
    public int getAutoSizeStepGranularity() {
        if (QxJ9d_1.KQgRr5e_0) {
            return super.getAutoSizeStepGranularity();
        }
        Nm6q_10 nm6q_10 = this.mTextHelper;
        if (nm6q_10 != null) {
            return nm6q_10.PGPF6hQ_2();
        }
        return -1;
    }

    @Override // android.widget.TextView
    public int[] getAutoSizeTextAvailableSizes() {
        if (QxJ9d_1.KQgRr5e_0) {
            return super.getAutoSizeTextAvailableSizes();
        }
        Nm6q_10 nm6q_10 = this.mTextHelper;
        return nm6q_10 != null ? nm6q_10.m414KQgRr5e_0() : new int[0];
    }

    @Override // android.widget.TextView
    public int getAutoSizeTextType() {
        if (QxJ9d_1.KQgRr5e_0) {
            return super.getAutoSizeTextType() == 1 ? 1 : 0;
        }
        Nm6q_10 nm6q_10 = this.mTextHelper;
        if (nm6q_10 != null) {
            return nm6q_10.Mqv2r_3();
        }
        return 0;
    }

    @Override // X6FRs_4.IMuAHx_6.EuDEkJe_12.BVpCZyH_19
    public ColorStateList getSupportBackgroundTintList() {
        Mqv2r_3 mqv2r_3 = this.mBackgroundTintHelper;
        if (mqv2r_3 != null) {
            return mqv2r_3.KQgRr5e_0();
        }
        return null;
    }

    @Override // X6FRs_4.IMuAHx_6.EuDEkJe_12.BVpCZyH_19
    public PorterDuff.Mode getSupportBackgroundTintMode() {
        Mqv2r_3 mqv2r_3 = this.mBackgroundTintHelper;
        if (mqv2r_3 != null) {
            return mqv2r_3.m405KQgRr5e_0();
        }
        return null;
    }

    @Override // android.view.View
    public void onInitializeAccessibilityEvent(AccessibilityEvent accessibilityEvent) {
        super.onInitializeAccessibilityEvent(accessibilityEvent);
        accessibilityEvent.setClassName(Button.class.getName());
    }

    @Override // android.view.View
    public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo accessibilityNodeInfo) {
        super.onInitializeAccessibilityNodeInfo(accessibilityNodeInfo);
        accessibilityNodeInfo.setClassName(Button.class.getName());
    }

    @Override // android.widget.TextView, android.view.View
    public void onLayout(boolean z, int i, int i2, int i3, int i4) {
        super.onLayout(z, i, i2, i3, i4);
        Nm6q_10 nm6q_10 = this.mTextHelper;
        if (nm6q_10 != null) {
            nm6q_10.KQgRr5e_0(z, i, i2, i3, i4);
        }
    }

    @Override // android.widget.TextView
    public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
        super.onTextChanged(charSequence, i, i2, i3);
        Nm6q_10 nm6q_10 = this.mTextHelper;
        if (nm6q_10 == null || QxJ9d_1.KQgRr5e_0 || !nm6q_10.m413KQgRr5e_0()) {
            return;
        }
        this.mTextHelper.m415QxJ9d_1();
    }

    @Override // android.widget.TextView
    public void setAutoSizeTextTypeUniformWithConfiguration(int i, int i2, int i3, int i4) throws IllegalArgumentException {
        if (QxJ9d_1.KQgRr5e_0) {
            super.setAutoSizeTextTypeUniformWithConfiguration(i, i2, i3, i4);
            return;
        }
        Nm6q_10 nm6q_10 = this.mTextHelper;
        if (nm6q_10 != null) {
            nm6q_10.KQgRr5e_0(i, i2, i3, i4);
        }
    }

    @Override // android.widget.TextView
    public void setAutoSizeTextTypeUniformWithPresetSizes(int[] iArr, int i) throws IllegalArgumentException {
        if (QxJ9d_1.KQgRr5e_0) {
            super.setAutoSizeTextTypeUniformWithPresetSizes(iArr, i);
            return;
        }
        Nm6q_10 nm6q_10 = this.mTextHelper;
        if (nm6q_10 != null) {
            nm6q_10.KQgRr5e_0(iArr, i);
        }
    }

    @Override // android.widget.TextView
    public void setAutoSizeTextTypeWithDefaults(int i) {
        if (QxJ9d_1.KQgRr5e_0) {
            super.setAutoSizeTextTypeWithDefaults(i);
            return;
        }
        Nm6q_10 nm6q_10 = this.mTextHelper;
        if (nm6q_10 != null) {
            nm6q_10.KQgRr5e_0(i);
        }
    }

    @Override // android.view.View
    public void setBackgroundDrawable(Drawable drawable) {
        super.setBackgroundDrawable(drawable);
        Mqv2r_3 mqv2r_3 = this.mBackgroundTintHelper;
        if (mqv2r_3 != null) {
            mqv2r_3.KQgRr5e_0(drawable);
        }
    }

    @Override // android.view.View
    public void setBackgroundResource(int i) {
        super.setBackgroundResource(i);
        Mqv2r_3 mqv2r_3 = this.mBackgroundTintHelper;
        if (mqv2r_3 != null) {
            mqv2r_3.KQgRr5e_0(i);
        }
    }

    @Override // android.widget.TextView
    public void setCustomSelectionActionModeCallback(ActionMode.Callback callback) {
        super.setCustomSelectionActionModeCallback(Xgtqvk_8.KQgRr5e_0(this, callback));
    }

    public void setSupportAllCaps(boolean z) {
        Nm6q_10 nm6q_10 = this.mTextHelper;
        if (nm6q_10 != null) {
            nm6q_10.KQgRr5e_0(z);
        }
    }

    @Override // X6FRs_4.IMuAHx_6.EuDEkJe_12.BVpCZyH_19
    public void setSupportBackgroundTintList(ColorStateList colorStateList) {
        Mqv2r_3 mqv2r_3 = this.mBackgroundTintHelper;
        if (mqv2r_3 != null) {
            mqv2r_3.QxJ9d_1(colorStateList);
        }
    }

    @Override // X6FRs_4.IMuAHx_6.EuDEkJe_12.BVpCZyH_19
    public void setSupportBackgroundTintMode(PorterDuff.Mode mode) {
        Mqv2r_3 mqv2r_3 = this.mBackgroundTintHelper;
        if (mqv2r_3 != null) {
            mqv2r_3.KQgRr5e_0(mode);
        }
    }

    @Override // android.widget.TextView
    public void setTextAppearance(Context context, int i) {
        super.setTextAppearance(context, i);
        Nm6q_10 nm6q_10 = this.mTextHelper;
        if (nm6q_10 != null) {
            nm6q_10.KQgRr5e_0(context, i);
        }
    }

    @Override // android.widget.TextView
    public void setTextSize(int i, float f) {
        if (QxJ9d_1.KQgRr5e_0) {
            super.setTextSize(i, f);
            return;
        }
        Nm6q_10 nm6q_10 = this.mTextHelper;
        if (nm6q_10 != null) {
            nm6q_10.KQgRr5e_0(i, f);
        }
    }

    public AppCompatButton(Context context, AttributeSet attributeSet) {
        this(context, attributeSet, KQgRr5e_0.buttonStyle);
    }

    public AppCompatButton(Context context, AttributeSet attributeSet, int i) {
        super(XDsvEfm_26.KQgRr5e_0(context), attributeSet, i);
        Mqv2r_3 mqv2r_3 = new Mqv2r_3(this);
        this.mBackgroundTintHelper = mqv2r_3;
        mqv2r_3.KQgRr5e_0(attributeSet, i);
        Nm6q_10 nm6q_10 = new Nm6q_10(this);
        this.mTextHelper = nm6q_10;
        nm6q_10.KQgRr5e_0(attributeSet, i);
        this.mTextHelper.m412KQgRr5e_0();
    }
}
