package com.vinfast.companion.serviceskit.domain.model.global.service.booking;

/* JADX INFO: compiled from: r8-map-id-ae6aab8d9a1033945587ffdd1bc6222159522c1d66e66a2c4cecb065134dd0a6 */
/* JADX INFO: loaded from: E:\ios\vf_dex\classes6.dex */
@kotlinx.parcelize.Parcelize
@kotlin.Metadata(d1 = {"\u0000B\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u000b\n\u0002\u0010\u0002\n\u0002\b\u0007\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0010\u0000\n\u0002\b\u0017\b\u0087\b\u0018\u0000 12\u00020\u0001:\u0001<Bm\u0012\u0006\u0010\u0003\u001a\u00020\u0002\u0012\b\u0010\u0004\u001a\u0004\u0018\u00010\u0002\u0012\f\u0010\u0007\u001a\b\u0012\u0004\u0012\u00020\u00060\u0005\u0012\b\b\u0002\u0010\t\u001a\u00020\b\u0012\b\b\u0002\u0010\n\u001a\u00020\b\u0012\b\b\u0002\u0010\u000b\u001a\u00020\b\u0012\b\b\u0002\u0010\f\u001a\u00020\b\u0012\b\b\u0002\u0010\r\u001a\u00020\b\u0012\b\b\u0002\u0010\u000e\u001a\u00020\b\u0012\b\b\u0002\u0010\u000f\u001a\u00020\b¢\u0006\u0004\b\u0010\u0010\u0011J\u0013\u0010\u0012\u001a\b\u0012\u0004\u0012\u00020\u00060\u0005¢\u0006\u0004\b\u0012\u0010\u0013J\r\u0010\u0015\u001a\u00020\u0014¢\u0006\u0004\b\u0015\u0010\u0016J\r\u0010\u0017\u001a\u00020\u0014¢\u0006\u0004\b\u0017\u0010\u0016J\u000f\u0010\u0018\u001a\u0004\u0018\u00010\u0002¢\u0006\u0004\b\u0018\u0010\u0019J\r\u0010\u001a\u001a\u00020\u0002¢\u0006\u0004\b\u001a\u0010\u0019J\r\u0010\u001b\u001a\u00020\u0002¢\u0006\u0004\b\u001b\u0010\u0019J\r\u0010\u001d\u001a\u00020\u001c¢\u0006\u0004\b\u001d\u0010\u001eJ\u001d\u0010\"\u001a\u00020\u00142\u0006\u0010 \u001a\u00020\u001f2\u0006\u0010!\u001a\u00020\u001c¢\u0006\u0004\b\"\u0010#J\u0010\u0010$\u001a\u00020\u0002HÖ\u0001¢\u0006\u0004\b$\u0010\u0019J\u0010\u0010%\u001a\u00020\u001cHÖ\u0001¢\u0006\u0004\b%\u0010\u001eJ\u001a\u0010(\u001a\u00020\b2\b\u0010'\u001a\u0004\u0018\u00010&HÖ\u0003¢\u0006\u0004\b(\u0010)R\u0017\u0010\u0003\u001a\u00020\u00028\u0006¢\u0006\f\n\u0004\b*\u0010+\u001a\u0004\b,\u0010\u0019R\u0019\u0010\u0004\u001a\u0004\u0018\u00010\u00028\u0006¢\u0006\f\n\u0004\b\u0017\u0010+\u001a\u0004\b-\u0010\u0019R\u001d\u0010\u0007\u001a\b\u0012\u0004\u0012\u00020\u00060\u00058\u0006¢\u0006\f\n\u0004\b\u001a\u0010.\u001a\u0004\b/\u0010\u0013R\"\u0010\t\u001a\u00020\b8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b\u001b\u00100\u001a\u0004\b1\u00102\"\u0004\b3\u00104R\"\u0010\n\u001a\u00020\b8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b5\u00100\u001a\u0004\b6\u00102\"\u0004\b7\u00104R\u0017\u0010\u000b\u001a\u00020\b8\u0006¢\u0006\f\n\u0004\b-\u00100\u001a\u0004\b8\u00102R\u0017\u0010\f\u001a\u00020\b8\u0006¢\u0006\f\n\u0004\b\u0012\u00100\u001a\u0004\b9\u00102R\u0017\u0010\r\u001a\u00020\b8\u0006¢\u0006\f\n\u0004\b/\u00100\u001a\u0004\b:\u00102R\u0017\u0010\u000e\u001a\u00020\b8\u0006¢\u0006\f\n\u0004\b;\u00100\u001a\u0004\b\u000e\u00102R\u0017\u0010\u000f\u001a\u00020\b8\u0006¢\u0006\f\n\u0004\b\u0018\u00100\u001a\u0004\b\u000f\u00102¨\u0006="}, d2 = {"Lcom/vinfast/companion/serviceskit/domain/model/global/service/booking/ServiceModel;", "Landroid/os/Parcelable;", "", "id", "name", "", "Lcom/vinfast/companion/serviceskit/domain/model/global/service/booking/SubServiceModel;", "subServices", "", "isExpand", "isSpecialService", "isVehicleAlert", "isMaintenance", "isOther", "isMobileService", "isServiceCenter", "<init>", "(Ljava/lang/String;Ljava/lang/String;Ljava/util/List;ZZZZZZZ)V", "g", "()Ljava/util/List;", "", "p", "()V", "b", "j", "()Ljava/lang/String;", "c", "d", "", "describeContents", "()I", "Landroid/os/Parcel;", "dest", "flags", "writeToParcel", "(Landroid/os/Parcel;I)V", "toString", "hashCode", "", "other", "equals", "(Ljava/lang/Object;)Z", "a", "Ljava/lang/String;", "getId", "f", "Ljava/util/List;", "h", "Z", "k", "()Z", "q", "(Z)V", "e", "n", "setSpecialService", "o", "l", "m", "i", "Companion", "servicesKit_release"}, k = 1, mv = {2, 2, 0}, xi = 48)
@kotlin.jvm.internal.SourceDebugExtension
public final /* data */ class ServiceModel implements android.os.Parcelable {

    /* JADX INFO: renamed from: a, reason: from kotlin metadata and from toString */
    private final java.lang.String id;

    /* JADX INFO: renamed from: b, reason: from kotlin metadata and from toString */
    private final java.lang.String name;

    /* JADX INFO: renamed from: c, reason: from kotlin metadata and from toString */
    private final java.util.List subServices;

    /* JADX INFO: renamed from: d, reason: from kotlin metadata and from toString */
    private boolean isExpand;

    /* JADX INFO: renamed from: e, reason: from kotlin metadata and from toString */
    private boolean isSpecialService;

    /* JADX INFO: renamed from: f, reason: from kotlin metadata and from toString */
    private final boolean isVehicleAlert;

    /* JADX INFO: renamed from: g, reason: from kotlin metadata and from toString */
    private final boolean isMaintenance;

    /* JADX INFO: renamed from: h, reason: from kotlin metadata and from toString */
    private final boolean isOther;

    /* JADX INFO: renamed from: i, reason: from kotlin metadata and from toString */
    private final boolean isMobileService;

    /* JADX INFO: renamed from: j, reason: from kotlin metadata and from toString */
    private final boolean isServiceCenter;

    /* JADX INFO: renamed from: k, reason: from kotlin metadata */
    public static final com.vinfast.companion.serviceskit.domain.model.global.service.booking.ServiceModel.Companion INSTANCE = new com.vinfast.companion.serviceskit.domain.model.global.service.booking.ServiceModel.Companion(null);

    @org.jetbrains.annotations.NotNull
    public static final android.os.Parcelable.Creator<com.vinfast.companion.serviceskit.domain.model.global.service.booking.ServiceModel> CREATOR = new com.vinfast.companion.serviceskit.domain.model.global.service.booking.ServiceModel.Creator();

    /* JADX INFO: compiled from: r8-map-id-ae6aab8d9a1033945587ffdd1bc6222159522c1d66e66a2c4cecb065134dd0a6 */
    @kotlin.Metadata(d1 = {"\u0000\u001a\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0086\u0003\u0018\u00002\u00020\u0001B\t\b\u0002¢\u0006\u0004\b\u0002\u0010\u0003J\u0015\u0010\u0007\u001a\u00020\u00062\u0006\u0010\u0005\u001a\u00020\u0004¢\u0006\u0004\b\u0007\u0010\b¨\u0006\t"}, d2 = {"Lcom/vinfast/companion/serviceskit/domain/model/global/service/booking/ServiceModel$Companion;", "", "<init>", "()V", "Lcom/vinfast/companion/serviceskit/domain/response/global/service/GlServiceGroupDto;", "dto", "Lcom/vinfast/companion/serviceskit/domain/model/global/service/booking/ServiceModel;", "a", "(Lcom/vinfast/companion/serviceskit/domain/response/global/service/GlServiceGroupDto;)Lcom/vinfast/companion/serviceskit/domain/model/global/service/booking/ServiceModel;", "servicesKit_release"}, k = 1, mv = {2, 2, 0}, xi = 48)
    @kotlin.jvm.internal.SourceDebugExtension
    public static final class Companion {
        public /* synthetic */ Companion(kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker) {
            this();
        }

        public final com.vinfast.companion.serviceskit.domain.model.global.service.booking.ServiceModel a(com.vinfast.companion.serviceskit.domain.response.global.service.GlServiceGroupDto dto) {
            java.util.List listO;
            kotlin.jvm.internal.Intrinsics.l(dto, "dto");
            java.lang.String code = dto.getCode();
            java.lang.String name = dto.getName();
            java.util.List subs = dto.getSubs();
            if (subs != null) {
                listO = new java.util.ArrayList(kotlin.collections.CollectionsKt.z(subs, 10));
                int i = 0;
                for (java.lang.Object obj : subs) {
                    int i2 = i + 1;
                    if (i < 0) {
                        kotlin.collections.CollectionsKt.y();
                    }
                    listO.add(com.vinfast.companion.serviceskit.domain.model.global.service.booking.SubServiceModel.INSTANCE.a(i, (com.vinfast.companion.serviceskit.domain.response.global.service.GlServiceDto) obj));
                    i = i2;
                }
            } else {
                listO = kotlin.collections.CollectionsKt.o();
            }
            java.util.List list = listO;
            java.lang.Boolean isVehicleAlert = dto.getIsVehicleAlert();
            java.lang.Boolean bool = java.lang.Boolean.TRUE;
            return new com.vinfast.companion.serviceskit.domain.model.global.service.booking.ServiceModel(code, name, list, false, false, kotlin.jvm.internal.Intrinsics.g(isVehicleAlert, bool), kotlin.jvm.internal.Intrinsics.g(dto.getIsMaintenance(), bool), kotlin.jvm.internal.Intrinsics.g(dto.getIsOther(), bool), kotlin.jvm.internal.Intrinsics.g(dto.getIsMobileService(), bool), kotlin.jvm.internal.Intrinsics.g(dto.getIsServiceCenter(), bool));
        }

        private Companion() {
        }
    }

    /* JADX INFO: compiled from: r8-map-id-ae6aab8d9a1033945587ffdd1bc6222159522c1d66e66a2c4cecb065134dd0a6 */
    @kotlin.Metadata(k = 3, mv = {2, 2, 0}, xi = 48)
    public static final class Creator implements android.os.Parcelable.Creator<com.vinfast.companion.serviceskit.domain.model.global.service.booking.ServiceModel> {
        @Override // android.os.Parcelable.Creator
        /* JADX INFO: renamed from: a, reason: merged with bridge method [inline-methods] */
        public final com.vinfast.companion.serviceskit.domain.model.global.service.booking.ServiceModel createFromParcel(android.os.Parcel parcel) {
            kotlin.jvm.internal.Intrinsics.l(parcel, "parcel");
            java.lang.String string = parcel.readString();
            java.lang.String string2 = parcel.readString();
            int i = parcel.readInt();
            java.util.ArrayList arrayList = new java.util.ArrayList(i);
            for (int i2 = 0; i2 != i; i2++) {
                arrayList.add(com.vinfast.companion.serviceskit.domain.model.global.service.booking.SubServiceModel.CREATOR.createFromParcel(parcel));
            }
            boolean z = true;
            if (parcel.readInt() == 0) {
                z = false;
            }
            return new com.vinfast.companion.serviceskit.domain.model.global.service.booking.ServiceModel(string, string2, arrayList, z, parcel.readInt() != 0, parcel.readInt() != 0 ? z : false, parcel.readInt() != 0 ? z : false, parcel.readInt() != 0 ? z : false, parcel.readInt() != 0 ? z : false, parcel.readInt() != 0 ? z : false);
        }

        @Override // android.os.Parcelable.Creator
        /* JADX INFO: renamed from: b, reason: merged with bridge method [inline-methods] */
        public final com.vinfast.companion.serviceskit.domain.model.global.service.booking.ServiceModel[] newArray(int i) {
            return new com.vinfast.companion.serviceskit.domain.model.global.service.booking.ServiceModel[i];
        }
    }

    public ServiceModel(java.lang.String str, java.lang.String str2, java.util.List list, boolean z, boolean z2, boolean z3, boolean z5, boolean z6, boolean z7, boolean z8) {
        kotlin.jvm.internal.Intrinsics.l(str, "id");
        kotlin.jvm.internal.Intrinsics.l(list, "subServices");
        this.id = str;
        this.name = str2;
        this.subServices = list;
        this.isExpand = z;
        this.isSpecialService = z2;
        this.isVehicleAlert = z3;
        this.isMaintenance = z5;
        this.isOther = z6;
        this.isMobileService = z7;
        this.isServiceCenter = z8;
    }

    public final void b() {
        java.util.Iterator it = this.subServices.iterator();
        while (it.hasNext()) {
            ((com.vinfast.companion.serviceskit.domain.model.global.service.booking.SubServiceModel) it.next()).m(false);
        }
    }

    public final java.lang.String c() {
        if (this.subServices.isEmpty()) {
            return "";
        }
        java.util.List listG = g();
        java.util.ArrayList arrayList = new java.util.ArrayList(kotlin.collections.CollectionsKt.z(listG, 10));
        java.util.Iterator it = listG.iterator();
        while (it.hasNext()) {
            arrayList.add(((com.vinfast.companion.serviceskit.domain.model.global.service.booking.SubServiceModel) it.next()).getName());
        }
        return kotlin.collections.CollectionsKt.A0(arrayList, "\n • ", " • ", (java.lang.CharSequence) null, 0, (java.lang.CharSequence) null, (kotlin.jvm.functions.Function1) null, 60, (java.lang.Object) null);
    }

    public final java.lang.String d() {
        java.lang.String str;
        java.util.List listG = g();
        java.lang.String strJ = j();
        if (listG.isEmpty()) {
            str = "";
        } else {
            str = " (" + listG.size() + ")";
        }
        return strJ + str;
    }

    @Override // android.os.Parcelable
    public final int describeContents() {
        return 0;
    }

    public boolean equals(java.lang.Object other) {
        if (this == other) {
            return true;
        }
        if (!(other instanceof com.vinfast.companion.serviceskit.domain.model.global.service.booking.ServiceModel)) {
            return false;
        }
        com.vinfast.companion.serviceskit.domain.model.global.service.booking.ServiceModel serviceModel = (com.vinfast.companion.serviceskit.domain.model.global.service.booking.ServiceModel) other;
        return kotlin.jvm.internal.Intrinsics.g(this.id, serviceModel.id) && kotlin.jvm.internal.Intrinsics.g(this.name, serviceModel.name) && kotlin.jvm.internal.Intrinsics.g(this.subServices, serviceModel.subServices) && this.isExpand == serviceModel.isExpand && this.isSpecialService == serviceModel.isSpecialService && this.isVehicleAlert == serviceModel.isVehicleAlert && this.isMaintenance == serviceModel.isMaintenance && this.isOther == serviceModel.isOther && this.isMobileService == serviceModel.isMobileService && this.isServiceCenter == serviceModel.isServiceCenter;
    }

    /* JADX INFO: renamed from: f, reason: from getter */
    public final java.lang.String getName() {
        return this.name;
    }

    public final java.util.List g() {
        java.util.List list = this.subServices;
        java.util.ArrayList arrayList = new java.util.ArrayList();
        for (java.lang.Object obj : list) {
            if (((com.vinfast.companion.serviceskit.domain.model.global.service.booking.SubServiceModel) obj).getIsSelected()) {
                arrayList.add(obj);
            }
        }
        return arrayList;
    }

    public final java.lang.String getId() {
        return this.id;
    }

    /* JADX INFO: renamed from: h, reason: from getter */
    public final java.util.List getSubServices() {
        return this.subServices;
    }

    public int hashCode() {
        int iHashCode = this.id.hashCode() * 31;
        java.lang.String str = this.name;
        return ((((((((((((((((iHashCode + (str == null ? 0 : str.hashCode())) * 31) + this.subServices.hashCode()) * 31) + java.lang.Boolean.hashCode(this.isExpand)) * 31) + java.lang.Boolean.hashCode(this.isSpecialService)) * 31) + java.lang.Boolean.hashCode(this.isVehicleAlert)) * 31) + java.lang.Boolean.hashCode(this.isMaintenance)) * 31) + java.lang.Boolean.hashCode(this.isOther)) * 31) + java.lang.Boolean.hashCode(this.isMobileService)) * 31) + java.lang.Boolean.hashCode(this.isServiceCenter);
    }

    public final java.lang.String j() {
        return this.name;
    }

    /* JADX INFO: renamed from: k, reason: from getter */
    public final boolean getIsExpand() {
        return this.isExpand;
    }

    /* JADX INFO: renamed from: l, reason: from getter */
    public final boolean getIsMaintenance() {
        return this.isMaintenance;
    }

    /* JADX INFO: renamed from: m, reason: from getter */
    public final boolean getIsOther() {
        return this.isOther;
    }

    /* JADX INFO: renamed from: n, reason: from getter */
    public final boolean getIsSpecialService() {
        return this.isSpecialService;
    }

    /* JADX INFO: renamed from: o, reason: from getter */
    public final boolean getIsVehicleAlert() {
        return this.isVehicleAlert;
    }

    public final void p() {
        java.util.Iterator it = this.subServices.iterator();
        while (it.hasNext()) {
            ((com.vinfast.companion.serviceskit.domain.model.global.service.booking.SubServiceModel) it.next()).m(true);
        }
    }

    public final void q(boolean z) {
        this.isExpand = z;
    }

    public java.lang.String toString() {
        return "ServiceModel(id=" + this.id + ", name=" + this.name + ", subServices=" + this.subServices + ", isExpand=" + this.isExpand + ", isSpecialService=" + this.isSpecialService + ", isVehicleAlert=" + this.isVehicleAlert + ", isMaintenance=" + this.isMaintenance + ", isOther=" + this.isOther + ", isMobileService=" + this.isMobileService + ", isServiceCenter=" + this.isServiceCenter + ")";
    }

    @Override // android.os.Parcelable
    public final void writeToParcel(android.os.Parcel dest, int flags) {
        kotlin.jvm.internal.Intrinsics.l(dest, "dest");
        dest.writeString(this.id);
        dest.writeString(this.name);
        java.util.List list = this.subServices;
        dest.writeInt(list.size());
        java.util.Iterator it = list.iterator();
        while (it.hasNext()) {
            ((com.vinfast.companion.serviceskit.domain.model.global.service.booking.SubServiceModel) it.next()).writeToParcel(dest, flags);
        }
        dest.writeInt(this.isExpand ? 1 : 0);
        dest.writeInt(this.isSpecialService ? 1 : 0);
        dest.writeInt(this.isVehicleAlert ? 1 : 0);
        dest.writeInt(this.isMaintenance ? 1 : 0);
        dest.writeInt(this.isOther ? 1 : 0);
        dest.writeInt(this.isMobileService ? 1 : 0);
        dest.writeInt(this.isServiceCenter ? 1 : 0);
    }
}
