package androidx.constraintlayout.helper.widget;

import android.annotation.SuppressLint;
import android.content.Context;
import android.content.res.TypedArray;
import android.os.Build;
import android.util.AttributeSet;
import android.util.SparseArray;
import android.view.View;
import androidx.constraintlayout.solver.widgets.ConstraintWidget;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.constraintlayout.widget.R$styleable;
import androidx.constraintlayout.widget.VirtualLayout;
import ῲ.ⁱ.ʬ.C2059;
import ῲ.ⁱ.ῲ.㿎.C2100;
import ῲ.ⁱ.ῲ.㿎.C2102;
import ῲ.ⁱ.ῲ.㿎.C2106;

public class Flow extends VirtualLayout {

    /* renamed from: 㑃  reason: contains not printable characters */
    public C2106 f668;

    public Flow(Context context) {
        super(context);
    }

    @Override // androidx.constraintlayout.widget.ConstraintHelper
    @SuppressLint({"WrongCall"})
    public void onMeasure(int i, int i2) {
        m387(this.f668, i, i2);
    }

    public void setFirstHorizontalBias(float f) {
        this.f668.f7305 = f;
        requestLayout();
    }

    public void setFirstHorizontalStyle(int i) {
        this.f668.f7309 = i;
        requestLayout();
    }

    public void setFirstVerticalBias(float f) {
        this.f668.f7306 = f;
        requestLayout();
    }

    public void setFirstVerticalStyle(int i) {
        this.f668.f7288 = i;
        requestLayout();
    }

    public void setHorizontalAlign(int i) {
        this.f668.f7292 = i;
        requestLayout();
    }

    public void setHorizontalBias(float f) {
        this.f668.f7295 = f;
        requestLayout();
    }

    public void setHorizontalGap(int i) {
        this.f668.f7286 = i;
        requestLayout();
    }

    public void setHorizontalStyle(int i) {
        this.f668.f7297 = i;
        requestLayout();
    }

    public void setMaxElementsWrap(int i) {
        this.f668.f7287 = i;
        requestLayout();
    }

    public void setOrientation(int i) {
        this.f668.f7299 = i;
        requestLayout();
    }

    public void setPadding(int i) {
        C2106 r0 = this.f668;
        r0.f7254 = i;
        r0.f7255 = i;
        r0.f7250 = i;
        r0.f7252 = i;
        requestLayout();
    }

    public void setPaddingBottom(int i) {
        this.f668.f7255 = i;
        requestLayout();
    }

    public void setPaddingLeft(int i) {
        this.f668.f7247 = i;
        requestLayout();
    }

    public void setPaddingRight(int i) {
        this.f668.f7248 = i;
        requestLayout();
    }

    public void setPaddingTop(int i) {
        this.f668.f7254 = i;
        requestLayout();
    }

    public void setVerticalAlign(int i) {
        this.f668.f7307 = i;
        requestLayout();
    }

    public void setVerticalBias(float f) {
        this.f668.f7293 = f;
        requestLayout();
    }

    public void setVerticalGap(int i) {
        this.f668.f7308 = i;
        requestLayout();
    }

    public void setVerticalStyle(int i) {
        this.f668.f7301 = i;
        requestLayout();
    }

    public void setWrapMode(int i) {
        this.f668.f7303 = i;
        requestLayout();
    }

    @Override // androidx.constraintlayout.widget.ConstraintHelper
    /* renamed from: K  reason: contains not printable characters */
    public void m385(ConstraintWidget constraintWidget, boolean z) {
        C2106 r2 = this.f668;
        if (r2.f7250 <= 0 && r2.f7252 <= 0) {
            return;
        }
        if (z) {
            r2.f7247 = r2.f7252;
            r2.f7248 = r2.f7250;
            return;
        }
        r2.f7247 = r2.f7250;
        r2.f7248 = r2.f7252;
    }

    public Flow(Context context, AttributeSet attributeSet) {
        super(context, attributeSet);
    }

    public Flow(Context context, AttributeSet attributeSet, int i) {
        super(context, attributeSet, i);
    }

    @Override // androidx.constraintlayout.widget.VirtualLayout
    /* renamed from: K  reason: contains not printable characters */
    public void m387(C2100 r3, int i, int i2) {
        int mode = View.MeasureSpec.getMode(i);
        int size = View.MeasureSpec.getSize(i);
        int mode2 = View.MeasureSpec.getMode(i2);
        int size2 = View.MeasureSpec.getSize(i2);
        if (r3 != null) {
            r3.m5552(mode, size, mode2, size2);
            setMeasuredDimension(r3.f7251, r3.f7249);
            return;
        }
        setMeasuredDimension(0, 0);
    }

    @Override // androidx.constraintlayout.widget.ConstraintHelper
    /* renamed from: K  reason: contains not printable characters */
    public void m386(C2059.C2063 k, C2102 r2, ConstraintLayout.C0140 k2, SparseArray<ConstraintWidget> sparseArray) {
        super.m561(k, r2, k2, sparseArray);
        if (r2 instanceof C2106) {
            C2106 r22 = (C2106) r2;
            int i = k2.f1018;
            if (i != -1) {
                r22.f7299 = i;
            }
        }
    }

