import type { ReactNode } from 'react' import { cn } from '@/lib/utils' export interface GenerationStatusBarProps { children?: ReactNode status?: string icon?: ReactNode time?: string className?: string } function StatusWithAnimatedDots({ content }: { content: string }) { const baseText = content.replace(/\.+$/, '') return ( {baseText} ... ) } export const GenerationStatusBar = ({ children, status, icon, time, className = '', }: GenerationStatusBarProps) => { const content = status ?? (typeof children === 'string' ? children : null) const hasContent = content != null || children != null if (!hasContent && !icon && !time) return null const containerStyles = cn( 'flex w-full h-9 items-center gap-2 rounded-t-xl bg-primary-bg px-3 text-sm leading-sm', className ) return (