package com.vinfast.companion.core.base.ui.widget;

/* JADX INFO: compiled from: r8-map-id-ae6aab8d9a1033945587ffdd1bc6222159522c1d66e66a2c4cecb065134dd0a6 */
/* JADX INFO: loaded from: E:\ios\vf_dex\classes15.dex */
@kotlin.Metadata(d1 = {"\u0000X\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0002\b\u0003\n\u0002\u0010\u0007\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0014\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u000b\n\u0002\u0010\u000e\n\u0002\b\u001c\u0018\u00002\u00020\u0001B\u0011\b\u0016\u0012\u0006\u0010\u0003\u001a\u00020\u0002¢\u0006\u0004\b\u0004\u0010\u0005B\u001b\b\u0016\u0012\u0006\u0010\u0003\u001a\u00020\u0002\u0012\b\u0010\u0007\u001a\u0004\u0018\u00010\u0006¢\u0006\u0004\b\u0004\u0010\bB#\b\u0016\u0012\u0006\u0010\u0003\u001a\u00020\u0002\u0012\b\u0010\u0007\u001a\u0004\u0018\u00010\u0006\u0012\u0006\u0010\n\u001a\u00020\t¢\u0006\u0004\b\u0004\u0010\u000bJ\u000f\u0010\r\u001a\u00020\fH\u0002¢\u0006\u0004\b\r\u0010\u000eJ\u000f\u0010\u000f\u001a\u00020\fH\u0002¢\u0006\u0004\b\u000f\u0010\u000eJ\u000f\u0010\u0011\u001a\u00020\u0010H\u0002¢\u0006\u0004\b\u0011\u0010\u0012J\u0017\u0010\u0015\u001a\u00020\f2\u0006\u0010\u0014\u001a\u00020\u0013H\u0002¢\u0006\u0004\b\u0015\u0010\u0016J\u0017\u0010\u0017\u001a\u00020\f2\u0006\u0010\u0014\u001a\u00020\u0013H\u0002¢\u0006\u0004\b\u0017\u0010\u0016J\u0017\u0010\u0018\u001a\u00020\f2\u0006\u0010\u0014\u001a\u00020\u0013H\u0002¢\u0006\u0004\b\u0018\u0010\u0016J\u0017\u0010\u0019\u001a\u00020\f2\u0006\u0010\u0014\u001a\u00020\u0013H\u0002¢\u0006\u0004\b\u0019\u0010\u0016J\u0017\u0010\u001a\u001a\u00020\f2\u0006\u0010\u0014\u001a\u00020\u0013H\u0002¢\u0006\u0004\b\u001a\u0010\u0016J\u0017\u0010\u001b\u001a\u00020\f2\u0006\u0010\u0014\u001a\u00020\u0013H\u0002¢\u0006\u0004\b\u001b\u0010\u0016J/\u0010\u001f\u001a\u00020\f2\u0006\u0010\u001c\u001a\u00020\t2\u0006\u0010\r\u001a\u00020\t2\u0006\u0010\u001d\u001a\u00020\t2\u0006\u0010\u001e\u001a\u00020\tH\u0014¢\u0006\u0004\b\u001f\u0010 J\u0017\u0010!\u001a\u00020\f2\u0006\u0010\u0014\u001a\u00020\u0013H\u0014¢\u0006\u0004\b!\u0010\u0016J\u0017\u0010\"\u001a\u00020\f2\b\b\u0001\u0010\u0019\u001a\u00020\t¢\u0006\u0004\b\"\u0010#J\u0017\u0010$\u001a\u00020\f2\b\b\u0001\u0010\u0019\u001a\u00020\t¢\u0006\u0004\b$\u0010#J\r\u0010%\u001a\u00020\u0010¢\u0006\u0004\b%\u0010\u0012R\u0016\u0010'\u001a\u00020\t8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\u0015\u0010&R\u0016\u0010*\u001a\u00020(8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\u001a\u0010)R\u0018\u0010-\u001a\u0004\u0018\u00010+8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\u0019\u0010,R\u0016\u0010.\u001a\u00020\t8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\u0017\u0010&R\u0016\u0010/\u001a\u00020\t8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\u0018\u0010&R\u0018\u00102\u001a\u0004\u0018\u0001008\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\u001b\u00101R\u0016\u00103\u001a\u00020(8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\r\u0010)R\u0018\u00105\u001a\u0004\u0018\u00010+8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b4\u0010,R\u0018\u00107\u001a\u0004\u0018\u0001008\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b6\u00101R\u0016\u00109\u001a\u00020\t8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b8\u0010&R\u0016\u0010;\u001a\u00020\t8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b:\u0010&R\u0016\u0010?\u001a\u00020<8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b=\u0010>R\u0016\u0010A\u001a\u00020<8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b@\u0010>R\u0016\u0010C\u001a\u00020(8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\bB\u0010)R\u0018\u0010E\u001a\u0004\u0018\u00010+8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\bD\u0010,R\u0016\u0010G\u001a\u00020\t8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\bF\u0010&R\u0016\u0010I\u001a\u00020\t8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\bH\u0010&R\u0016\u0010L\u001a\u00020\u00108\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\bJ\u0010KR\u0016\u0010N\u001a\u00020\t8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\bM\u0010&R\u0016\u0010P\u001a\u00020\t8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\bO\u0010&R\u0016\u0010R\u001a\u00020\t8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\bQ\u0010&R\u0016\u0010S\u001a\u00020\t8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\u001c\u0010&R\u0016\u0010U\u001a\u00020\t8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\bT\u0010&R\u0016\u0010W\u001a\u00020\t8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\bV\u0010&¨\u0006X"}, d2 = {"Lcom/vinfast/companion/core/base/ui/widget/SeekBarWithHint;", "Landroidx/appcompat/widget/AppCompatSeekBar;", "Landroid/content/Context;", "context", "<init>", "(Landroid/content/Context;)V", "Landroid/util/AttributeSet;", "attrs", "(Landroid/content/Context;Landroid/util/AttributeSet;)V", "", "defStyleAttr", "(Landroid/content/Context;Landroid/util/AttributeSet;I)V", "", "h", "()V", "a", "", "getCenterPointX", "()F", "Landroid/graphics/Canvas;", "canvas", "b", "(Landroid/graphics/Canvas;)V", "e", "f", "d", "c", "g", "w", "oldw", "oldh", "onSizeChanged", "(IIII)V", "onDraw", "setBackgroundProgressActive", "(I)V", "setBackgroundProgressDefault", "getThumbCenterX", "I", "startValue", "", "Z", "isShowHintLabel", "Landroid/graphics/Paint;", "Landroid/graphics/Paint;", "hintPaint", "labelTextColor", "labelTextSize", "Landroid/graphics/Typeface;", "Landroid/graphics/Typeface;", "labelTypeFace", "isShowDescTitle", "i", "descPaint", "j", "descTextTypeFace", "k", "descTextSize", "l", "descTextColor", "", "m", "Ljava/lang/String;", "descTextMin", "n", "descTextMax", "o", "isShowTickMark", "p", "tickMarkPaint", "q", "backgroundProgressActive", "r", "backgroundProgressDefault", "s", "F", "dimen1", "t", "dimen4", "u", "dimen6", "v", "dimen8", "dimen19", "x", "dimen28", "y", "dimen34", "core_release"}, k = 1, mv = {2, 2, 0}, xi = 48)
public final class SeekBarWithHint extends androidx.appcompat.widget.AppCompatSeekBar {

