package androidx.compose.ui.text; import androidx.compose.ui.text.style.TextDirection; import androidx.compose.ui.unit.LayoutDirection; import kotlin.Metadata; import kotlin.NoWhenBranchMatchedException; import kotlin.jvm.internal.Intrinsics; /* compiled from: TextStyle.kt */ @Metadata(d1 = {"\u00002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u0007\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0005\u001a\u001e\u0010\u0000\u001a\u0004\u0018\u00010\u00012\b\u0010\u0002\u001a\u0004\u0018\u00010\u00032\b\u0010\u0004\u001a\u0004\u0018\u00010\u0005H\u0002\u001a\u001e\u0010\u0006\u001a\u00020\u00072\u0006\u0010\b\u001a\u00020\u00072\u0006\u0010\t\u001a\u00020\u00072\u0006\u0010\n\u001a\u00020\u000b\u001a\u0016\u0010\f\u001a\u00020\u00072\u0006\u0010\r\u001a\u00020\u00072\u0006\u0010\u000e\u001a\u00020\u000f\u001a'\u0010\u0010\u001a\u00020\u00112\u0006\u0010\u0012\u001a\u00020\u000f2\b\u0010\u0013\u001a\u0004\u0018\u00010\u0011H\u0000ø\u0001\u0000ø\u0001\u0001¢\u0006\u0004\b\u0014\u0010\u0015\u0082\u0002\u000b\n\u0005\b¡\u001e0\u0001\n\u0002\b\u0019¨\u0006\u0016"}, d2 = {"createPlatformTextStyleInternal", "Landroidx/compose/ui/text/PlatformTextStyle;", "platformSpanStyle", "Landroidx/compose/ui/text/PlatformSpanStyle;", "platformParagraphStyle", "Landroidx/compose/ui/text/PlatformParagraphStyle;", "lerp", "Landroidx/compose/ui/text/TextStyle;", "start", "stop", "fraction", "", "resolveDefaults", "style", "direction", "Landroidx/compose/ui/unit/LayoutDirection;", "resolveTextDirection", "Landroidx/compose/ui/text/style/TextDirection;", "layoutDirection", "textDirection", "resolveTextDirection-Yj3eThk", "(Landroidx/compose/ui/unit/LayoutDirection;Landroidx/compose/ui/text/style/TextDirection;)I", "ui-text_release"}, k = 2, mv = {1, 8, 0}, xi = 48) /* loaded from: classes.dex */ public final class TextStyleKt { /* compiled from: TextStyle.kt */ @Metadata(k = 3, mv = {1, 8, 0}, xi = 48) /* loaded from: classes.dex */ public /* synthetic */ class WhenMappings { public static final /* synthetic */ int[] $EnumSwitchMapping$0; static { int[] iArr = new int[LayoutDirection.values().length]; try { iArr[LayoutDirection.Ltr.ordinal()] = 1; } catch (NoSuchFieldError unused) { } try { iArr[LayoutDirection.Rtl.ordinal()] = 2; } catch (NoSuchFieldError unused2) { } $EnumSwitchMapping$0 = iArr; } } public static final TextStyle lerp(TextStyle start, TextStyle stop, float f) { Intrinsics.checkNotNullParameter(start, "start"); Intrinsics.checkNotNullParameter(stop, "stop"); return new TextStyle(SpanStyleKt.lerp(start.toSpanStyle(), stop.toSpanStyle(), f), ParagraphStyleKt.lerp(start.toParagraphStyle(), stop.toParagraphStyle(), f)); } public static final TextStyle resolveDefaults(TextStyle style, LayoutDirection direction) { Intrinsics.checkNotNullParameter(style, "style"); Intrinsics.checkNotNullParameter(direction, "direction"); return new TextStyle(SpanStyleKt.resolveSpanStyleDefaults(style.getSpanStyle()), ParagraphStyleKt.resolveParagraphStyleDefaults(style.getParagraphStyle(), direction), style.getPlatformStyle()); } /* renamed from: resolveTextDirection-Yj3eThk */ public static final int m4446resolveTextDirectionYj3eThk(LayoutDirection layoutDirection, TextDirection textDirection) { Intrinsics.checkNotNullParameter(layoutDirection, "layoutDirection"); int m4790getContents_7Xco = TextDirection.INSTANCE.m4790getContents_7Xco(); if (textDirection != null && TextDirection.m4786equalsimpl0(textDirection.getValue(), m4790getContents_7Xco)) { int i = WhenMappings.$EnumSwitchMapping$0[layoutDirection.ordinal()]; if (i == 1) { return TextDirection.INSTANCE.m4791getContentOrLtrs_7Xco(); } if (i == 2) { return TextDirection.INSTANCE.m4792getContentOrRtls_7Xco(); } throw new NoWhenBranchMatchedException(); } if (textDirection == null) { int i2 = WhenMappings.$EnumSwitchMapping$0[layoutDirection.ordinal()]; if (i2 == 1) { return TextDirection.INSTANCE.m4793getLtrs_7Xco(); } if (i2 == 2) { return TextDirection.INSTANCE.m4794getRtls_7Xco(); } throw new NoWhenBranchMatchedException(); } return textDirection.getValue(); } public static final PlatformTextStyle createPlatformTextStyleInternal(PlatformSpanStyle platformSpanStyle, PlatformParagraphStyle platformParagraphStyle) { if (platformSpanStyle == null && platformParagraphStyle == null) { return null; } return AndroidTextStyle_androidKt.createPlatformTextStyle(platformSpanStyle, platformParagraphStyle); } }