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 = {"\u0000t\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\u0004\n\u0002\u0010\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u0019\n\u0002\u0010 \n\u0002\u0010\u000e\n\u0002\b\u0006\n\u0002\u0010\u0007\n\u0002\b\u000f\n\u0002\u0018\u0002\n\u0002\b?\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\t\u0018\u00002\u00020\u0001:\u0002¥\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\u000bB+\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\u0012\u0006\u0010\f\u001a\u00020\t¢\u0006\u0004\b\u0004\u0010\rJ1\u0010\u000f\u001a\u00020\u000e2\u0006\u0010\u0003\u001a\u00020\u00022\b\u0010\u0007\u001a\u0004\u0018\u00010\u00062\u0006\u0010\n\u001a\u00020\t2\u0006\u0010\f\u001a\u00020\tH\u0002¢\u0006\u0004\b\u000f\u0010\rJ\u000f\u0010\u0010\u001a\u00020\u000eH\u0002¢\u0006\u0004\b\u0010\u0010\u0011J\u000f\u0010\u0012\u001a\u00020\u000eH\u0002¢\u0006\u0004\b\u0012\u0010\u0011J\u000f\u0010\u0013\u001a\u00020\u000eH\u0002¢\u0006\u0004\b\u0013\u0010\u0011J\u000f\u0010\u0014\u001a\u00020\u000eH\u0002¢\u0006\u0004\b\u0014\u0010\u0011J\u000f\u0010\u0015\u001a\u00020\u000eH\u0002¢\u0006\u0004\b\u0015\u0010\u0011J\u0017\u0010\u0018\u001a\u00020\u000e2\u0006\u0010\u0017\u001a\u00020\u0016H\u0002¢\u0006\u0004\b\u0018\u0010\u0019J\u0017\u0010\u001a\u001a\u00020\u000e2\u0006\u0010\u0017\u001a\u00020\u0016H\u0002¢\u0006\u0004\b\u001a\u0010\u0019J\u0019\u0010\u001b\u001a\u00020\u000e2\b\u0010\u0017\u001a\u0004\u0018\u00010\u0016H\u0002¢\u0006\u0004\b\u001b\u0010\u0019J\u000f\u0010\u001c\u001a\u00020\u000eH\u0002¢\u0006\u0004\b\u001c\u0010\u0011J\u001f\u0010\u001f\u001a\u00020\u000e2\u0006\u0010\u001d\u001a\u00020\t2\u0006\u0010\u001e\u001a\u00020\tH\u0014¢\u0006\u0004\b\u001f\u0010 J/\u0010$\u001a\u00020\u000e2\u0006\u0010!\u001a\u00020\t2\u0006\u0010\u0014\u001a\u00020\t2\u0006\u0010\"\u001a\u00020\t2\u0006\u0010#\u001a\u00020\tH\u0014¢\u0006\u0004\b$\u0010%J\u0017\u0010&\u001a\u00020\u000e2\u0006\u0010\u0017\u001a\u00020\u0016H\u0014¢\u0006\u0004\b&\u0010\u0019J\r\u0010'\u001a\u00020\t¢\u0006\u0004\b'\u0010(J\u0015\u0010*\u001a\u00020\u000e2\u0006\u0010)\u001a\u00020\t¢\u0006\u0004\b*\u0010+R\"\u0010/\u001a\u00020\t8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b\u001c\u0010,\u001a\u0004\b-\u0010(\"\u0004\b.\u0010+R(\u00107\u001a\b\u0012\u0004\u0012\u000201008\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b\u0015\u00102\u001a\u0004\b3\u00104\"\u0004\b5\u00106R\"\u0010>\u001a\u0002088\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b\u001a\u00109\u001a\u0004\b:\u0010;\"\u0004\b<\u0010=R\"\u0010A\u001a\u00020\t8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b\u0018\u0010,\u001a\u0004\b?\u0010(\"\u0004\b@\u0010+R\"\u0010D\u001a\u00020\t8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b\u001b\u0010,\u001a\u0004\bB\u0010(\"\u0004\bC\u0010+R\"\u0010G\u001a\u0002088\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b\u0010\u00109\u001a\u0004\bE\u0010;\"\u0004\bF\u0010=R$\u0010N\u001a\u0004\u0018\u00010H8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b\u0012\u0010I\u001a\u0004\bJ\u0010K\"\u0004\bL\u0010MR\"\u0010Q\u001a\u00020\t8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b\u0014\u0010,\u001a\u0004\bO\u0010(\"\u0004\bP\u0010+R\"\u0010T\u001a\u00020\t8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b\u0013\u0010,\u001a\u0004\bR\u0010(\"\u0004\bS\u0010+R\"\u0010W\u001a\u0002088\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b\u000f\u00109\u001a\u0004\bU\u0010;\"\u0004\bV\u0010=R$\u0010[\u001a\u0004\u0018\u00010H8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\bX\u0010I\u001a\u0004\bY\u0010K\"\u0004\bZ\u0010MR(\u0010_\u001a\b\u0012\u0004\u0012\u000201008\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b\\\u00102\u001a\u0004\b]\u00104\"\u0004\b^\u00106R\"\u0010c\u001a\u00020\t8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b`\u0010,\u001a\u0004\ba\u0010(\"\u0004\bb\u0010+R\"\u0010g\u001a\u00020\t8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\bd\u0010,\u001a\u0004\be\u0010(\"\u0004\bf\u0010+R\"\u0010k\u001a\u0002088\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\bh\u00109\u001a\u0004\bi\u0010;\"\u0004\bj\u0010=R$\u0010o\u001a\u0004\u0018\u00010H8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\bl\u0010I\u001a\u0004\bm\u0010K\"\u0004\bn\u0010MR\"\u0010s\u001a\u00020\t8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\bp\u0010,\u001a\u0004\bq\u0010(\"\u0004\br\u0010+R\"\u0010w\u001a\u0002088\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\bt\u00109\u001a\u0004\bu\u0010;\"\u0004\bv\u0010=R$\u0010{\u001a\u0004\u0018\u00010H8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\bx\u0010I\u001a\u0004\by\u0010K\"\u0004\bz\u0010MR\"\u0010\u007f\u001a\u00020\t8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b|\u0010,\u001a\u0004\b}\u0010(\"\u0004\b~\u0010+R&\u0010\u0083\u0001\u001a\u00020\t8\u0006@\u0006X\u0086\u000e¢\u0006\u0015\n\u0005\b\u0080\u0001\u0010,\u001a\u0005\b\u0081\u0001\u0010(\"\u0005\b\u0082\u0001\u0010+R&\u0010\u0087\u0001\u001a\u0002088\u0006@\u0006X\u0086\u000e¢\u0006\u0015\n\u0005\b\u0084\u0001\u00109\u001a\u0005\b\u0085\u0001\u0010;\"\u0005\b\u0086\u0001\u0010=R+\u0010\u008e\u0001\u001a\u0005\u0018\u00010\u0088\u00018\u0006@\u0006X\u0086\u000e¢\u0006\u0017\n\u0005\b!\u0010\u0089\u0001\u001a\u0006\b\u008a\u0001\u0010\u008b\u0001\"\u0006\b\u008c\u0001\u0010\u008d\u0001R\u001a\u0010\u0092\u0001\u001a\u00030\u008f\u00018\u0002@\u0002X\u0082.¢\u0006\b\n\u0006\b\u0090\u0001\u0010\u0091\u0001R\u001a\u0010\u0096\u0001\u001a\u00030\u0093\u00018\u0002@\u0002X\u0082.¢\u0006\b\n\u0006\b\u0094\u0001\u0010\u0095\u0001R\u001a\u0010\u0098\u0001\u001a\u00030\u0093\u00018\u0002@\u0002X\u0082.¢\u0006\b\n\u0006\b\u0097\u0001\u0010\u0095\u0001R\u001a\u0010\u009a\u0001\u001a\u00030\u008f\u00018\u0002@\u0002X\u0082.¢\u0006\b\n\u0006\b\u0099\u0001\u0010\u0091\u0001R-\u0010 \u0001\u001a\u0016\u0012\u0005\u0012\u00030\u009c\u00010\u009b\u0001j\n\u0012\u0005\u0012\u00030\u009c\u0001`\u009d\u00018\u0002@\u0002X\u0082.¢\u0006\b\n\u0006\b\u009e\u0001\u0010\u009f\u0001R\u0018\u0010¢\u0001\u001a\u00020\t8\u0002@\u0002X\u0082\u000e¢\u0006\u0007\n\u0005\b¡\u0001\u0010,R\u0018\u0010¤\u0001\u001a\u00020\t8\u0002@\u0002X\u0082\u000e¢\u0006\u0007\n\u0005\b£\u0001\u0010,¨\u0006¦\u0001"}, d2 = {"Lcom/vinfast/companion/core/base/ui/widget/BookingStepView;", "Landroid/view/View;", "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", "defStyleRes", "(Landroid/content/Context;Landroid/util/AttributeSet;II)V", "", "j", "f", "()V", "g", "i", "h", "b", "Landroid/graphics/Canvas;", "canvas", "d", "(Landroid/graphics/Canvas;)V", "c", "e", "a", "widthMeasureSpec", "heightMeasureSpec", "onMeasure", "(II)V", "w", "oldw", "oldh", "onSizeChanged", "(IIII)V", "onDraw", "getCurrentStep", "()I", "step", "setCurrentStep", "(I)V", "I", "getStepCount", "setStepCount", "stepCount", "", "", "Ljava/util/List;", "getStepOrder", "()Ljava/util/List;", "setStepOrder", "(Ljava/util/List;)V", "stepOrder", "", "F", "getStepOrderSize", "()F", "setStepOrderSize", "(F)V", "stepOrderSize", "getCurrentStepOrderBackgroundColor", "setCurrentStepOrderBackgroundColor", "currentStepOrderBackgroundColor", "getCurrentStepOrderTextColor", "setCurrentStepOrderTextColor", "currentStepOrderTextColor", "getCurrentStepOrderTextSize", "setCurrentStepOrderTextSize", "currentStepOrderTextSize", "Landroid/graphics/Typeface;", "Landroid/graphics/Typeface;", "getCurrentStepOrderTypeface", "()Landroid/graphics/Typeface;", "setCurrentStepOrderTypeface", "(Landroid/graphics/Typeface;)V", "currentStepOrderTypeface", "getOtherStepOrderBackgroundColor", "setOtherStepOrderBackgroundColor", "otherStepOrderBackgroundColor", "getOtherStepOrderTextColor", "setOtherStepOrderTextColor", "otherStepOrderTextColor", "getOtherStepOrderTextSize", "setOtherStepOrderTextSize", "otherStepOrderTextSize", "k", "getOtherStepOrderTypeface", "setOtherStepOrderTypeface", "otherStepOrderTypeface", "l", "getStepTitle", "setStepTitle", "stepTitle", "m", "getStepTitlePadding", "setStepTitlePadding", "stepTitlePadding", "n", "getCurrentStepTitleTextColor", "setCurrentStepTitleTextColor", "currentStepTitleTextColor", "o", "getCurrentStepTitleTextSize", "setCurrentStepTitleTextSize", "currentStepTitleTextSize", "p", "getCurrentStepTitleTypeface", "setCurrentStepTitleTypeface", "currentStepTitleTypeface", "q", "getOtherStepTitleTextColor", "setOtherStepTitleTextColor", "otherStepTitleTextColor", "r", "getOtherStepTitleTextSize", "setOtherStepTitleTextSize", "otherStepTitleTextSize", "s", "getOtherStepTitleTypeface", "setOtherStepTitleTypeface", "otherStepTitleTypeface", "t", "getProgressLineCompleteStepColor", "setProgressLineCompleteStepColor", "progressLineCompleteStepColor", "u", "getProgressLineIncompleteStepColor", "setProgressLineIncompleteStepColor", "progressLineIncompleteStepColor", "v", "getProgressLineWidth", "setProgressLineWidth", "progressLineWidth", "Landroid/graphics/drawable/Drawable;", "Landroid/graphics/drawable/Drawable;", "getCompleteIcon", "()Landroid/graphics/drawable/Drawable;", "setCompleteIcon", "(Landroid/graphics/drawable/Drawable;)V", "completeIcon", "Landroid/graphics/Paint;", "x", "Landroid/graphics/Paint;", "mStepOrderPaint", "Landroid/text/TextPaint;", "y", "Landroid/text/TextPaint;", "mStepOrderTextPaint", "z", "mStepTitleTextPaint", "A", "mProgressLinePaint", "Ljava/util/ArrayList;", "Lcom/vinfast/companion/core/base/ui/widget/BookingStepView$Step;", "Lkotlin/collections/ArrayList;", "B", "Ljava/util/ArrayList;", "mSteps", "C", "mCurrentStep", "D", "mMaxHeightTitle", "Step", "core_release"}, k = 1, mv = {2, 2, 0}, xi = 48)
@kotlin.jvm.internal.SourceDebugExtension
public final class BookingStepView extends android.view.View {