    /* JADX INFO: renamed from: b, reason: from kotlin metadata */
    private int startValue;

    /* JADX INFO: renamed from: c, reason: from kotlin metadata */
    private boolean isShowHintLabel;

    /* JADX INFO: renamed from: d, reason: from kotlin metadata */
    private android.graphics.Paint hintPaint;

    /* JADX INFO: renamed from: e, reason: from kotlin metadata */
    private int labelTextColor;

    /* JADX INFO: renamed from: f, reason: from kotlin metadata */
    private int labelTextSize;

    /* JADX INFO: renamed from: g, reason: from kotlin metadata */
    private android.graphics.Typeface labelTypeFace;

    /* JADX INFO: renamed from: h, reason: from kotlin metadata */
    private boolean isShowDescTitle;

    /* JADX INFO: renamed from: i, reason: from kotlin metadata */
    private android.graphics.Paint descPaint;

    /* JADX INFO: renamed from: j, reason: from kotlin metadata */
    private android.graphics.Typeface descTextTypeFace;

    /* JADX INFO: renamed from: k, reason: from kotlin metadata */
    private int descTextSize;

    /* JADX INFO: renamed from: l, reason: from kotlin metadata */
    private int descTextColor;

    /* JADX INFO: renamed from: m, reason: from kotlin metadata */
    private java.lang.String descTextMin;

