import React from 'react'; import { Box, CircularProgress, Typography } from '@mui/material'; import BlogWriterLanding from '../BlogWriterLanding'; import ManualResearchForm from '../ManualResearchForm'; interface BlogWriterLandingSectionProps { research: any; copilotKitAvailable: boolean; currentPhase: string; navigateToPhase: (phase: string) => void; onResearchComplete: (research: any) => void; onKeywordsChange?: (kw: string) => void; blogLengthRef?: React.MutableRefObject; startResearchRef?: React.MutableRefObject<((keywords: string, blogLength?: string) => Promise) | null>; restoreAttempted?: boolean; onBrainstormResult?: (result: import('../../../api/gscBrainstorm').BrainstormResult) => void; initialKeywords?: string; } const VALID_PHASES = ['research', 'outline', 'content', 'seo', 'publish']; export const BlogWriterLandingSection: React.FC = ({ research, copilotKitAvailable, currentPhase, navigateToPhase, onResearchComplete, onKeywordsChange, blogLengthRef, startResearchRef, restoreAttempted = false, onBrainstormResult, initialKeywords, }) => { if (!research) { if (currentPhase === 'research') { return ( ); } if (currentPhase === '' || !VALID_PHASES.includes(currentPhase)) { return ( { navigateToPhase('research'); }} /> ); } if (restoreAttempted) { return ( { navigateToPhase('research'); }} /> ); } return ( Restoring your work... ); } return null; };