    /* JADX INFO: renamed from: A, reason: from kotlin metadata */
    private android.graphics.Paint mProgressLinePaint;

    /* JADX INFO: renamed from: B, reason: from kotlin metadata */
    private java.util.ArrayList mSteps;

    /* JADX INFO: renamed from: C, reason: from kotlin metadata */
    private int mCurrentStep;

    /* JADX INFO: renamed from: D, reason: from kotlin metadata */
    private int mMaxHeightTitle;

    /* JADX INFO: renamed from: a, reason: from kotlin metadata */
    private int stepCount;

    /* JADX INFO: renamed from: b, reason: from kotlin metadata */
    private java.util.List stepOrder;

    /* JADX INFO: renamed from: c, reason: from kotlin metadata */
    private float stepOrderSize;

    /* JADX INFO: renamed from: d, reason: from kotlin metadata */
    private int currentStepOrderBackgroundColor;

    /* JADX INFO: renamed from: e, reason: from kotlin metadata */
    private int currentStepOrderTextColor;

    /* JADX INFO: renamed from: f, reason: from kotlin metadata */
    private float currentStepOrderTextSize;

    /* JADX INFO: renamed from: g, reason: from kotlin metadata */
    private android.graphics.Typeface currentStepOrderTypeface;

    /* JADX INFO: renamed from: h, reason: from kotlin metadata */
    private int otherStepOrderBackgroundColor;

    /* JADX INFO: renamed from: i, reason: from kotlin metadata */
    private int otherStepOrderTextColor;

    /* JADX INFO: renamed from: j, reason: from kotlin metadata */
    private float otherStepOrderTextSize;

    /* JADX INFO: renamed from: k, reason: from kotlin metadata */
    private android.graphics.Typeface otherStepOrderTypeface;

    /* JADX INFO: renamed from: l, reason: from kotlin metadata */
    private java.util.List stepTitle;

    /* JADX INFO: renamed from: m, reason: from kotlin metadata */
    private int stepTitlePadding;

    /* JADX INFO: renamed from: n, reason: from kotlin metadata */
    private int currentStepTitleTextColor;

    /* JADX INFO: renamed from: o, reason: from kotlin metadata */
    private float currentStepTitleTextSize;

    /* JADX INFO: renamed from: p, reason: from kotlin metadata */
    private android.graphics.Typeface currentStepTitleTypeface;

    /* JADX INFO: renamed from: q, reason: from kotlin metadata */
    private int otherStepTitleTextColor;

    /* JADX INFO: renamed from: r, reason: from kotlin metadata */
    private float otherStepTitleTextSize;

    /* JADX INFO: renamed from: s, reason: from kotlin metadata */
    private android.graphics.Typeface otherStepTitleTypeface;

    /* JADX INFO: renamed from: t, reason: from kotlin metadata */
    private int progressLineCompleteStepColor;

    /* JADX INFO: renamed from: u, reason: from kotlin metadata */
    private int progressLineIncompleteStepColor;

    /* JADX INFO: renamed from: v, reason: from kotlin metadata */
    private float progressLineWidth;

    /* JADX INFO: renamed from: w, reason: from kotlin metadata */
    private android.graphics.drawable.Drawable completeIcon;

    /* JADX INFO: renamed from: x, reason: from kotlin metadata */
    private android.graphics.Paint mStepOrderPaint;

    /* JADX INFO: renamed from: y, reason: from kotlin metadata */
    private android.text.TextPaint mStepOrderTextPaint;

    /* JADX INFO: renamed from: z, reason: from kotlin metadata */
    private android.text.TextPaint mStepTitleTextPaint;