    /* JADX INFO: renamed from: n, reason: from kotlin metadata */
    private java.lang.String descTextMax;

    /* JADX INFO: renamed from: o, reason: from kotlin metadata */
    private boolean isShowTickMark;

    /* JADX INFO: renamed from: p, reason: from kotlin metadata */
    private android.graphics.Paint tickMarkPaint;

    /* JADX INFO: renamed from: q, reason: from kotlin metadata */
    private int backgroundProgressActive;

    /* JADX INFO: renamed from: r, reason: from kotlin metadata */
    private int backgroundProgressDefault;

    /* JADX INFO: renamed from: s, reason: from kotlin metadata */
    private float dimen1;

    /* JADX INFO: renamed from: t, reason: from kotlin metadata */
    private int dimen4;

    /* JADX INFO: renamed from: u, reason: from kotlin metadata */
    private int dimen6;

    /* JADX INFO: renamed from: v, reason: from kotlin metadata */
    private int dimen8;

    /* JADX INFO: renamed from: w, reason: from kotlin metadata */
    private int dimen19;

    /* JADX INFO: renamed from: x, reason: from kotlin metadata */
    private int dimen28;

    /* JADX INFO: renamed from: y, reason: from kotlin metadata */
    private int dimen34;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public SeekBarWithHint(@org.jetbrains.annotations.NotNull android.content.Context context) {
        super(context);
        kotlin.jvm.internal.Intrinsics.l(context, "context");
        this.isShowHintLabel = true;
        this.labelTextColor = com.vinfast.companion.core.R.color.white;
        com.vinfast.companion.core.utils.DimensionUtils dimensionUtils = com.vinfast.companion.core.utils.DimensionUtils.a;
        this.labelTextSize = kotlin.math.MathKt.d(dimensionUtils.a(14.0f));
        this.descTextSize = kotlin.math.MathKt.d(dimensionUtils.a(12.0f));
        this.descTextColor = com.vinfast.companion.core.R.color.white_op_60;
        this.descTextMin = "";
        this.descTextMax = "";
        this.isShowTickMark = true;
        this.backgroundProgressActive = com.vinfast.companion.core.R.drawable.bg_gradient_seekbar;
        this.backgroundProgressDefault = com.vinfast.companion.core.R.drawable.bg_seekbar_not_available;
        this.dimen1 = dimensionUtils.a(1.0f);
        this.dimen4 = kotlin.math.MathKt.d(dimensionUtils.a(4.0f));
        this.dimen6 = kotlin.math.MathKt.d(dimensionUtils.a(6.0f));
        this.dimen8 = kotlin.math.MathKt.d(dimensionUtils.a(8.0f));
        this.dimen19 = kotlin.math.MathKt.d(dimensionUtils.a(19.0f));
        this.dimen28 = kotlin.math.MathKt.d(dimensionUtils.a(28.0f));
        this.dimen34 = kotlin.math.MathKt.d(dimensionUtils.a(34.0f));
        h();
    }

    /* JADX WARN: Multi-variable type inference failed */
    private final void a() {
        android.graphics.Paint paint;
        int iHeight = getThumb().getBounds().height();
        boolean z = this.isShowHintLabel;
        if (z) {
            iHeight += (this.dimen34 + this.dimen6) * 2;
        }
        if (this.isShowDescTitle && !z && (paint = this.descPaint) != null) {
            android.graphics.Rect rect = new android.graphics.Rect();
            paint.getTextBounds("M", 0, 1, rect);
            iHeight += (rect.height() + this.dimen4) * 2;
        }
        int i = iHeight + this.dimen8;
        android.view.ViewGroup.LayoutParams layoutParams = getLayoutParams();
        if (layoutParams == null) {
            setLayoutParams(new android.view.ViewGroup.LayoutParams(getWidth(), i));
        } else {
            layoutParams.height = i;
            setLayoutParams(layoutParams);
        }
    }

