package com.applemand.zmanim.core.ui

import androidx.compose.material3.LocalTextStyle
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.style.TextAlign
import com.applemand.zmanim.core.design.FrankRuhlLibre

/**
 * Convenience for rendering Hebrew strings inside otherwise-Latin surfaces.
 * Uses Frank Ruhl Libre and biases alignment End (RTL within LTR).
 */
@Composable
fun HebrewText(
    text: String,
    modifier: Modifier = Modifier,
    style: TextStyle = LocalTextStyle.current,
    color: Color = MaterialTheme.colorScheme.onSurface,
    textAlign: TextAlign? = null,
) {
    Text(
        text = text,
        modifier = modifier,
        style = style.copy(fontFamily = FrankRuhlLibre),
        color = color,
        textAlign = textAlign,
    )
}