    /* JADX INFO: compiled from: r8-map-id-ae6aab8d9a1033945587ffdd1bc6222159522c1d66e66a2c4cecb065134dd0a6 */
    @kotlin.Metadata(d1 = {"\u0000@\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\u000e\n\u0002\b\u0006\n\u0002\u0010\b\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0010\u0007\n\u0002\b\u000b\n\u0002\u0018\u0002\n\u0002\b\r\n\u0002\u0018\u0002\n\u0002\b\b\b\u0082\b\u0018\u00002\u00020\u0001B\u0017\u0012\u0006\u0010\u0003\u001a\u00020\u0002\u0012\u0006\u0010\u0004\u001a\u00020\u0002¢\u0006\u0004\b\u0005\u0010\u0006J\u0010\u0010\u0007\u001a\u00020\u0002HÖ\u0001¢\u0006\u0004\b\u0007\u0010\bJ\u0010\u0010\n\u001a\u00020\tHÖ\u0001¢\u0006\u0004\b\n\u0010\u000bJ\u001a\u0010\u000e\u001a\u00020\r2\b\u0010\f\u001a\u0004\u0018\u00010\u0001HÖ\u0003¢\u0006\u0004\b\u000e\u0010\u000fR\u0017\u0010\u0003\u001a\u00020\u00028\u0006¢\u0006\f\n\u0004\b\u0010\u0010\u0011\u001a\u0004\b\u0012\u0010\bR\u0017\u0010\u0004\u001a\u00020\u00028\u0006¢\u0006\f\n\u0004\b\u0012\u0010\u0011\u001a\u0004\b\u0013\u0010\bR\"\u0010\u001b\u001a\u00020\u00148\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b\u0015\u0010\u0016\u001a\u0004\b\u0017\u0010\u0018\"\u0004\b\u0019\u0010\u001aR\"\u0010#\u001a\u00020\u001c8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b\u001d\u0010\u001e\u001a\u0004\b\u001f\u0010 \"\u0004\b!\u0010\"R\"\u0010'\u001a\u00020\u001c8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b$\u0010\u001e\u001a\u0004\b%\u0010 \"\u0004\b&\u0010\"R\"\u0010.\u001a\u00020(8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b)\u0010*\u001a\u0004\b\u0015\u0010+\"\u0004\b,\u0010-R\"\u00101\u001a\u00020\u001c8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b/\u0010\u001e\u001a\u0004\b\u001d\u0010 \"\u0004\b0\u0010\"R\"\u00103\u001a\u00020\u001c8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b\u0013\u0010\u001e\u001a\u0004\b$\u0010 \"\u0004\b2\u0010\"R\"\u00105\u001a\u00020\u00148\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b\u0017\u0010\u0016\u001a\u0004\b\u0010\u0010\u0018\"\u0004\b4\u0010\u001aR\"\u0010;\u001a\u0002068\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b\u001f\u00107\u001a\u0004\b/\u00108\"\u0004\b9\u0010:R\"\u0010=\u001a\u0002068\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b%\u00107\u001a\u0004\b)\u00108\"\u0004\b<\u0010:¨\u0006>"}, d2 = {"Lcom/vinfast/companion/core/base/ui/widget/BookingStepView$Step;", "", "", "order", "title", "<init>", "(Ljava/lang/String;Ljava/lang/String;)V", "toString", "()Ljava/lang/String;", "", "hashCode", "()I", "other", "", "equals", "(Ljava/lang/Object;)Z", "a", "Ljava/lang/String;", "b", "h", "Landroid/graphics/Rect;", "c", "Landroid/graphics/Rect;", "i", "()Landroid/graphics/Rect;", "setTitleBound", "(Landroid/graphics/Rect;)V", "titleBound", "", "d", "F", "j", "()F", "n", "(F)V", "titleX", "e", "k", "o", "titleY", "Landroid/graphics/RectF;", "f", "Landroid/graphics/RectF;", "()Landroid/graphics/RectF;", "setOrderBound", "(Landroid/graphics/RectF;)V", "orderBound", "g", "l", "orderTextX", "m", "orderTextY", "setIconBound", "iconBound", "Landroid/graphics/PointF;", "Landroid/graphics/PointF;", "()Landroid/graphics/PointF;", "setProgressLineStart", "(Landroid/graphics/PointF;)V", "progressLineStart", "setProgressLineEnd", "progressLineEnd", "core_release"}, k = 1, mv = {2, 2, 0}, xi = 48)
    private static final /* data */ class Step {

        /* JADX INFO: renamed from: a, reason: from kotlin metadata and from toString */
        private final java.lang.String order;

        /* JADX INFO: renamed from: b, reason: from kotlin metadata and from toString */
        private final java.lang.String title;

        /* JADX INFO: renamed from: c, reason: from kotlin metadata */
        private android.graphics.Rect titleBound;

        /* JADX INFO: renamed from: d, reason: from kotlin metadata */
        private float titleX;

        /* JADX INFO: renamed from: e, reason: from kotlin metadata */
        private float titleY;

        /* JADX INFO: renamed from: f, reason: from kotlin metadata */
        private android.graphics.RectF orderBound;

        /* JADX INFO: renamed from: g, reason: from kotlin metadata */
        private float orderTextX;

        /* JADX INFO: renamed from: h, reason: from kotlin metadata */
        private float orderTextY;

        /* JADX INFO: renamed from: i, reason: from kotlin metadata */
        private android.graphics.Rect iconBound;

        /* JADX INFO: renamed from: j, reason: from kotlin metadata */
        private android.graphics.PointF progressLineStart;

        /* JADX INFO: renamed from: k, reason: from kotlin metadata */
        private android.graphics.PointF progressLineEnd;

        public Step(java.lang.String str, java.lang.String str2) {
            kotlin.jvm.internal.Intrinsics.l(str, "order");
            kotlin.jvm.internal.Intrinsics.l(str2, "title");
            this.order = str;
            this.title = str2;
            this.titleBound = new android.graphics.Rect();
            this.orderBound = new android.graphics.RectF();
            this.iconBound = new android.graphics.Rect();
            this.progressLineStart = new android.graphics.PointF();
            this.progressLineEnd = new android.graphics.PointF();
        }

        /* JADX INFO: renamed from: a, reason: from getter */
        public final android.graphics.Rect getIconBound() {
            return this.iconBound;
        }

        /* JADX INFO: renamed from: b, reason: from getter */
        public final java.lang.String getOrder() {
            return this.order;
        }

        /* JADX INFO: renamed from: c, reason: from getter */
        public final android.graphics.RectF getOrderBound() {
            return this.orderBound;
        }

        /* JADX INFO: renamed from: d, reason: from getter */
        public final float getOrderTextX() {
            return this.orderTextX;
        }

        /* JADX INFO: renamed from: e, reason: from getter */
        public final float getOrderTextY() {
            return this.orderTextY;
        }

        public boolean equals(java.lang.Object other) {
            if (this == other) {
                return true;
            }
            if (!(other instanceof com.vinfast.companion.core.base.ui.widget.BookingStepView.Step)) {
                return false;
            }
            com.vinfast.companion.core.base.ui.widget.BookingStepView.Step step = (com.vinfast.companion.core.base.ui.widget.BookingStepView.Step) other;
            return kotlin.jvm.internal.Intrinsics.g(this.order, step.order) && kotlin.jvm.internal.Intrinsics.g(this.title, step.title);
        }

        /* JADX INFO: renamed from: f, reason: from getter */
        public final android.graphics.PointF getProgressLineEnd() {
            return this.progressLineEnd;
        }

        /* JADX INFO: renamed from: g, reason: from getter */
        public final android.graphics.PointF getProgressLineStart() {
            return this.progressLineStart;
        }

        /* JADX INFO: renamed from: h, reason: from getter */
        public final java.lang.String getTitle() {
            return this.title;
        }

        public int hashCode() {
            return (this.order.hashCode() * 31) + this.title.hashCode();
        }

        /* JADX INFO: renamed from: i, reason: from getter */
        public final android.graphics.Rect getTitleBound() {
            return this.titleBound;
        }

        /* JADX INFO: renamed from: j, reason: from getter */
        public final float getTitleX() {
            return this.titleX;
        }

        /* JADX INFO: renamed from: k, reason: from getter */
        public final float getTitleY() {
            return this.titleY;
        }

        public final void l(float f) {
            this.orderTextX = f;
        }

        public final void m(float f) {
            this.orderTextY = f;
        }

        public final void n(float f) {
            this.titleX = f;
        }

        public final void o(float f) {
            this.titleY = f;
        }

        public java.lang.String toString() {
            return "Step(order=" + this.order + ", title=" + this.title + ")";
        }
    }