    /* JADX WARN: Multi-variable type inference failed */
    private final void b(android.graphics.Canvas canvas) {
        int paddingLeft = getPaddingLeft();
        int width = getWidth() - getPaddingRight();
        float height = getHeight() / 2.0f;
        int i = this.dimen8;
        float f = height - (i / 2);
        float f2 = i + f;
        androidx.vectordrawable.graphics.drawable.VectorDrawableCompat vectorDrawableCompatB = androidx.vectordrawable.graphics.drawable.VectorDrawableCompat.b(getContext().getResources(), this.backgroundProgressActive, (android.content.res.Resources.Theme) null);
        if (vectorDrawableCompatB != null) {
            vectorDrawableCompatB.setBounds(paddingLeft, (int) f, width, (int) f2);
        }
        if (vectorDrawableCompatB != null) {
            vectorDrawableCompatB.draw(canvas);
        }
    }

    /* JADX WARN: Multi-variable type inference failed */
    private final void c(android.graphics.Canvas canvas) {
        android.graphics.Paint paint;
        if (this.isShowDescTitle && (paint = this.descPaint) != null) {
            if (this.descTextMin.length() > 0) {
                android.graphics.Rect rect = new android.graphics.Rect();
                java.lang.String str = this.descTextMin;
                paint.getTextBounds(str, 0, str.length(), rect);
                canvas.drawText(this.descTextMin, getPaddingLeft(), getThumb().getBounds().bottom + this.dimen4 + rect.height(), paint);
            }
            if (this.descTextMax.length() > 0) {
                android.graphics.Rect rect2 = new android.graphics.Rect();
                java.lang.String str2 = this.descTextMax;
                paint.getTextBounds(str2, 0, str2.length(), rect2);
                canvas.drawText(this.descTextMax, (getWidth() - getPaddingRight()) - rect2.width(), getThumb().getBounds().bottom + this.dimen4 + rect2.height(), paint);
            }
        }
    }

    /* JADX WARN: Multi-variable type inference failed */
    private final void d(android.graphics.Canvas canvas) {
        if (this.isShowHintLabel) {
            float centerPointX = getCenterPointX();
            float f = getThumb().getBounds().top;
            int i = this.dimen28;
            float f2 = centerPointX - (i / 2);
            float f3 = i + f2;
            float f4 = f - this.dimen6;
            float f5 = f4 - this.dimen34;
            androidx.vectordrawable.graphics.drawable.VectorDrawableCompat vectorDrawableCompatB = androidx.vectordrawable.graphics.drawable.VectorDrawableCompat.b(getContext().getResources(), com.vinfast.companion.core.R.drawable.ic_hint_seekbar_background, (android.content.res.Resources.Theme) null);
            if (vectorDrawableCompatB != null) {
                vectorDrawableCompatB.setBounds((int) f2, (int) f5, (int) f3, (int) f4);
            }
            if (vectorDrawableCompatB != null) {
                vectorDrawableCompatB.draw(canvas);
            }
        }
    }

    /* JADX WARN: Multi-variable type inference failed */
    private final void e(android.graphics.Canvas canvas) {
        if (getProgress() == getMax()) {
            return;
        }
        int centerPointX = (int) getCenterPointX();
        int width = getWidth() - getPaddingRight();
        float height = getHeight() / 2.0f;
        int i = this.dimen8;
        float f = height - (i / 2);
        float f2 = i + f;
        androidx.vectordrawable.graphics.drawable.VectorDrawableCompat vectorDrawableCompatB = androidx.vectordrawable.graphics.drawable.VectorDrawableCompat.b(getContext().getResources(), this.backgroundProgressDefault, (android.content.res.Resources.Theme) null);
        if (vectorDrawableCompatB != null) {
            vectorDrawableCompatB.setBounds(centerPointX, (int) f, width, (int) f2);
        }
        if (vectorDrawableCompatB != null) {
            vectorDrawableCompatB.draw(canvas);
        }
    }

