package com.google.android.material.datepicker; import android.content.Context; import android.content.res.ColorStateList; import android.content.res.TypedArray; import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.graphics.drawable.InsetDrawable; import android.graphics.drawable.RippleDrawable; import android.widget.TextView; import androidx.core.view.n0; /* loaded from: classes2.dex */ final class b { /* renamed from: a, reason: collision with root package name */ private final Rect f4475a; /* renamed from: b, reason: collision with root package name */ private final ColorStateList f4476b; /* renamed from: c, reason: collision with root package name */ private final ColorStateList f4477c; /* renamed from: d, reason: collision with root package name */ private final ColorStateList f4478d; /* renamed from: e, reason: collision with root package name */ private final int f4479e; /* renamed from: f, reason: collision with root package name */ private final p3.k f4480f; private b(ColorStateList colorStateList, ColorStateList colorStateList2, ColorStateList colorStateList3, int i10, p3.k kVar, Rect rect) { y.h.c(rect.left); y.h.c(rect.top); y.h.c(rect.right); y.h.c(rect.bottom); this.f4475a = rect; this.f4476b = colorStateList2; this.f4477c = colorStateList; this.f4478d = colorStateList3; this.f4479e = i10; this.f4480f = kVar; } static b a(Context context, int i10) { y.h.a(i10 != 0, "Cannot create a CalendarItemStyle with a styleResId of 0"); TypedArray obtainStyledAttributes = context.obtainStyledAttributes(i10, c3.j.K1); Rect rect = new Rect(obtainStyledAttributes.getDimensionPixelOffset(c3.j.L1, 0), obtainStyledAttributes.getDimensionPixelOffset(c3.j.N1, 0), obtainStyledAttributes.getDimensionPixelOffset(c3.j.M1, 0), obtainStyledAttributes.getDimensionPixelOffset(c3.j.O1, 0)); ColorStateList a10 = m3.c.a(context, obtainStyledAttributes, c3.j.P1); ColorStateList a11 = m3.c.a(context, obtainStyledAttributes, c3.j.U1); ColorStateList a12 = m3.c.a(context, obtainStyledAttributes, c3.j.S1); int dimensionPixelSize = obtainStyledAttributes.getDimensionPixelSize(c3.j.T1, 0); p3.k m10 = p3.k.b(context, obtainStyledAttributes.getResourceId(c3.j.Q1, 0), obtainStyledAttributes.getResourceId(c3.j.R1, 0)).m(); obtainStyledAttributes.recycle(); return new b(a10, a11, a12, dimensionPixelSize, m10, rect); } void b(TextView textView) { p3.g gVar = new p3.g(); p3.g gVar2 = new p3.g(); gVar.setShapeAppearanceModel(this.f4480f); gVar2.setShapeAppearanceModel(this.f4480f); gVar.R(this.f4477c); gVar.W(this.f4479e, this.f4478d); textView.setTextColor(this.f4476b); RippleDrawable rippleDrawable = new RippleDrawable(this.f4476b.withAlpha(30), gVar, gVar2); Rect rect = this.f4475a; n0.q0(textView, new InsetDrawable((Drawable) rippleDrawable, rect.left, rect.top, rect.right, rect.bottom)); } }