package defpackage;

import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.widget.CompoundButton;
import android.widget.TextView;

/* JADX INFO: renamed from: ᵖᵞ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C2435 {

    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public boolean f9480;

    /* JADX INFO: renamed from: ᵻˈᵦʼ, reason: contains not printable characters */
    public final TextView f9483;

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public ColorStateList f9481 = null;

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public PorterDuff.Mode f9478 = null;

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public boolean f9479 = false;

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public boolean f9482 = false;

    public /* synthetic */ C2435(TextView textView) {
        this.f9483 = textView;
    }

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public void m6174() {
        C0579 c0579 = (C0579) this.f9483;
        Drawable checkMarkDrawable = c0579.getCheckMarkDrawable();
        if (checkMarkDrawable != null) {
            if (this.f9479 || this.f9482) {
                Drawable drawableMutate = checkMarkDrawable.mutate();
                if (this.f9479) {
                    drawableMutate.setTintList(this.f9481);
                }
                if (this.f9482) {
                    drawableMutate.setTintMode(this.f9478);
                }
                if (drawableMutate.isStateful()) {
                    drawableMutate.setState(c0579.getDrawableState());
                }
                c0579.setCheckMarkDrawable(drawableMutate);
            }
        }
    }

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public void m6175(AttributeSet attributeSet, int i) {
        int resourceId;
        int resourceId2;
        CompoundButton compoundButton = (CompoundButton) this.f9483;
        Context context = compoundButton.getContext();
        int[] iArr = AbstractC0430.f2388;
        C5398 c5398M11010 = C5398.m11010(context, attributeSet, iArr, i);
        TypedArray typedArray = (TypedArray) c5398M11010.f20483;
        AbstractC2746.m6646(compoundButton, compoundButton.getContext(), iArr, attributeSet, (TypedArray) c5398M11010.f20483, i);
        try {
            if (typedArray.hasValue(1) && (resourceId2 = typedArray.getResourceId(1, 0)) != 0) {
                try {
                    compoundButton.setButtonDrawable(ᵥˇᵛˎ.ᵶˇᵱ(compoundButton.getContext(), resourceId2));
                } catch (Resources.NotFoundException unused) {
                    if (typedArray.hasValue(0)) {
                        compoundButton.setButtonDrawable(ᵥˇᵛˎ.ᵶˇᵱ(compoundButton.getContext(), resourceId));
                    }
                }
            } else if (typedArray.hasValue(0) && (resourceId = typedArray.getResourceId(0, 0)) != 0) {
                compoundButton.setButtonDrawable(ᵥˇᵛˎ.ᵶˇᵱ(compoundButton.getContext(), resourceId));
            }
            if (typedArray.hasValue(2)) {
                compoundButton.setButtonTintList(c5398M11010.m11016(2));
            }
            if (typedArray.hasValue(3)) {
                compoundButton.setButtonTintMode(AbstractC0912.m3159(typedArray.getInt(3, -1), null));
            }
            c5398M11010.m11012();
        } catch (Throwable th) {
            c5398M11010.m11012();
            throw th;
        }
    }

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public void m6176() {
        CompoundButton compoundButton = (CompoundButton) this.f9483;
        Drawable buttonDrawable = compoundButton.getButtonDrawable();
        if (buttonDrawable != null) {
            if (this.f9479 || this.f9482) {
                Drawable drawableMutate = buttonDrawable.mutate();
                if (this.f9479) {
                    drawableMutate.setTintList(this.f9481);
                }
                if (this.f9482) {
                    drawableMutate.setTintMode(this.f9478);
                }
                if (drawableMutate.isStateful()) {
                    drawableMutate.setState(compoundButton.getDrawableState());
                }
                compoundButton.setButtonDrawable(drawableMutate);
            }
        }
    }
}