    /* JADX WARN: Multi-variable type inference failed */
    private final void f(android.graphics.Canvas canvas) {
        android.graphics.Paint paint;
        if (this.isShowHintLabel && (paint = this.hintPaint) != null) {
            float centerPointX = getCenterPointX();
            java.lang.String strValueOf = java.lang.String.valueOf(getProgress() + this.startValue);
            android.graphics.Rect rect = new android.graphics.Rect();
            paint.getTextBounds(strValueOf, 0, strValueOf.length(), rect);
            canvas.drawText(strValueOf, (centerPointX - (rect.width() / 2)) - 2, ((getThumb().getBounds().top - this.dimen6) - this.dimen19) + (rect.height() / 2), paint);
        }
    }

    /* JADX WARN: Multi-variable type inference failed */
    private final void g(android.graphics.Canvas canvas) {
        android.graphics.Paint paint;
        if (this.isShowTickMark && (paint = this.tickMarkPaint) != null) {
            int paddingLeft = getPaddingLeft() - getThumbOffset();
            int width = (getWidth() - paddingLeft) - (getPaddingRight() - getThumbOffset());
            float height = getHeight() / 2.0f;
            int i = this.dimen8;
            float f = height - (i / 2);
            float f2 = f + i;
            int max = getMax();
            for (int i2 = 1; i2 < max; i2++) {
                float max2 = i2 / getMax();
                float fWidth = (getThumb().getBounds().width() * (0.5f - max2)) + (max2 * width) + paddingLeft;
                canvas.drawLine(fWidth, f, fWidth, f2, paint);
            }
        }
    }

    /* JADX WARN: Multi-variable type inference failed */
    private final float getCenterPointX() {
        int paddingLeft = getPaddingLeft() - getThumbOffset();
        int width = (getWidth() - paddingLeft) - (getPaddingRight() - getThumbOffset());
        float progress = getProgress() / getMax();
        return (progress * width) + paddingLeft + (getThumb().getBounds().width() * (0.5f - progress));
    }

    /* JADX WARN: Multi-variable type inference failed */
    private final void h() {
        this.hintPaint = new android.text.TextPaint();
        this.descPaint = new android.text.TextPaint();
        this.tickMarkPaint = new android.text.TextPaint();
        android.content.Context context = getContext();
        if (context != null) {
            android.graphics.Paint paint = this.hintPaint;
            kotlin.jvm.internal.Intrinsics.i(paint);
            paint.setColor(context.getColor(this.labelTextColor));
            android.graphics.Paint paint2 = this.descPaint;
            kotlin.jvm.internal.Intrinsics.i(paint2);
            paint2.setColor(context.getColor(this.descTextColor));
            android.graphics.Paint paint3 = this.tickMarkPaint;
            kotlin.jvm.internal.Intrinsics.i(paint3);
            paint3.setColor(context.getColor(com.vinfast.companion.core.R.color.white_op_40));
            android.graphics.Paint paint4 = this.tickMarkPaint;
            kotlin.jvm.internal.Intrinsics.i(paint4);
            paint4.setStrokeWidth(this.dimen1);
        }
        android.graphics.Paint paint5 = this.hintPaint;
        kotlin.jvm.internal.Intrinsics.i(paint5);
        paint5.setTextSize(this.labelTextSize);
        android.graphics.Paint paint6 = this.hintPaint;
        kotlin.jvm.internal.Intrinsics.i(paint6);
        paint6.setTypeface(this.labelTypeFace);
        android.graphics.Paint paint7 = this.hintPaint;
        kotlin.jvm.internal.Intrinsics.i(paint7);
        paint7.setAntiAlias(true);
        android.graphics.Paint paint8 = this.descPaint;
        kotlin.jvm.internal.Intrinsics.i(paint8);
        paint8.setTextSize(this.descTextSize);
        android.graphics.Paint paint9 = this.descPaint;
        kotlin.jvm.internal.Intrinsics.i(paint9);
        paint9.setTypeface(this.descTextTypeFace);
        setProgressDrawable(getContext().getDrawable(com.vinfast.companion.core.R.drawable.progress_drawable_seekbar_transparent));
    }

