import * as React from 'react'; import VideoCreator from './VideoCreator'; import { ContentScheduler } from './ContentScheduler'; import { Tabs } from './ui/Tabs'; import { AIGCSettings, AIGCVideo, ScheduledPost } from '../types'; import { useTranslation } from '../hooks/useI18n'; interface AIGCProps { aigcSettings: AIGCSettings; onVideosGenerated: (videos: AIGCVideo[]) => void; onScheduleUpdate: (schedule: ScheduledPost[]) => void; // FIX: Add onUpdateAIGCSettings to props to be passed down to VideoCreator. onUpdateAIGCSettings: (newSettings: AIGCSettings) => void; } const AIGC: React.FC = ({ aigcSettings, onVideosGenerated, onScheduleUpdate, onUpdateAIGCSettings }) => { const { t } = useTranslation(); const [activeTab, setActiveTab] = React.useState<'creator' | 'scheduler'>('creator'); const renderContent = () => { switch (activeTab) { case 'creator': // FIX: Pass the correct props to VideoCreator as its interface has changed. return case 'scheduler': return default: return null } }; const tabLabels = { creator: t('nav.aigc.creator'), scheduler: t('nav.aigc.scheduler'), }; return (
} activeTab={activeTab} labels={tabLabels} onTabClick={(tab) => setActiveTab(tab)} />
{renderContent()}
); }; export default AIGC;