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

import E3.v;
import androidx.compose.runtime.Stable;
import com.revenuecat.purchases.ui.revenuecatui.components.properties.BackgroundStyle;
import com.revenuecat.purchases.ui.revenuecatui.components.properties.ColorStyle;
import i0.C2239c;
import i0.InterfaceC2255s;
import kotlin.jvm.internal.o;
import m0.h;
import p0.AbstractC2686D;
import p0.X;
import v.AbstractC3058z;

/* JADX INFO: loaded from: classes3.dex */
public final /* synthetic */ class BackgroundKt {
    @Stable
    public static final InterfaceC2255s background(InterfaceC2255s interfaceC2255s, ColorStyle color, X shape) {
        o.h(interfaceC2255s, "<this>");
        o.h(color, "color");
        o.h(shape, "shape");
        if (color instanceof ColorStyle.Solid) {
            return AbstractC3058z.h(interfaceC2255s, ((ColorStyle.Solid) color).m739unboximpl(), shape);
        }
        if (color instanceof ColorStyle.Gradient) {
            return AbstractC3058z.f(interfaceC2255s, ((ColorStyle.Gradient) color).m731unboximpl(), shape);
        }
        throw new v();
    }

    public static /* synthetic */ InterfaceC2255s background$default(InterfaceC2255s interfaceC2255s, ColorStyle colorStyle, X x6, int i6, Object obj) {
        if ((i6 & 2) != 0) {
            x6 = AbstractC2686D.f22844b;
        }
        return background(interfaceC2255s, colorStyle, x6);
    }

    public static /* synthetic */ InterfaceC2255s background$default(InterfaceC2255s interfaceC2255s, BackgroundStyle backgroundStyle, X x6, int i6, Object obj) {
        if ((i6 & 2) != 0) {
            x6 = AbstractC2686D.f22844b;
        }
        return background(interfaceC2255s, backgroundStyle, x6);
    }

    @Stable
    public static final InterfaceC2255s background(InterfaceC2255s interfaceC2255s, BackgroundStyle background, X shape) {
        o.h(interfaceC2255s, "<this>");
        o.h(background, "background");
        o.h(shape, "shape");
        if (background instanceof BackgroundStyle.Color) {
            return background(interfaceC2255s, ((BackgroundStyle.Color) background).m709unboximpl(), shape);
        }
        if (background instanceof BackgroundStyle.Image) {
            BackgroundStyle.Image image = (BackgroundStyle.Image) background;
            return h.h(h.c(interfaceC2255s, shape), image.getPainter(), C2239c.f18795b, image.getContentScale(), 0.0f, null, 50);
        }
        if (background instanceof BackgroundStyle.Video) {
            return interfaceC2255s;
        }
        throw new v();
    }
}