    public final float getThumbCenterX() {
        return getCenterPointX();
    }

    protected void onDraw(android.graphics.Canvas canvas) {
        kotlin.jvm.internal.Intrinsics.l(canvas, "canvas");
        b(canvas);
        e(canvas);
        g(canvas);
        d(canvas);
        f(canvas);
        c(canvas);
        super.onDraw(canvas);
    }

    /* JADX WARN: Multi-variable type inference failed */
    protected void onSizeChanged(int w, int h, int oldw, int oldh) {
        super/*android.view.View*/.onSizeChanged(w, h, oldw, oldh);
        a();
    }

    /* JADX WARN: Multi-variable type inference failed */
    public final void setBackgroundProgressActive(@androidx.annotation.DrawableRes int d) {
        this.backgroundProgressActive = d;
        postInvalidate();
    }

    /* JADX WARN: Multi-variable type inference failed */
    public final void setBackgroundProgressDefault(@androidx.annotation.DrawableRes int d) {
        this.backgroundProgressDefault = d;
        postInvalidate();
    }

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public SeekBarWithHint(@org.jetbrains.annotations.NotNull android.content.Context context, @org.jetbrains.annotations.Nullable android.util.AttributeSet attributeSet) {
        super(context, attributeSet);
        kotlin.jvm.internal.Intrinsics.l(context, "context");
        this.isShowHintLabel = true;
        this.labelTextColor = com.vinfast.companion.core.R.color.white;
        com.vinfast.companion.core.utils.DimensionUtils dimensionUtils = com.vinfast.companion.core.utils.DimensionUtils.a;
        this.labelTextSize = kotlin.math.MathKt.d(dimensionUtils.a(14.0f));
        this.descTextSize = kotlin.math.MathKt.d(dimensionUtils.a(12.0f));
        this.descTextColor = com.vinfast.companion.core.R.color.white_op_60;
        this.descTextMin = "";
        this.descTextMax = "";
        this.isShowTickMark = true;
        this.backgroundProgressActive = com.vinfast.companion.core.R.drawable.bg_gradient_seekbar;
        this.backgroundProgressDefault = com.vinfast.companion.core.R.drawable.bg_seekbar_not_available;
        this.dimen1 = dimensionUtils.a(1.0f);
        this.dimen4 = kotlin.math.MathKt.d(dimensionUtils.a(4.0f));
        this.dimen6 = kotlin.math.MathKt.d(dimensionUtils.a(6.0f));
        this.dimen8 = kotlin.math.MathKt.d(dimensionUtils.a(8.0f));
        this.dimen19 = kotlin.math.MathKt.d(dimensionUtils.a(19.0f));
        this.dimen28 = kotlin.math.MathKt.d(dimensionUtils.a(28.0f));
        this.dimen34 = kotlin.math.MathKt.d(dimensionUtils.a(34.0f));
        android.content.res.TypedArray typedArrayObtainStyledAttributes = context.getTheme().obtainStyledAttributes(attributeSet, com.vinfast.companion.core.R.styleable.SeekBarWithHint, 0, 0);
        kotlin.jvm.internal.Intrinsics.k(typedArrayObtainStyledAttributes, "obtainStyledAttributes(...)");
        try {
            this.startValue = typedArrayObtainStyledAttributes.getInteger(com.vinfast.companion.core.R.styleable.SeekBarWithHint_SBH_startValue, this.startValue);
            this.labelTextColor = typedArrayObtainStyledAttributes.getResourceId(com.vinfast.companion.core.R.styleable.SeekBarWithHint_SBH_labelColor, this.labelTextColor);
            this.labelTextSize = typedArrayObtainStyledAttributes.getDimensionPixelSize(com.vinfast.companion.core.R.styleable.SeekBarWithHint_SBH_labelSize, this.labelTextSize);
            int resourceId = typedArrayObtainStyledAttributes.getResourceId(com.vinfast.companion.core.R.styleable.SeekBarWithHint_SBH_labelTypeface, 0);
            if (resourceId > 0) {
                this.labelTypeFace = androidx.core.content.res.ResourcesCompat.h(context, resourceId);
            }
            this.descTextColor = typedArrayObtainStyledAttributes.getResourceId(com.vinfast.companion.core.R.styleable.SeekBarWithHint_SBH_descTextColor, this.descTextColor);
            this.descTextSize = typedArrayObtainStyledAttributes.getDimensionPixelSize(com.vinfast.companion.core.R.styleable.SeekBarWithHint_SBH_descTextSize, this.descTextSize);
            int resourceId2 = typedArrayObtainStyledAttributes.getResourceId(com.vinfast.companion.core.R.styleable.SeekBarWithHint_SBH_descTextTypeface, 0);
            if (resourceId2 > 0) {
                this.descTextTypeFace = androidx.core.content.res.ResourcesCompat.h(context, resourceId2);
            }
            java.lang.String string = typedArrayObtainStyledAttributes.getString(com.vinfast.companion.core.R.styleable.SeekBarWithHint_SBH_descTextMin);
            this.descTextMin = string == null ? this.descTextMin : string;
            java.lang.String string2 = typedArrayObtainStyledAttributes.getString(com.vinfast.companion.core.R.styleable.SeekBarWithHint_SBH_descTextMax);
            this.descTextMax = string2 == null ? this.descTextMax : string2;
            this.isShowDescTitle = this.descTextMin.length() > 0 || this.descTextMax.length() > 0;
            this.isShowTickMark = typedArrayObtainStyledAttributes.getBoolean(com.vinfast.companion.core.R.styleable.SeekBarWithHint_SBH_showTickMark, true);
            this.isShowHintLabel = typedArrayObtainStyledAttributes.getBoolean(com.vinfast.companion.core.R.styleable.SeekBarWithHint_SBH_showLabelHintValue, true);
            this.backgroundProgressActive = typedArrayObtainStyledAttributes.getResourceId(com.vinfast.companion.core.R.styleable.SeekBarWithHint_SBH_backgroundProgressActive, this.backgroundProgressActive);
            this.backgroundProgressDefault = typedArrayObtainStyledAttributes.getResourceId(com.vinfast.companion.core.R.styleable.SeekBarWithHint_SBH_backgroundProgressDefault, this.backgroundProgressDefault);
            typedArrayObtainStyledAttributes.recycle();
            h();
        } catch (java.lang.Throwable th) {
            typedArrayObtainStyledAttributes.recycle();
            throw th;
        }
    }

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public SeekBarWithHint(@org.jetbrains.annotations.NotNull android.content.Context context, @org.jetbrains.annotations.Nullable android.util.AttributeSet attributeSet, int i) {
        super(context, attributeSet, i);
        kotlin.jvm.internal.Intrinsics.l(context, "context");
        this.isShowHintLabel = true;
        this.labelTextColor = com.vinfast.companion.core.R.color.white;
        com.vinfast.companion.core.utils.DimensionUtils dimensionUtils = com.vinfast.companion.core.utils.DimensionUtils.a;
        this.labelTextSize = kotlin.math.MathKt.d(dimensionUtils.a(14.0f));
        this.descTextSize = kotlin.math.MathKt.d(dimensionUtils.a(12.0f));
        this.descTextColor = com.vinfast.companion.core.R.color.white_op_60;
        this.descTextMin = "";
        this.descTextMax = "";
        this.isShowTickMark = true;
        this.backgroundProgressActive = com.vinfast.companion.core.R.drawable.bg_gradient_seekbar;
        this.backgroundProgressDefault = com.vinfast.companion.core.R.drawable.bg_seekbar_not_available;
        this.dimen1 = dimensionUtils.a(1.0f);
        this.dimen4 = kotlin.math.MathKt.d(dimensionUtils.a(4.0f));
        this.dimen6 = kotlin.math.MathKt.d(dimensionUtils.a(6.0f));
        this.dimen8 = kotlin.math.MathKt.d(dimensionUtils.a(8.0f));
        this.dimen19 = kotlin.math.MathKt.d(dimensionUtils.a(19.0f));
        this.dimen28 = kotlin.math.MathKt.d(dimensionUtils.a(28.0f));
        this.dimen34 = kotlin.math.MathKt.d(dimensionUtils.a(34.0f));
        h();
    }
}
