import { RiCheckLine, RiFileCopyLine } from "@remixicon/react"; import { Button } from "@/shared/components/ui/button"; import { cn } from "@/shared/utils/ui"; type CalculatorDisplayProps = { history: string | null; expression: string; resultText: string | null; copied: boolean; onCopy: () => void; isResultView: boolean; }; const getExpressionSizeClass = (length: number, compact: boolean) => { if (compact) { if (length <= 14) return "text-2xl"; if (length <= 20) return "text-xl"; if (length <= 28) return "text-base"; return "text-sm"; } if (length <= 12) return "text-3xl"; if (length <= 18) return "text-2xl"; if (length <= 24) return "text-xl"; if (length <= 32) return "text-base"; return "text-sm"; }; export function CalculatorDisplay({ history, expression, resultText, copied, onCopy, isResultView, }: CalculatorDisplayProps) { const sizeClass = getExpressionSizeClass(expression.length, isResultView); return (