package ca.canadapost.module.findrate;

import android.app.Application;
import android.content.Context;
import androidx.lifecycle.a0;
import androidx.lifecycle.y0;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import d9.f;
import dn.l;
import java.util.Iterator;
import java.util.List;
import kotlin.jvm.internal.t;
import kotlin.jvm.internal.v;
import t9.a;

/* loaded from: classes4.dex */
public final class g extends androidx.lifecycle.b {

    /* renamed from: c, reason: collision with root package name */
    private final a0 f9354c;

    /* loaded from: classes4.dex */
    public static final class a {

        /* renamed from: a, reason: collision with root package name */
        private final float f9355a;

        /* renamed from: b, reason: collision with root package name */
        private final float f9356b;

        /* renamed from: c, reason: collision with root package name */
        private final float f9357c;

        public a(float f10, float f11, float f12) {
            this.f9355a = f10;
            this.f9356b = f11;
            this.f9357c = f12;
        }

        public final float a() {
            return this.f9355a;
        }

        public final float b() {
            return this.f9357c;
        }

        public final float c() {
            return this.f9356b;
        }

        public boolean equals(Object obj) {
            if (this == obj) {
                return true;
            }
            if (!(obj instanceof a)) {
                return false;
            }
            a aVar = (a) obj;
            return Float.compare(this.f9355a, aVar.f9355a) == 0 && Float.compare(this.f9356b, aVar.f9356b) == 0 && Float.compare(this.f9357c, aVar.f9357c) == 0;
        }

        public int hashCode() {
            return (((Float.hashCode(this.f9355a) * 31) + Float.hashCode(this.f9356b)) * 31) + Float.hashCode(this.f9357c);
        }

        public String toString() {
            return "StampRates(domestic=" + this.f9355a + ", usa=" + this.f9356b + ", international=" + this.f9357c + ")";
        }
    }

    /* loaded from: classes4.dex */
    static final class b extends v implements l {

        /* renamed from: p, reason: collision with root package name */
        public static final b f9358p = new b();

        /* loaded from: classes4.dex */
        public /* synthetic */ class a {

            /* renamed from: a, reason: collision with root package name */
            public static final /* synthetic */ int[] f9359a;

            static {
                int[] iArr = new int[a.EnumC0851a.values().length];
                try {
                    iArr[a.EnumC0851a.STAMP_CODE_DOM.ordinal()] = 1;
                } catch (NoSuchFieldError unused) {
                }
                try {
                    iArr[a.EnumC0851a.STAMP_CODE_USA.ordinal()] = 2;
                } catch (NoSuchFieldError unused2) {
                }
                try {
                    iArr[a.EnumC0851a.STAMP_CODE_INT.ordinal()] = 3;
                } catch (NoSuchFieldError unused3) {
                }
                f9359a = iArr;
            }
        }

        b() {
            super(1);
        }

        @Override // dn.l
        /* renamed from: a, reason: merged with bridge method [inline-methods] */
        public final a invoke(List it) {
            t.g(it, "it");
            Iterator it2 = it.iterator();
            float f10 = BitmapDescriptorFactory.HUE_RED;
            float f11 = 0.0f;
            float f12 = 0.0f;
            while (it2.hasNext()) {
                t9.a aVar = (t9.a) it2.next();
                int i10 = a.f9359a[aVar.b().ordinal()];
                if (i10 == 1) {
                    f10 = aVar.a();
                } else if (i10 == 2) {
                    f11 = aVar.a();
                } else if (i10 == 3) {
                    f12 = aVar.a();
                }
            }
            return new a(f10, f11, f12);
        }
    }

    /* JADX WARN: Illegal instructions before constructor call */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public g(s9.c repository, d9.f analyticsService, t7.c contextService) {
        super((Application) r4);
        t.g(repository, "repository");
        t.g(analyticsService, "analyticsService");
        t.g(contextService, "contextService");
        Context a10 = contextService.a();
        t.e(a10, "null cannot be cast to non-null type android.app.Application");
        this.f9354c = y0.a(repository.a(), b.f9358p);
        f.a.c(analyticsService, "FARStampPrices", null, 2, null);
    }

    public final a0 Q() {
        return this.f9354c;
    }
}
