import { useMessage } from "./hooks"
import type { MessageDescriptor } from "./types"

export interface LocalizedTextProps {
  message: MessageDescriptor
}

/** Renders a message descriptor as localized text without adding a DOM node. */
export function LocalizedText({ message }: LocalizedTextProps) {
  return useMessage(message)
}
