export const getReadingTime = (text: string): string => {
  if (!text) return "0 min read";

  // Remove HTML tags if present
  const cleanText = text.replace(/<[^>]+>/g, "");

  // Count words
  const words = cleanText.trim().split(/\s+/).length;

  const wordsPerMinute = 200;
  const minutes = Math.ceil(words / wordsPerMinute);

  return `${minutes} min read`;
};