package ca.canadapost.core.data.auth.model;

import java.util.Iterator;
import java.util.List;
import kotlin.Metadata;
import kotlin.jvm.internal.t;
import sm.c0;

@Metadata(d1 = {"\u0000(\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\b\u0017\n\u0002\u0010\u000e\n\u0000\b\u0086\b\u0018\u00002\u00020\u0001B#\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005\u0012\f\u0010\u0006\u001a\b\u0012\u0004\u0012\u00020\b0\u0007¢\u0006\u0002\u0010\tJ\t\u0010\u0018\u001a\u00020\u0003HÆ\u0003J\t\u0010\u0019\u001a\u00020\u0005HÆ\u0003J\u000f\u0010\u001a\u001a\b\u0012\u0004\u0012\u00020\b0\u0007HÆ\u0003J-\u0010\u001b\u001a\u00020\u00002\b\b\u0002\u0010\u0002\u001a\u00020\u00032\b\b\u0002\u0010\u0004\u001a\u00020\u00052\u000e\b\u0002\u0010\u0006\u001a\b\u0012\u0004\u0012\u00020\b0\u0007HÆ\u0001J\u0013\u0010\u001c\u001a\u00020\u00052\b\u0010\u001d\u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u0010\u001e\u001a\u00020\u0003HÖ\u0001J\t\u0010\u001f\u001a\u00020 HÖ\u0001R\u0013\u0010\n\u001a\u0004\u0018\u00010\b8F¢\u0006\u0006\u001a\u0004\b\u000b\u0010\fR\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\r\u0010\u000eR\u0013\u0010\u000f\u001a\u0004\u0018\u00010\b8F¢\u0006\u0006\u001a\u0004\b\u0010\u0010\fR\u0011\u0010\u0004\u001a\u00020\u0005¢\u0006\b\n\u0000\u001a\u0004\b\u0004\u0010\u0011R\u0011\u0010\u0012\u001a\u00020\u00058F¢\u0006\u0006\u001a\u0004\b\u0012\u0010\u0011R\u0011\u0010\u0013\u001a\u00020\u00058F¢\u0006\u0006\u001a\u0004\b\u0013\u0010\u0011R\u0013\u0010\u0014\u001a\u0004\u0018\u00010\b8F¢\u0006\u0006\u001a\u0004\b\u0015\u0010\fR\u0017\u0010\u0006\u001a\b\u0012\u0004\u0012\u00020\b0\u0007¢\u0006\b\n\u0000\u001a\u0004\b\u0016\u0010\u0017¨\u0006!"}, d2 = {"Lca/canadapost/core/data/auth/model/ProofingState;", "", "cancelledAttempts", "", "isAccountLocked", "", "proofingProfiles", "", "Lca/canadapost/core/data/auth/model/ProofingProfile;", "(IZLjava/util/List;)V", "activeProofingProfile", "getActiveProofingProfile", "()Lca/canadapost/core/data/auth/model/ProofingProfile;", "getCancelledAttempts", "()I", "incompleteProofingProfile", "getIncompleteProofingProfile", "()Z", "isL1Authenticated", "isL2Authenticated", "latestProfile", "getLatestProfile", "getProofingProfiles", "()Ljava/util/List;", "component1", "component2", "component3", "copy", "equals", "other", "hashCode", "toString", "", "core_data_productionRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
/* loaded from: classes.dex */
public final /* data */ class ProofingState {
    private final int cancelledAttempts;
    private final boolean isAccountLocked;
    private final List<ProofingProfile> proofingProfiles;

    public ProofingState(int i10, boolean z10, List<ProofingProfile> proofingProfiles) {
        t.g(proofingProfiles, "proofingProfiles");
        this.cancelledAttempts = i10;
        this.isAccountLocked = z10;
        this.proofingProfiles = proofingProfiles;
    }

    /* JADX WARN: Multi-variable type inference failed */
    public static /* synthetic */ ProofingState copy$default(ProofingState proofingState, int i10, boolean z10, List list, int i11, Object obj) {
        if ((i11 & 1) != 0) {
            i10 = proofingState.cancelledAttempts;
        }
        if ((i11 & 2) != 0) {
            z10 = proofingState.isAccountLocked;
        }
        if ((i11 & 4) != 0) {
            list = proofingState.proofingProfiles;
        }
        return proofingState.copy(i10, z10, list);
    }

    /* renamed from: component1, reason: from getter */
    public final int getCancelledAttempts() {
        return this.cancelledAttempts;
    }

    /* renamed from: component2, reason: from getter */
    public final boolean getIsAccountLocked() {
        return this.isAccountLocked;
    }

    public final List<ProofingProfile> component3() {
        return this.proofingProfiles;
    }

    public final ProofingState copy(int cancelledAttempts, boolean isAccountLocked, List<ProofingProfile> proofingProfiles) {
        t.g(proofingProfiles, "proofingProfiles");
        return new ProofingState(cancelledAttempts, isAccountLocked, proofingProfiles);
    }

    public boolean equals(Object other) {
        if (this == other) {
            return true;
        }
        if (!(other instanceof ProofingState)) {
            return false;
        }
        ProofingState proofingState = (ProofingState) other;
        return this.cancelledAttempts == proofingState.cancelledAttempts && this.isAccountLocked == proofingState.isAccountLocked && t.b(this.proofingProfiles, proofingState.proofingProfiles);
    }

    public final ProofingProfile getActiveProofingProfile() {
        Object obj;
        Iterator<T> it = this.proofingProfiles.iterator();
        while (true) {
            if (!it.hasNext()) {
                obj = null;
                break;
            }
            obj = it.next();
            if (t.b(((ProofingProfile) obj).getProofingProfileStatus(), ProofingProfileDTOKt.PROOFING_PROFILE_ACTIVE)) {
                break;
            }
        }
        return (ProofingProfile) obj;
    }

    public final int getCancelledAttempts() {
        return this.cancelledAttempts;
    }

    public final ProofingProfile getIncompleteProofingProfile() {
        Object obj;
        Iterator<T> it = this.proofingProfiles.iterator();
        while (true) {
            if (!it.hasNext()) {
                obj = null;
                break;
            }
            obj = it.next();
            if (t.b(((ProofingProfile) obj).getProofingProfileStatus(), ProofingProfileDTOKt.PROOFING_PROFILE_INCOMPLETE)) {
                break;
            }
        }
        return (ProofingProfile) obj;
    }

    public final ProofingProfile getLatestProfile() {
        Object f02;
        f02 = c0.f0(this.proofingProfiles, 0);
        return (ProofingProfile) f02;
    }

    public final List<ProofingProfile> getProofingProfiles() {
        return this.proofingProfiles;
    }

    public int hashCode() {
        return (((Integer.hashCode(this.cancelledAttempts) * 31) + Boolean.hashCode(this.isAccountLocked)) * 31) + this.proofingProfiles.hashCode();
    }

    public final boolean isAccountLocked() {
        return this.isAccountLocked;
    }

    /* JADX WARN: Removed duplicated region for block: B:13:0x0038 A[EDGE_INSN: B:13:0x0038->B:14:0x0038 BREAK  A[LOOP:0: B:2:0x0008->B:19:?], SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:19:? A[LOOP:0: B:2:0x0008->B:19:?, LOOP_END, SYNTHETIC] */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final boolean isL1Authenticated() {
        Object obj;
        boolean z10;
        Iterator<T> it = this.proofingProfiles.iterator();
        while (true) {
            if (!it.hasNext()) {
                obj = null;
                break;
            }
            obj = it.next();
            ProofingProfile proofingProfile = (ProofingProfile) obj;
            if (t.b(proofingProfile.getProofingProfileStatus(), ProofingProfileDTOKt.PROOFING_PROFILE_ACTIVE)) {
                Integer proofingLevel = proofingProfile.getProofingLevel();
                if ((proofingLevel != null ? proofingLevel.intValue() : 0) >= 1) {
                    z10 = true;
                    if (!z10) {
                        break;
                    }
                }
            }
            z10 = false;
            if (!z10) {
            }
        }
        return obj != null;
    }

    /* JADX WARN: Removed duplicated region for block: B:14:0x0039 A[EDGE_INSN: B:14:0x0039->B:15:0x0039 BREAK  A[LOOP:0: B:2:0x0008->B:20:?], SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:20:? A[LOOP:0: B:2:0x0008->B:20:?, LOOP_END, SYNTHETIC] */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final boolean isL2Authenticated() {
        Object obj;
        boolean z10;
        Iterator<T> it = this.proofingProfiles.iterator();
        while (true) {
            if (!it.hasNext()) {
                obj = null;
                break;
            }
            obj = it.next();
            ProofingProfile proofingProfile = (ProofingProfile) obj;
            if (t.b(proofingProfile.getProofingProfileStatus(), ProofingProfileDTOKt.PROOFING_PROFILE_ACTIVE)) {
                Integer proofingLevel = proofingProfile.getProofingLevel();
                if ((proofingLevel != null ? proofingLevel.intValue() : 0) >= 2) {
                    z10 = true;
                    if (!z10) {
                        break;
                    }
                }
            }
            z10 = false;
            if (!z10) {
            }
        }
        return obj != null;
    }

    public String toString() {
        return "ProofingState(cancelledAttempts=" + this.cancelledAttempts + ", isAccountLocked=" + this.isAccountLocked + ", proofingProfiles=" + this.proofingProfiles + ")";
    }
}