    /* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
    public BookingStepView(@org.jetbrains.annotations.NotNull android.content.Context context) {
        this(context, null);
        kotlin.jvm.internal.Intrinsics.l(context, "context");
    }

    private final void a() {
        java.util.ArrayList arrayList = this.mSteps;
        if (arrayList == null) {
            kotlin.jvm.internal.Intrinsics.C("mSteps");
            arrayList = null;
        }
        arrayList.clear();
        int i = this.stepCount;
        for (int i2 = 0; i2 < i; i2++) {
            com.vinfast.companion.core.base.ui.widget.BookingStepView.Step step = new com.vinfast.companion.core.base.ui.widget.BookingStepView.Step((java.lang.String) this.stepOrder.get(i2), (java.lang.String) this.stepTitle.get(i2));
            java.util.ArrayList arrayList2 = this.mSteps;
            if (arrayList2 == null) {
                kotlin.jvm.internal.Intrinsics.C("mSteps");
                arrayList2 = null;
            }
            arrayList2.add(step);
        }
    }

    private final void b() {
        android.text.TextPaint textPaint = this.mStepTitleTextPaint;
        if (textPaint == null) {
            kotlin.jvm.internal.Intrinsics.C("mStepTitleTextPaint");
            textPaint = null;
        }
        textPaint.setTextSize(java.lang.Math.max(this.currentStepTitleTextSize, this.otherStepTitleTextSize));
        android.graphics.Rect rect = new android.graphics.Rect();
        java.util.ArrayList<com.vinfast.companion.core.base.ui.widget.BookingStepView.Step> arrayList = this.mSteps;
        if (arrayList == null) {
            kotlin.jvm.internal.Intrinsics.C("mSteps");
            arrayList = null;
        }
        for (com.vinfast.companion.core.base.ui.widget.BookingStepView.Step step : arrayList) {
            android.text.TextPaint textPaint2 = this.mStepTitleTextPaint;
            if (textPaint2 == null) {
                kotlin.jvm.internal.Intrinsics.C("mStepTitleTextPaint");
                textPaint2 = null;
            }
            textPaint2.getTextBounds(step.getTitle(), 0, step.getTitle().length(), rect);
            if (rect.height() > this.mMaxHeightTitle) {
                this.mMaxHeightTitle = rect.height();
            }
        }
    }

    private final void c(android.graphics.Canvas canvas) {
        java.util.ArrayList arrayList = this.mSteps;
        if (arrayList == null) {
            kotlin.jvm.internal.Intrinsics.C("mSteps");
            arrayList = null;
        }
        int i = 0;
        for (java.lang.Object obj : arrayList) {
            int i2 = i + 1;
            if (i < 0) {
                kotlin.collections.CollectionsKt.y();
            }
            com.vinfast.companion.core.base.ui.widget.BookingStepView.Step step = (com.vinfast.companion.core.base.ui.widget.BookingStepView.Step) obj;
            int i3 = this.mCurrentStep;
            boolean z = i < i3;
            boolean z2 = i == i3;
            if (z) {
                android.graphics.drawable.Drawable drawable = this.completeIcon;
                if (drawable != null) {
                    drawable.setBounds(step.getIconBound());
                }
                android.graphics.drawable.Drawable drawable2 = this.completeIcon;
                if (drawable2 != null) {
                    drawable2.draw(canvas);
                }
            } else if (z2) {
                android.graphics.Paint paint = this.mStepOrderPaint;
                if (paint == null) {
                    kotlin.jvm.internal.Intrinsics.C("mStepOrderPaint");
                    paint = null;
                }
                paint.setColor(this.currentStepOrderBackgroundColor);
                android.graphics.RectF orderBound = step.getOrderBound();
                android.graphics.Paint paint2 = this.mStepOrderPaint;
                if (paint2 == null) {
                    kotlin.jvm.internal.Intrinsics.C("mStepOrderPaint");
                    paint2 = null;
                }
                canvas.drawOval(orderBound, paint2);
                android.text.TextPaint textPaint = this.mStepOrderTextPaint;
                if (textPaint == null) {
                    kotlin.jvm.internal.Intrinsics.C("mStepOrderTextPaint");
                    textPaint = null;
                }
                textPaint.setColor(this.currentStepOrderTextColor);
                android.text.TextPaint textPaint2 = this.mStepOrderTextPaint;
                if (textPaint2 == null) {
                    kotlin.jvm.internal.Intrinsics.C("mStepOrderTextPaint");
                    textPaint2 = null;
                }
                textPaint2.setTextSize(this.currentStepOrderTextSize);
                android.text.TextPaint textPaint3 = this.mStepOrderTextPaint;
                if (textPaint3 == null) {
                    kotlin.jvm.internal.Intrinsics.C("mStepOrderTextPaint");
                    textPaint3 = null;
                }
                textPaint3.setTypeface(this.currentStepOrderTypeface);
                java.lang.String order = step.getOrder();
                float orderTextX = step.getOrderTextX();
                float orderTextY = step.getOrderTextY();
                android.text.TextPaint textPaint4 = this.mStepOrderTextPaint;
                if (textPaint4 == null) {
                    kotlin.jvm.internal.Intrinsics.C("mStepOrderTextPaint");
                    textPaint4 = null;
                }
                canvas.drawText(order, orderTextX, orderTextY, textPaint4);
            } else {
                android.graphics.Paint paint3 = this.mStepOrderPaint;
                if (paint3 == null) {
                    kotlin.jvm.internal.Intrinsics.C("mStepOrderPaint");
                    paint3 = null;
                }
                paint3.setColor(this.otherStepOrderBackgroundColor);
                android.graphics.RectF orderBound2 = step.getOrderBound();
                android.graphics.Paint paint4 = this.mStepOrderPaint;
                if (paint4 == null) {
                    kotlin.jvm.internal.Intrinsics.C("mStepOrderPaint");
                    paint4 = null;
                }
                canvas.drawOval(orderBound2, paint4);
                android.text.TextPaint textPaint5 = this.mStepOrderTextPaint;
                if (textPaint5 == null) {
                    kotlin.jvm.internal.Intrinsics.C("mStepOrderTextPaint");
                    textPaint5 = null;
                }
                textPaint5.setColor(this.otherStepOrderTextColor);
                android.text.TextPaint textPaint6 = this.mStepOrderTextPaint;
                if (textPaint6 == null) {
                    kotlin.jvm.internal.Intrinsics.C("mStepOrderTextPaint");
                    textPaint6 = null;
                }
                textPaint6.setTextSize(this.otherStepOrderTextSize);
                android.text.TextPaint textPaint7 = this.mStepOrderTextPaint;
                if (textPaint7 == null) {
                    kotlin.jvm.internal.Intrinsics.C("mStepOrderTextPaint");
                    textPaint7 = null;
                }
                textPaint7.setTypeface(this.otherStepOrderTypeface);
                java.lang.String order2 = step.getOrder();
                float orderTextX2 = step.getOrderTextX();
                float orderTextY2 = step.getOrderTextY();
                android.text.TextPaint textPaint8 = this.mStepOrderTextPaint;
                if (textPaint8 == null) {
                    kotlin.jvm.internal.Intrinsics.C("mStepOrderTextPaint");
                    textPaint8 = null;
                }
                canvas.drawText(order2, orderTextX2, orderTextY2, textPaint8);
            }
            i = i2;
        }
    }

    private final void d(android.graphics.Canvas canvas) {
        android.graphics.Paint paint;
        android.graphics.Paint paint2;
        java.util.ArrayList arrayList = this.mSteps;
        if (arrayList == null) {
            kotlin.jvm.internal.Intrinsics.C("mSteps");
            arrayList = null;
        }
        int i = 0;
        for (java.lang.Object obj : arrayList) {
            int i2 = i + 1;
            if (i < 0) {
                kotlin.collections.CollectionsKt.y();
            }
            com.vinfast.companion.core.base.ui.widget.BookingStepView.Step step = (com.vinfast.companion.core.base.ui.widget.BookingStepView.Step) obj;
            if (i > 0) {
                android.graphics.Paint paint3 = this.mProgressLinePaint;
                if (paint3 == null) {
                    kotlin.jvm.internal.Intrinsics.C("mProgressLinePaint");
                    paint3 = null;
                }
                paint3.setColor(this.progressLineIncompleteStepColor);
                float f = step.getProgressLineStart().x;
                float f2 = step.getProgressLineStart().y;
                float f3 = step.getProgressLineEnd().x;
                float f4 = step.getProgressLineEnd().y;
                android.graphics.Paint paint4 = this.mProgressLinePaint;
                if (paint4 == null) {
                    kotlin.jvm.internal.Intrinsics.C("mProgressLinePaint");
                    paint = null;
                } else {
                    paint = paint4;
                }
                canvas.drawLine(f, f2, f3, f4, paint);
                if (this.mCurrentStep >= i) {
                    android.graphics.Paint paint5 = this.mProgressLinePaint;
                    if (paint5 == null) {
                        kotlin.jvm.internal.Intrinsics.C("mProgressLinePaint");
                        paint5 = null;
                    }
                    paint5.setColor(this.progressLineCompleteStepColor);
                    float f5 = step.getProgressLineStart().x;
                    float f6 = step.getProgressLineStart().y;
                    float f7 = step.getProgressLineEnd().x;
                    float f8 = step.getProgressLineEnd().y;
                    android.graphics.Paint paint6 = this.mProgressLinePaint;
                    if (paint6 == null) {
                        kotlin.jvm.internal.Intrinsics.C("mProgressLinePaint");
                        paint2 = null;
                    } else {
                        paint2 = paint6;
                    }
                    canvas.drawLine(f5, f6, f7, f8, paint2);
                }
            }
            i = i2;
        }
    }

    private final void e(android.graphics.Canvas canvas) {
        java.util.ArrayList arrayList = this.mSteps;
        if (arrayList == null) {
            kotlin.jvm.internal.Intrinsics.C("mSteps");
            arrayList = null;
        }
        int i = 0;
        for (java.lang.Object obj : arrayList) {
            int i2 = i + 1;
            if (i < 0) {
                kotlin.collections.CollectionsKt.y();
            }
            com.vinfast.companion.core.base.ui.widget.BookingStepView.Step step = (com.vinfast.companion.core.base.ui.widget.BookingStepView.Step) obj;
            if (i == this.mCurrentStep) {
                android.text.TextPaint textPaint = this.mStepTitleTextPaint;
                if (textPaint == null) {
                    kotlin.jvm.internal.Intrinsics.C("mStepTitleTextPaint");
                    textPaint = null;
                }
                textPaint.setColor(this.currentStepTitleTextColor);
                android.text.TextPaint textPaint2 = this.mStepTitleTextPaint;
                if (textPaint2 == null) {
                    kotlin.jvm.internal.Intrinsics.C("mStepTitleTextPaint");
                    textPaint2 = null;
                }
                textPaint2.setTextSize(this.currentStepTitleTextSize);
                android.text.TextPaint textPaint3 = this.mStepTitleTextPaint;
                if (textPaint3 == null) {
                    kotlin.jvm.internal.Intrinsics.C("mStepTitleTextPaint");
                    textPaint3 = null;
                }
                textPaint3.setTypeface(this.currentStepTitleTypeface);
            } else {
                android.text.TextPaint textPaint4 = this.mStepTitleTextPaint;
                if (textPaint4 == null) {
                    kotlin.jvm.internal.Intrinsics.C("mStepTitleTextPaint");
                    textPaint4 = null;
                }
                textPaint4.setColor(this.otherStepTitleTextColor);
                android.text.TextPaint textPaint5 = this.mStepTitleTextPaint;
                if (textPaint5 == null) {
                    kotlin.jvm.internal.Intrinsics.C("mStepTitleTextPaint");
                    textPaint5 = null;
                }
                textPaint5.setTextSize(this.otherStepTitleTextSize);
                android.text.TextPaint textPaint6 = this.mStepTitleTextPaint;
                if (textPaint6 == null) {
                    kotlin.jvm.internal.Intrinsics.C("mStepTitleTextPaint");
                    textPaint6 = null;
                }
                textPaint6.setTypeface(this.otherStepTitleTypeface);
            }
            if (canvas != null) {
                java.lang.String title = step.getTitle();
                float titleX = step.getTitleX();
                float titleY = step.getTitleY();
                android.text.TextPaint textPaint7 = this.mStepTitleTextPaint;
                if (textPaint7 == null) {
                    kotlin.jvm.internal.Intrinsics.C("mStepTitleTextPaint");
                    textPaint7 = null;
                }
                canvas.drawText(title, titleX, titleY, textPaint7);
            }
            i = i2;
        }
    }

    private final void f() {
        android.graphics.Paint paint = new android.graphics.Paint(1);
        paint.setStyle(android.graphics.Paint.Style.FILL);
        this.mStepOrderPaint = paint;
        this.mStepOrderTextPaint = new android.text.TextPaint(1);
        this.mStepTitleTextPaint = new android.text.TextPaint(1);
        android.graphics.Paint paint2 = new android.graphics.Paint(1);
        paint2.setStyle(android.graphics.Paint.Style.STROKE);
        paint2.setStrokeWidth(this.progressLineWidth);
        this.mProgressLinePaint = paint2;
        this.mSteps = new java.util.ArrayList();
        a();
        b();
    }

    private final void g() {
        i();
        h();
    }

    private final void h() {
        java.util.ArrayList arrayList = this.mSteps;
        if (arrayList == null) {
            kotlin.jvm.internal.Intrinsics.C("mSteps");
            arrayList = null;
        }
        if (arrayList.isEmpty()) {
            return;
        }
        int i = this.stepCount;
        for (int i2 = 1; i2 < i; i2++) {
            java.util.ArrayList arrayList2 = this.mSteps;
            if (arrayList2 == null) {
                kotlin.jvm.internal.Intrinsics.C("mSteps");
                arrayList2 = null;
            }
            com.vinfast.companion.core.base.ui.widget.BookingStepView.Step step = (com.vinfast.companion.core.base.ui.widget.BookingStepView.Step) arrayList2.get(i2);
            android.graphics.PointF progressLineStart = step.getProgressLineStart();
            java.util.ArrayList arrayList3 = this.mSteps;
            if (arrayList3 == null) {
                kotlin.jvm.internal.Intrinsics.C("mSteps");
                arrayList3 = null;
            }
            int i3 = i2 - 1;
            progressLineStart.x = ((com.vinfast.companion.core.base.ui.widget.BookingStepView.Step) arrayList3.get(i3)).getOrderBound().right;
            android.graphics.PointF progressLineStart2 = step.getProgressLineStart();
            java.util.ArrayList arrayList4 = this.mSteps;
            if (arrayList4 == null) {
                kotlin.jvm.internal.Intrinsics.C("mSteps");
                arrayList4 = null;
            }
            float f = 2;
            progressLineStart2.y = ((com.vinfast.companion.core.base.ui.widget.BookingStepView.Step) arrayList4.get(i3)).getOrderBound().top + (this.stepOrderSize / f);
            android.graphics.PointF progressLineEnd = step.getProgressLineEnd();
            java.util.ArrayList arrayList5 = this.mSteps;
            if (arrayList5 == null) {
                kotlin.jvm.internal.Intrinsics.C("mSteps");
                arrayList5 = null;
            }
            progressLineEnd.x = ((com.vinfast.companion.core.base.ui.widget.BookingStepView.Step) arrayList5.get(i2)).getOrderBound().left;
            android.graphics.PointF progressLineEnd2 = step.getProgressLineEnd();
            java.util.ArrayList arrayList6 = this.mSteps;
            if (arrayList6 == null) {
                kotlin.jvm.internal.Intrinsics.C("mSteps");
                arrayList6 = null;
            }
            progressLineEnd2.y = ((com.vinfast.companion.core.base.ui.widget.BookingStepView.Step) arrayList6.get(i2)).getOrderBound().top + (this.stepOrderSize / f);
        }
    }

    private final void i() {
        java.util.ArrayList arrayList;
        java.util.ArrayList arrayList2 = this.mSteps;
        if (arrayList2 == null) {
            kotlin.jvm.internal.Intrinsics.C("mSteps");
            arrayList2 = null;
        }
        if (arrayList2.isEmpty()) {
            return;
        }
        java.util.ArrayList arrayList3 = this.mSteps;
        if (arrayList3 == null) {
            kotlin.jvm.internal.Intrinsics.C("mSteps");
            arrayList3 = null;
        }
        com.vinfast.companion.core.base.ui.widget.BookingStepView.Step step = (com.vinfast.companion.core.base.ui.widget.BookingStepView.Step) kotlin.collections.CollectionsKt.q0(arrayList3);
        boolean z = true;
        boolean z2 = this.mCurrentStep == 0;
        android.text.TextPaint textPaint = this.mStepTitleTextPaint;
        if (textPaint == null) {
            kotlin.jvm.internal.Intrinsics.C("mStepTitleTextPaint");
            textPaint = null;
        }
        textPaint.setTextSize(z2 ? this.currentStepTitleTextSize : this.otherStepTitleTextSize);
        android.text.TextPaint textPaint2 = this.mStepTitleTextPaint;
        if (textPaint2 == null) {
            kotlin.jvm.internal.Intrinsics.C("mStepTitleTextPaint");
            textPaint2 = null;
        }
        textPaint2.getTextBounds(step.getTitle(), 0, step.getTitle().length(), step.getTitleBound());
        step.n(getPaddingStart());
        float f = 2;
        step.getOrderBound().left = getPaddingStart() + ((step.getTitleBound().width() - this.stepOrderSize) / f);
        step.getOrderBound().top = getPaddingTop();
        step.getOrderBound().right = step.getOrderBound().left + this.stepOrderSize;
        step.getOrderBound().bottom = step.getOrderBound().top + this.stepOrderSize;
        step.getIconBound().left = kotlin.math.MathKt.d(step.getOrderBound().left);
        step.getIconBound().top = kotlin.math.MathKt.d(step.getOrderBound().top);
        step.getIconBound().right = kotlin.math.MathKt.d(step.getOrderBound().right);
        step.getIconBound().bottom = kotlin.math.MathKt.d(step.getOrderBound().bottom);
        android.text.TextPaint textPaint3 = this.mStepOrderTextPaint;
        if (textPaint3 == null) {
            kotlin.jvm.internal.Intrinsics.C("mStepOrderTextPaint");
            textPaint3 = null;
        }
        textPaint3.setTextSize(z2 ? this.currentStepOrderTextSize : this.otherStepOrderTextSize);
        android.text.TextPaint textPaint4 = this.mStepOrderTextPaint;
        if (textPaint4 == null) {
            kotlin.jvm.internal.Intrinsics.C("mStepOrderTextPaint");
            textPaint4 = null;
        }
        step.l(step.getOrderBound().left + ((this.stepOrderSize - textPaint4.measureText(step.getOrder())) / f));
        float f2 = step.getOrderBound().top;
        float fHeight = step.getOrderBound().height() / f;
        android.text.TextPaint textPaint5 = this.mStepOrderTextPaint;
        if (textPaint5 == null) {
            kotlin.jvm.internal.Intrinsics.C("mStepOrderTextPaint");
            textPaint5 = null;
        }
        float fDescent = textPaint5.descent();
        android.text.TextPaint textPaint6 = this.mStepOrderTextPaint;
        if (textPaint6 == null) {
            kotlin.jvm.internal.Intrinsics.C("mStepOrderTextPaint");
            textPaint6 = null;
        }
        step.m(f2 + (fHeight - ((fDescent + textPaint6.ascent()) / f)));
        java.util.ArrayList arrayList4 = this.mSteps;
        if (arrayList4 == null) {
            kotlin.jvm.internal.Intrinsics.C("mSteps");
            arrayList4 = null;
        }
        com.vinfast.companion.core.base.ui.widget.BookingStepView.Step step2 = (com.vinfast.companion.core.base.ui.widget.BookingStepView.Step) kotlin.collections.CollectionsKt.C0(arrayList4);
        boolean z3 = this.stepCount - 1 == this.mCurrentStep;
        android.text.TextPaint textPaint7 = this.mStepTitleTextPaint;
        if (textPaint7 == null) {
            kotlin.jvm.internal.Intrinsics.C("mStepTitleTextPaint");
            textPaint7 = null;
        }
        textPaint7.setTextSize(z3 ? this.currentStepTitleTextSize : this.otherStepTitleTextSize);
        android.text.TextPaint textPaint8 = this.mStepTitleTextPaint;
        if (textPaint8 == null) {
            kotlin.jvm.internal.Intrinsics.C("mStepTitleTextPaint");
            textPaint8 = null;
        }
        textPaint8.getTextBounds(step2.getTitle(), 0, step2.getTitle().length(), step2.getTitleBound());
        step2.n((getWidth() - getPaddingEnd()) - step2.getTitleBound().width());
        android.graphics.RectF orderBound = step2.getOrderBound();
        float width = getWidth() - getPaddingEnd();
        float fWidth = step2.getTitleBound().width();
        float f3 = this.stepOrderSize;
        orderBound.left = (width - ((fWidth - f3) / f)) - f3;
        step2.getOrderBound().top = getPaddingTop();
        step2.getOrderBound().right = step2.getOrderBound().left + this.stepOrderSize;
        step2.getOrderBound().bottom = step2.getOrderBound().top + this.stepOrderSize;
        step2.getIconBound().left = kotlin.math.MathKt.d(step2.getOrderBound().left);
        step2.getIconBound().top = kotlin.math.MathKt.d(step2.getOrderBound().top);
        step2.getIconBound().right = kotlin.math.MathKt.d(step2.getOrderBound().right);
        step2.getIconBound().bottom = kotlin.math.MathKt.d(step2.getOrderBound().bottom);
        android.text.TextPaint textPaint9 = this.mStepOrderTextPaint;
        if (textPaint9 == null) {
            kotlin.jvm.internal.Intrinsics.C("mStepOrderTextPaint");
            textPaint9 = null;
        }
        textPaint9.setTextSize(z3 ? this.currentStepOrderTextSize : this.otherStepOrderTextSize);
        android.text.TextPaint textPaint10 = this.mStepOrderTextPaint;
        if (textPaint10 == null) {
            kotlin.jvm.internal.Intrinsics.C("mStepOrderTextPaint");
            textPaint10 = null;
        }
        step2.l(step2.getOrderBound().left + ((this.stepOrderSize - textPaint10.measureText(step2.getOrder())) / f));
        float f4 = step2.getOrderBound().top;
        float fHeight2 = step2.getOrderBound().height() / f;
        android.text.TextPaint textPaint11 = this.mStepOrderTextPaint;
        if (textPaint11 == null) {
            kotlin.jvm.internal.Intrinsics.C("mStepOrderTextPaint");
            textPaint11 = null;
        }
        float fDescent2 = textPaint11.descent();
        android.text.TextPaint textPaint12 = this.mStepOrderTextPaint;
        if (textPaint12 == null) {
            kotlin.jvm.internal.Intrinsics.C("mStepOrderTextPaint");
            textPaint12 = null;
        }
        step2.m(f4 + (fHeight2 - ((fDescent2 + textPaint12.ascent()) / f)));
        java.util.ArrayList arrayList5 = this.mSteps;
        if (arrayList5 == null) {
            kotlin.jvm.internal.Intrinsics.C("mSteps");
            arrayList5 = null;
        }
        float f5 = ((com.vinfast.companion.core.base.ui.widget.BookingStepView.Step) kotlin.collections.CollectionsKt.q0(arrayList5)).getOrderBound().left;
        float width2 = getWidth();
        java.util.ArrayList arrayList6 = this.mSteps;
        if (arrayList6 == null) {
            kotlin.jvm.internal.Intrinsics.C("mSteps");
            arrayList6 = null;
        }
        float width3 = (getWidth() - f5) - (width2 - ((com.vinfast.companion.core.base.ui.widget.BookingStepView.Step) kotlin.collections.CollectionsKt.C0(arrayList6)).getOrderBound().right);
        float f6 = this.stepOrderSize;
        int i = this.stepCount;
        float f7 = ((width3 - (f * f6)) - ((i - 2) * f6)) / (i - 1);
        int i2 = i - 1;
        int i3 = 1;
        while (i3 < i2) {
            java.util.ArrayList arrayList7 = this.mSteps;
            if (arrayList7 == null) {
                kotlin.jvm.internal.Intrinsics.C("mSteps");
                arrayList7 = null;
            }
            com.vinfast.companion.core.base.ui.widget.BookingStepView.Step step3 = (com.vinfast.companion.core.base.ui.widget.BookingStepView.Step) arrayList7.get(i3);
            android.graphics.RectF orderBound2 = step3.getOrderBound();
            java.util.ArrayList arrayList8 = this.mSteps;
            if (arrayList8 == null) {
                kotlin.jvm.internal.Intrinsics.C("mSteps");
                arrayList8 = null;
            }
            float f8 = i3;
            orderBound2.left = ((com.vinfast.companion.core.base.ui.widget.BookingStepView.Step) kotlin.collections.CollectionsKt.q0(arrayList8)).getOrderBound().left + (this.stepOrderSize * f8) + (f8 * f7);
            step3.getOrderBound().top = getPaddingTop();
            step3.getOrderBound().right = step3.getOrderBound().left + this.stepOrderSize;
            step3.getOrderBound().bottom = step3.getOrderBound().top + this.stepOrderSize;
            step3.getIconBound().left = kotlin.math.MathKt.d(step3.getOrderBound().left);
            step3.getIconBound().top = kotlin.math.MathKt.d(step3.getOrderBound().top);
            step3.getIconBound().right = kotlin.math.MathKt.d(step3.getOrderBound().right);
            step3.getIconBound().bottom = kotlin.math.MathKt.d(step3.getOrderBound().bottom);
            boolean z4 = i3 == this.mCurrentStep ? z : false;
            android.text.TextPaint textPaint13 = this.mStepTitleTextPaint;
            if (textPaint13 == null) {
                kotlin.jvm.internal.Intrinsics.C("mStepTitleTextPaint");
                textPaint13 = null;
            }
            textPaint13.setTextSize(z4 ? this.currentStepTitleTextSize : this.otherStepTitleTextSize);
            android.text.TextPaint textPaint14 = this.mStepTitleTextPaint;
            if (textPaint14 == null) {
                kotlin.jvm.internal.Intrinsics.C("mStepTitleTextPaint");
                textPaint14 = null;
            }
            textPaint14.getTextBounds(step3.getTitle(), 0, step3.getTitle().length(), step3.getTitleBound());
            step3.n((step3.getOrderBound().left + (this.stepOrderSize / f)) - (step3.getTitleBound().width() / 2));
            android.text.TextPaint textPaint15 = this.mStepOrderTextPaint;
            if (textPaint15 == null) {
                kotlin.jvm.internal.Intrinsics.C("mStepOrderTextPaint");
                textPaint15 = null;
            }
            textPaint15.setTextSize(z4 ? this.currentStepOrderTextSize : this.otherStepOrderTextSize);
            android.text.TextPaint textPaint16 = this.mStepOrderTextPaint;
            if (textPaint16 == null) {
                kotlin.jvm.internal.Intrinsics.C("mStepOrderTextPaint");
                textPaint16 = null;
            }
            step3.l(step3.getOrderBound().left + ((this.stepOrderSize - textPaint16.measureText(step3.getOrder())) / f));
            float f9 = step3.getOrderBound().top;
            float fHeight3 = step3.getOrderBound().height() / f;
            android.text.TextPaint textPaint17 = this.mStepOrderTextPaint;
            if (textPaint17 == null) {
                kotlin.jvm.internal.Intrinsics.C("mStepOrderTextPaint");
                textPaint17 = null;
            }
            float fDescent3 = textPaint17.descent();
            android.text.TextPaint textPaint18 = this.mStepOrderTextPaint;
            if (textPaint18 == null) {
                kotlin.jvm.internal.Intrinsics.C("mStepOrderTextPaint");
                textPaint18 = null;
            }
            step3.m(f9 + (fHeight3 - ((fDescent3 + textPaint18.ascent()) / f)));
            i3++;
            z = true;
        }
        java.util.ArrayList arrayList9 = this.mSteps;
        if (arrayList9 == null) {
            kotlin.jvm.internal.Intrinsics.C("mSteps");
            arrayList9 = null;
        }
        java.util.Iterator it = arrayList9.iterator();
        if (!it.hasNext()) {
            throw new java.util.NoSuchElementException();
        }
        int i4 = ((com.vinfast.companion.core.base.ui.widget.BookingStepView.Step) it.next()).getTitleBound().bottom;
        while (it.hasNext()) {
            int i5 = ((com.vinfast.companion.core.base.ui.widget.BookingStepView.Step) it.next()).getTitleBound().bottom;
            if (i4 < i5) {
                i4 = i5;
            }
        }
        float height = (getHeight() - getPaddingBottom()) - java.lang.Math.abs(i4);
        java.util.ArrayList arrayList10 = this.mSteps;
        if (arrayList10 == null) {
            kotlin.jvm.internal.Intrinsics.C("mSteps");
            arrayList = null;
        } else {
            arrayList = arrayList10;
        }
        java.util.Iterator it2 = arrayList.iterator();
        while (it2.hasNext()) {
            ((com.vinfast.companion.core.base.ui.widget.BookingStepView.Step) it2.next()).o(height);
        }
    }

    private final void j(android.content.Context context, android.util.AttributeSet attrs, int defStyleAttr, int defStyleRes) {
        android.content.res.TypedArray typedArrayObtainStyledAttributes = context.obtainStyledAttributes(attrs, com.vinfast.companion.core.R.styleable.BookingStepView, defStyleAttr, defStyleRes);
        kotlin.jvm.internal.Intrinsics.k(typedArrayObtainStyledAttributes, "obtainStyledAttributes(...)");
        this.stepCount = typedArrayObtainStyledAttributes.getInteger(com.vinfast.companion.core.R.styleable.BookingStepView_BSV_stepCount, this.stepCount);
        java.lang.CharSequence[] textArray = typedArrayObtainStyledAttributes.getTextArray(com.vinfast.companion.core.R.styleable.BookingStepView_BSV_stepOrder);
        kotlin.jvm.internal.Intrinsics.k(textArray, "getTextArray(...)");
        java.util.ArrayList arrayList = new java.util.ArrayList(textArray.length);
        for (java.lang.CharSequence charSequence : textArray) {
            arrayList.add(charSequence.toString());
        }
        this.stepOrder = arrayList;
        this.stepOrderSize = typedArrayObtainStyledAttributes.getDimension(com.vinfast.companion.core.R.styleable.BookingStepView_BSV_stepOrderSize, this.stepOrderSize);
        this.currentStepOrderBackgroundColor = typedArrayObtainStyledAttributes.getColor(com.vinfast.companion.core.R.styleable.BookingStepView_BSV_currentStepOrderBackgroundColor, this.currentStepOrderBackgroundColor);
        this.currentStepOrderTextColor = typedArrayObtainStyledAttributes.getColor(com.vinfast.companion.core.R.styleable.BookingStepView_BSV_currentStepOrderTextColor, this.currentStepOrderTextColor);
        this.currentStepOrderTextSize = typedArrayObtainStyledAttributes.getDimension(com.vinfast.companion.core.R.styleable.BookingStepView_BSV_currentStepOrderTextSize, this.currentStepOrderTextSize);
        int resourceId = typedArrayObtainStyledAttributes.getResourceId(com.vinfast.companion.core.R.styleable.BookingStepView_BSV_currentStepOrderTypeface, 0);
        if (resourceId > 0) {
            this.currentStepOrderTypeface = androidx.core.content.res.ResourcesCompat.h(getContext(), resourceId);
        }
        this.otherStepOrderBackgroundColor = typedArrayObtainStyledAttributes.getColor(com.vinfast.companion.core.R.styleable.BookingStepView_BSV_otherStepOrderBackgroundColor, this.otherStepOrderBackgroundColor);
        this.otherStepOrderTextColor = typedArrayObtainStyledAttributes.getColor(com.vinfast.companion.core.R.styleable.BookingStepView_BSV_otherStepOrderTextColor, this.otherStepOrderTextColor);
        this.otherStepOrderTextSize = typedArrayObtainStyledAttributes.getDimension(com.vinfast.companion.core.R.styleable.BookingStepView_BSV_otherStepOrderTextSize, this.otherStepOrderTextSize);
        int resourceId2 = typedArrayObtainStyledAttributes.getResourceId(com.vinfast.companion.core.R.styleable.BookingStepView_BSV_otherStepOrderTypeface, 0);
        if (resourceId2 > 0) {
            this.otherStepOrderTypeface = androidx.core.content.res.ResourcesCompat.h(getContext(), resourceId2);
        }
        java.lang.CharSequence[] textArray2 = typedArrayObtainStyledAttributes.getTextArray(com.vinfast.companion.core.R.styleable.BookingStepView_BSV_stepTitle);
        kotlin.jvm.internal.Intrinsics.k(textArray2, "getTextArray(...)");
        java.util.ArrayList arrayList2 = new java.util.ArrayList(textArray2.length);
        for (java.lang.CharSequence charSequence2 : textArray2) {
            arrayList2.add(charSequence2.toString());
        }
        this.stepTitle = arrayList2;
        this.stepTitlePadding = typedArrayObtainStyledAttributes.getDimensionPixelSize(com.vinfast.companion.core.R.styleable.BookingStepView_BSV_stepTitlePadding, this.stepTitlePadding);
        this.currentStepTitleTextColor = typedArrayObtainStyledAttributes.getColor(com.vinfast.companion.core.R.styleable.BookingStepView_BSV_currentStepTitleTextColor, this.currentStepTitleTextColor);
        this.currentStepTitleTextSize = typedArrayObtainStyledAttributes.getDimension(com.vinfast.companion.core.R.styleable.BookingStepView_BSV_currentStepTitleTextSize, this.currentStepTitleTextSize);
        int resourceId3 = typedArrayObtainStyledAttributes.getResourceId(com.vinfast.companion.core.R.styleable.BookingStepView_BSV_currentStepTitleTypeface, 0);
        if (resourceId3 > 0) {
            this.currentStepTitleTypeface = androidx.core.content.res.ResourcesCompat.h(getContext(), resourceId3);
        }
        this.otherStepTitleTextColor = typedArrayObtainStyledAttributes.getColor(com.vinfast.companion.core.R.styleable.BookingStepView_BSV_otherStepTitleTextColor, this.otherStepTitleTextColor);
        this.otherStepTitleTextSize = typedArrayObtainStyledAttributes.getDimension(com.vinfast.companion.core.R.styleable.BookingStepView_BSV_otherStepTitleTextSize, this.otherStepTitleTextSize);
        int resourceId4 = typedArrayObtainStyledAttributes.getResourceId(com.vinfast.companion.core.R.styleable.BookingStepView_BSV_otherStepTitleTypeface, 0);
        if (resourceId4 > 0) {
            this.otherStepTitleTypeface = androidx.core.content.res.ResourcesCompat.h(getContext(), resourceId4);
        }
        this.progressLineCompleteStepColor = typedArrayObtainStyledAttributes.getColor(com.vinfast.companion.core.R.styleable.BookingStepView_BSV_progressLineCompleteStepColor, this.progressLineCompleteStepColor);
        this.progressLineIncompleteStepColor = typedArrayObtainStyledAttributes.getColor(com.vinfast.companion.core.R.styleable.BookingStepView_BSV_progressLineIncompleteStepColor, this.progressLineIncompleteStepColor);
        this.progressLineWidth = typedArrayObtainStyledAttributes.getDimension(com.vinfast.companion.core.R.styleable.BookingStepView_BSV_progressLineWidth, this.progressLineWidth);
        this.completeIcon = typedArrayObtainStyledAttributes.getDrawable(com.vinfast.companion.core.R.styleable.BookingStepView_BSV_completeIcon);
        typedArrayObtainStyledAttributes.recycle();
    }

    @org.jetbrains.annotations.Nullable
    public final android.graphics.drawable.Drawable getCompleteIcon() {
        return this.completeIcon;
    }

    /* JADX INFO: renamed from: getCurrentStep, reason: from getter */
    public final int getMCurrentStep() {
        return this.mCurrentStep;
    }

