import React from 'react'; import {RefreshCw, Send, Square} from 'lucide-react'; import {useTranslations} from '@/lib/i18n'; import IconButton from '@/components/ui/IconButton'; import Button from '@/components/ui/Button'; import Modal from '@/components/ui/Modal'; interface QSTextGeneratedPreviewProps { onClose: () => void; onRefresh: () => void; value: string; onInsert: () => void; isGenerating?: boolean; onStop?: () => void; } export default function QSTextGeneratedPreview( { onClose, onRefresh, value, onInsert, isGenerating = false, onStop, }: QSTextGeneratedPreviewProps) { const t = useTranslations(); const filteredValue: string = value.replace(/^starting\.{0,3}\s*/i, '').trim(); const hasRealContent: boolean = filteredValue.length > 0; const headerActions: React.ReactNode = isGenerating && onStop ? ( ) : ( ); const footerContent: React.ReactNode = ( ); return (
{isGenerating && !hasRealContent ? (
) : (
{filteredValue}
)}
); }