package com.revenuecat.purchases.ui.revenuecatui.components.style;

import com.google.android.recaptcha.internal.a;
import com.revenuecat.purchases.paywalls.components.IconComponent;
import com.revenuecat.purchases.paywalls.components.properties.Border;
import com.revenuecat.purchases.paywalls.components.properties.Shadow;
import com.revenuecat.purchases.ui.revenuecatui.components.properties.BorderStyleKt;
import com.revenuecat.purchases.ui.revenuecatui.components.properties.BorderStyles;
import com.revenuecat.purchases.ui.revenuecatui.components.properties.ColorStyleKt;
import com.revenuecat.purchases.ui.revenuecatui.components.properties.ColorStyles;
import com.revenuecat.purchases.ui.revenuecatui.components.properties.ShadowStyleKt;
import com.revenuecat.purchases.ui.revenuecatui.components.properties.ShadowStyles;
import com.revenuecat.purchases.ui.revenuecatui.components.style.IconComponentStyle;
import com.revenuecat.purchases.ui.revenuecatui.helpers.NonEmptyList;
import com.revenuecat.purchases.ui.revenuecatui.helpers.Result;
import com.revenuecat.purchases.ui.revenuecatui.helpers.ResultKt;
import java.util.Map;
import kotlin.jvm.internal.o;
import w4.C3137A;

/* JADX INFO: loaded from: classes3.dex */
public final /* synthetic */ class IconComponentStyleKt {
    public static final /* synthetic */ Result toBackground(IconComponent.IconBackground iconBackground, Map aliases) {
        o.h(iconBackground, "<this>");
        o.h(aliases, "aliases");
        Result colorStyles = ColorStyleKt.toColorStyles(iconBackground.getColor(), aliases);
        Border border = iconBackground.getBorder();
        Result resultOrSuccessfullyNull = ResultKt.orSuccessfullyNull(border != null ? BorderStyleKt.toBorderStyles(border, aliases) : null);
        Shadow shadow = iconBackground.getShadow();
        Result resultOrSuccessfullyNull2 = ResultKt.orSuccessfullyNull(shadow != null ? ShadowStyleKt.toShadowStyles(shadow, aliases) : null);
        C3137A c3137a = C3137A.f25453a;
        Result.Success success = new Result.Success(c3137a);
        Result.Success success2 = new Result.Success(c3137a);
        Result.Success success3 = new Result.Success(c3137a);
        NonEmptyList nonEmptyListH = a.h(new Result[]{colorStyles, resultOrSuccessfullyNull, resultOrSuccessfullyNull2, success, success2, success3});
        if (nonEmptyListH != null) {
            return new Result.Error(nonEmptyListH);
        }
        o.f(colorStyles, "null cannot be cast to non-null type com.revenuecat.purchases.ui.revenuecatui.helpers.Result.Success<A of com.revenuecat.purchases.ui.revenuecatui.helpers.ResultKt.zipOrAccumulate>");
        Object value = ((Result.Success) colorStyles).getValue();
        o.f(resultOrSuccessfullyNull, "null cannot be cast to non-null type com.revenuecat.purchases.ui.revenuecatui.helpers.Result.Success<B of com.revenuecat.purchases.ui.revenuecatui.helpers.ResultKt.zipOrAccumulate>");
        Object value2 = ((Result.Success) resultOrSuccessfullyNull).getValue();
        o.f(resultOrSuccessfullyNull2, "null cannot be cast to non-null type com.revenuecat.purchases.ui.revenuecatui.helpers.Result.Success<C of com.revenuecat.purchases.ui.revenuecatui.helpers.ResultKt.zipOrAccumulate>");
        Object value3 = ((Result.Success) resultOrSuccessfullyNull2).getValue();
        Object value4 = success.getValue();
        Object value5 = success2.getValue();
        return new Result.Success(new IconComponentStyle.Background((ColorStyles) value, iconBackground.getShape(), (BorderStyles) value2, (ShadowStyles) value3));
    }
}