    public final int getCurrentStepOrderBackgroundColor() {
        return this.currentStepOrderBackgroundColor;
    }

    public final int getCurrentStepOrderTextColor() {
        return this.currentStepOrderTextColor;
    }

    public final float getCurrentStepOrderTextSize() {
        return this.currentStepOrderTextSize;
    }

    @org.jetbrains.annotations.Nullable
    public final android.graphics.Typeface getCurrentStepOrderTypeface() {
        return this.currentStepOrderTypeface;
    }

    public final int getCurrentStepTitleTextColor() {
        return this.currentStepTitleTextColor;
    }

    public final float getCurrentStepTitleTextSize() {
        return this.currentStepTitleTextSize;
    }

    @org.jetbrains.annotations.Nullable
    public final android.graphics.Typeface getCurrentStepTitleTypeface() {
        return this.currentStepTitleTypeface;
    }

    public final int getOtherStepOrderBackgroundColor() {
        return this.otherStepOrderBackgroundColor;
    }

    public final int getOtherStepOrderTextColor() {
        return this.otherStepOrderTextColor;
    }

    public final float getOtherStepOrderTextSize() {
        return this.otherStepOrderTextSize;
    }

    @org.jetbrains.annotations.Nullable
    public final android.graphics.Typeface getOtherStepOrderTypeface() {
        return this.otherStepOrderTypeface;
    }

