import * as React from "react"; import { cn } from "@/lib/utils"; interface InputStrengthIndicatorProps { text: string; minWords: number; className?: string; } export function InputStrengthIndicator({ text, minWords, className }: InputStrengthIndicatorProps) { const wordCount = text.trim() ? text.trim().split(/\s+/).filter(Boolean).length : 0; const percentage = (wordCount / minWords) * 100; const getState = () => { if (percentage >= 100) return { level: 3, label: "Good length", color: "bg-green-500" }; if (percentage >= 33) return { level: 2, label: "Getting there", color: "bg-yellow-500" }; return { level: 1, label: "Add more detail", color: "bg-red-500" }; }; const state = getState(); return (