package com.google.android.material.datepicker;

import android.os.Parcel;
import android.os.Parcelable;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.google.android.gms.measurement.internal.l4;
import java.util.Arrays;
import java.util.Objects;

/* JADX INFO: loaded from: classes2.dex */
public final class c implements Parcelable {
    public static final Parcelable.Creator<c> CREATOR = new l4(8);

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final r f22465a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final r f22466b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final b f22467c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final int f22468d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final int f22469e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public final int f22470f;

    @Nullable
    private r openAt;

    public /* synthetic */ c(r rVar, r rVar2, b bVar, r rVar3, int i10, int i11) {
        this(rVar, rVar2, bVar, rVar3, i10);
    }

    @Override // android.os.Parcelable
    public final int describeContents() {
        return 0;
    }

    public final boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof c)) {
            return false;
        }
        c cVar = (c) obj;
        return this.f22465a.equals(cVar.f22465a) && this.f22466b.equals(cVar.f22466b) && p0.c.equals(this.openAt, cVar.openAt) && this.f22468d == cVar.f22468d && this.f22467c.equals(cVar.f22467c);
    }

    @Nullable
    public r getOpenAt() {
        return this.openAt;
    }

    @Nullable
    public Long getOpenAtMs() {
        r rVar = this.openAt;
        if (rVar == null) {
            return null;
        }
        return Long.valueOf(rVar.f22503f);
    }

    public final int hashCode() {
        return Arrays.hashCode(new Object[]{this.f22465a, this.f22466b, this.openAt, Integer.valueOf(this.f22468d), this.f22467c});
    }

    public void setOpenAt(@Nullable r rVar) {
        this.openAt = rVar;
    }

    @Override // android.os.Parcelable
    public final void writeToParcel(Parcel parcel, int i10) {
        parcel.writeParcelable(this.f22465a, 0);
        parcel.writeParcelable(this.f22466b, 0);
        parcel.writeParcelable(this.openAt, 0);
        parcel.writeParcelable(this.f22467c, 0);
        parcel.writeInt(this.f22468d);
    }

    private c(@NonNull r rVar, @NonNull r rVar2, @NonNull b bVar, @Nullable r rVar3, int i10) {
        Objects.requireNonNull(rVar, "start cannot be null");
        Objects.requireNonNull(rVar2, "end cannot be null");
        Objects.requireNonNull(bVar, "validator cannot be null");
        this.f22465a = rVar;
        this.f22466b = rVar2;
        this.openAt = rVar3;
        this.f22468d = i10;
        this.f22467c = bVar;
        if (rVar3 != null && rVar.f22498a.compareTo(rVar3.f22498a) > 0) {
            throw new IllegalArgumentException("start Month cannot be after current Month");
        }
        if (rVar3 != null && rVar3.f22498a.compareTo(rVar2.f22498a) > 0) {
            throw new IllegalArgumentException("current Month cannot be after end Month");
        }
        if (i10 < 0 || i10 > z.getUtcCalendarOf(null).getMaximum(7)) {
            throw new IllegalArgumentException("firstDayOfWeek is not valid");
        }
        this.f22470f = rVar.e(rVar2) + 1;
        this.f22469e = (rVar2.f22500c - rVar.f22500c) + 1;
    }
}