    @Override // androidx.constraintlayout.widget.ConstraintHelper, androidx.constraintlayout.widget.VirtualLayout
    /* renamed from: K  reason: contains not printable characters */
    public void m384(AttributeSet attributeSet) {
        super.m573(attributeSet);
        this.f668 = new C2106();
        if (attributeSet != null) {
            TypedArray obtainStyledAttributes = getContext().obtainStyledAttributes(attributeSet, R$styleable.ConstraintLayout_Layout);
            int indexCount = obtainStyledAttributes.getIndexCount();
            for (int i = 0; i < indexCount; i++) {
                int index = obtainStyledAttributes.getIndex(i);
                if (index == R$styleable.ConstraintLayout_Layout_android_orientation) {
                    this.f668.f7299 = obtainStyledAttributes.getInt(index, 0);
                } else if (index == R$styleable.ConstraintLayout_Layout_android_padding) {
                    C2106 r4 = this.f668;
                    int dimensionPixelSize = obtainStyledAttributes.getDimensionPixelSize(index, 0);
                    r4.f7254 = dimensionPixelSize;
                    r4.f7255 = dimensionPixelSize;
                    r4.f7250 = dimensionPixelSize;
                    r4.f7252 = dimensionPixelSize;
                } else if (index == R$styleable.ConstraintLayout_Layout_android_paddingStart) {
                    int i2 = Build.VERSION.SDK_INT;
                    C2106 r42 = this.f668;
                    int dimensionPixelSize2 = obtainStyledAttributes.getDimensionPixelSize(index, 0);
                    r42.f7250 = dimensionPixelSize2;
                    r42.f7247 = dimensionPixelSize2;
                    r42.f7248 = dimensionPixelSize2;
                } else if (index == R$styleable.ConstraintLayout_Layout_android_paddingEnd) {
                    int i3 = Build.VERSION.SDK_INT;
                    this.f668.f7252 = obtainStyledAttributes.getDimensionPixelSize(index, 0);
                } else if (index == R$styleable.ConstraintLayout_Layout_android_paddingLeft) {
                    this.f668.f7247 = obtainStyledAttributes.getDimensionPixelSize(index, 0);
                } else if (index == R$styleable.ConstraintLayout_Layout_android_paddingTop) {
                    this.f668.f7254 = obtainStyledAttributes.getDimensionPixelSize(index, 0);
                } else if (index == R$styleable.ConstraintLayout_Layout_android_paddingRight) {
                    this.f668.f7248 = obtainStyledAttributes.getDimensionPixelSize(index, 0);
                } else if (index == R$styleable.ConstraintLayout_Layout_android_paddingBottom) {
                    this.f668.f7255 = obtainStyledAttributes.getDimensionPixelSize(index, 0);
                } else if (index == R$styleable.ConstraintLayout_Layout_flow_wrapMode) {
                    this.f668.f7303 = obtainStyledAttributes.getInt(index, 0);
                } else if (index == R$styleable.ConstraintLayout_Layout_flow_horizontalStyle) {
                    this.f668.f7297 = obtainStyledAttributes.getInt(index, 0);
                } else if (index == R$styleable.ConstraintLayout_Layout_flow_verticalStyle) {
                    this.f668.f7301 = obtainStyledAttributes.getInt(index, 0);
                } else if (index == R$styleable.ConstraintLayout_Layout_flow_firstHorizontalStyle) {
                    this.f668.f7309 = obtainStyledAttributes.getInt(index, 0);
                } else if (index == R$styleable.ConstraintLayout_Layout_flow_lastHorizontalStyle) {
                    this.f668.f7285 = obtainStyledAttributes.getInt(index, 0);
                } else if (index == R$styleable.ConstraintLayout_Layout_flow_firstVerticalStyle) {
                    this.f668.f7288 = obtainStyledAttributes.getInt(index, 0);
                } else if (index == R$styleable.ConstraintLayout_Layout_flow_lastVerticalStyle) {
                    this.f668.f7304 = obtainStyledAttributes.getInt(index, 0);
                } else if (index == R$styleable.ConstraintLayout_Layout_flow_horizontalBias) {
                    this.f668.f7295 = obtainStyledAttributes.getFloat(index, 0.5f);
                } else if (index == R$styleable.ConstraintLayout_Layout_flow_firstHorizontalBias) {
                    this.f668.f7305 = obtainStyledAttributes.getFloat(index, 0.5f);
                } else if (index == R$styleable.ConstraintLayout_Layout_flow_lastHorizontalBias) {
                    this.f668.f7291 = obtainStyledAttributes.getFloat(index, 0.5f);
                } else if (index == R$styleable.ConstraintLayout_Layout_flow_firstVerticalBias) {
                    this.f668.f7306 = obtainStyledAttributes.getFloat(index, 0.5f);
                } else if (index == R$styleable.ConstraintLayout_Layout_flow_lastVerticalBias) {
                    this.f668.f7300 = obtainStyledAttributes.getFloat(index, 0.5f);
                } else if (index == R$styleable.ConstraintLayout_Layout_flow_verticalBias) {
                    this.f668.f7293 = obtainStyledAttributes.getFloat(index, 0.5f);
                } else if (index == R$styleable.ConstraintLayout_Layout_flow_horizontalAlign) {
                    this.f668.f7292 = obtainStyledAttributes.getInt(index, 2);
                } else if (index == R$styleable.ConstraintLayout_Layout_flow_verticalAlign) {
                    this.f668.f7307 = obtainStyledAttributes.getInt(index, 2);
                } else if (index == R$styleable.ConstraintLayout_Layout_flow_horizontalGap) {
                    this.f668.f7286 = obtainStyledAttributes.getDimensionPixelSize(index, 0);
                } else if (index == R$styleable.ConstraintLayout_Layout_flow_verticalGap) {
                    this.f668.f7308 = obtainStyledAttributes.getDimensionPixelSize(index, 0);
                } else if (index == R$styleable.ConstraintLayout_Layout_flow_maxElementsWrap) {
                    this.f668.f7287 = obtainStyledAttributes.getInt(index, -1);
                }
            }
            obtainStyledAttributes.recycle();
        }
        this.f991 = this.f668;
        m548();
    }
}