    public final int getOtherStepTitleTextColor() {
        return this.otherStepTitleTextColor;
    }

    public final float getOtherStepTitleTextSize() {
        return this.otherStepTitleTextSize;
    }

    @org.jetbrains.annotations.Nullable
    public final android.graphics.Typeface getOtherStepTitleTypeface() {
        return this.otherStepTitleTypeface;
    }

    public final int getProgressLineCompleteStepColor() {
        return this.progressLineCompleteStepColor;
    }

    public final int getProgressLineIncompleteStepColor() {
        return this.progressLineIncompleteStepColor;
    }

    public final float getProgressLineWidth() {
        return this.progressLineWidth;
    }

    public final int getStepCount() {
        return this.stepCount;
    }

    @org.jetbrains.annotations.NotNull
    public final java.util.List<java.lang.String> getStepOrder() {
        return this.stepOrder;
    }

    public final float getStepOrderSize() {
        return this.stepOrderSize;
    }

    @org.jetbrains.annotations.NotNull
    public final java.util.List<java.lang.String> getStepTitle() {
        return this.stepTitle;
    }

    public final int getStepTitlePadding() {
        return this.stepTitlePadding;
    }

    @Override // android.view.View
    protected void onDraw(android.graphics.Canvas canvas) {
        kotlin.jvm.internal.Intrinsics.l(canvas, "canvas");
        super.onDraw(canvas);
        d(canvas);
        c(canvas);
        e(canvas);
    }

    @Override // android.view.View
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        setMeasuredDimension(android.view.View.resolveSize(java.lang.Math.round(getPaddingStart() + getPaddingEnd() + (this.stepOrderSize * this.stepCount)), widthMeasureSpec), android.view.View.resolveSize(java.lang.Math.round(getPaddingTop() + getPaddingBottom() + this.stepOrderSize + this.stepTitlePadding + this.mMaxHeightTitle), heightMeasureSpec));
    }

    @Override // android.view.View
    protected void onSizeChanged(int w, int h, int oldw, int oldh) {
        super.onSizeChanged(w, h, oldw, oldh);
        if (w <= 0 || h <= 0) {
            return;
        }
        g();
    }

    public final void setCompleteIcon(@org.jetbrains.annotations.Nullable android.graphics.drawable.Drawable drawable) {
        this.completeIcon = drawable;
    }

    public final void setCurrentStep(int step) {
        this.mCurrentStep = step;
        invalidate();
    }

    public final void setCurrentStepOrderBackgroundColor(int i) {
        this.currentStepOrderBackgroundColor = i;
    }

    public final void setCurrentStepOrderTextColor(int i) {
        this.currentStepOrderTextColor = i;
    }

    public final void setCurrentStepOrderTextSize(float f) {
        this.currentStepOrderTextSize = f;
    }

    public final void setCurrentStepOrderTypeface(@org.jetbrains.annotations.Nullable android.graphics.Typeface typeface) {
        this.currentStepOrderTypeface = typeface;
    }

    public final void setCurrentStepTitleTextColor(int i) {
        this.currentStepTitleTextColor = i;
    }

    public final void setCurrentStepTitleTextSize(float f) {
        this.currentStepTitleTextSize = f;
    }

    public final void setCurrentStepTitleTypeface(@org.jetbrains.annotations.Nullable android.graphics.Typeface typeface) {
        this.currentStepTitleTypeface = typeface;
    }

    public final void setOtherStepOrderBackgroundColor(int i) {
        this.otherStepOrderBackgroundColor = i;
    }

    public final void setOtherStepOrderTextColor(int i) {
        this.otherStepOrderTextColor = i;
    }

    public final void setOtherStepOrderTextSize(float f) {
        this.otherStepOrderTextSize = f;
    }

    public final void setOtherStepOrderTypeface(@org.jetbrains.annotations.Nullable android.graphics.Typeface typeface) {
        this.otherStepOrderTypeface = typeface;
    }

    public final void setOtherStepTitleTextColor(int i) {
        this.otherStepTitleTextColor = i;
    }

    public final void setOtherStepTitleTextSize(float f) {
        this.otherStepTitleTextSize = f;
    }

    public final void setOtherStepTitleTypeface(@org.jetbrains.annotations.Nullable android.graphics.Typeface typeface) {
        this.otherStepTitleTypeface = typeface;
    }

    public final void setProgressLineCompleteStepColor(int i) {
        this.progressLineCompleteStepColor = i;
    }

    public final void setProgressLineIncompleteStepColor(int i) {
        this.progressLineIncompleteStepColor = i;
    }

    public final void setProgressLineWidth(float f) {
        this.progressLineWidth = f;
    }

    public final void setStepCount(int i) {
        this.stepCount = i;
    }

    public final void setStepOrder(@org.jetbrains.annotations.NotNull java.util.List<java.lang.String> list) {
        kotlin.jvm.internal.Intrinsics.l(list, "<set-?>");
        this.stepOrder = list;
    }

    public final void setStepOrderSize(float f) {
        this.stepOrderSize = f;
    }

    public final void setStepTitle(@org.jetbrains.annotations.NotNull java.util.List<java.lang.String> list) {
        kotlin.jvm.internal.Intrinsics.l(list, "<set-?>");
        this.stepTitle = list;
    }

    public final void setStepTitlePadding(int i) {
        this.stepTitlePadding = i;
    }

    /* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
    public BookingStepView(@org.jetbrains.annotations.NotNull android.content.Context context, @org.jetbrains.annotations.Nullable android.util.AttributeSet attributeSet) {
        this(context, attributeSet, 0);
        kotlin.jvm.internal.Intrinsics.l(context, "context");
    }

    /* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
    public BookingStepView(@org.jetbrains.annotations.NotNull android.content.Context context, @org.jetbrains.annotations.Nullable android.util.AttributeSet attributeSet, int i) {
        this(context, attributeSet, i, 0);
        kotlin.jvm.internal.Intrinsics.l(context, "context");
    }

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public BookingStepView(android.content.Context context, android.util.AttributeSet attributeSet, int i, int i2) {
        super(context, attributeSet, i, i2);
        kotlin.jvm.internal.Intrinsics.l(context, "context");
        this.stepOrder = kotlin.collections.CollectionsKt.o();
        this.stepTitle = kotlin.collections.CollectionsKt.o();
        j(context, attributeSet, i, i2);
        f();
    }
}
