import React from 'react'; import { Box, Typography, Paper, Grid, Chip, Card, CardContent, Tooltip, useTheme, Button, List, ListItem, // ListItemIcon, // ListItemText, Divider, Avatar } from '@mui/material'; import { TrendingUp as TrendingUpIcon, Lightbulb as LightbulbIcon, Warning as WarningIcon, Speed as SpeedIcon, CheckCircle as CheckIcon, ArrowForward as ArrowIcon, Star as StarIcon, Bolt as BoltIcon, AutoAwesome as AIIcon } from '@mui/icons-material'; export interface StrategicInsight { type: string; insight: string; reasoning?: string; priority: string; estimated_impact: string; implementation_time?: string; } export interface ContentRecommendation { recommendation: string; priority: string; estimated_traffic: string; roi_estimate: string; } export interface StrategicInsightsReport { week_commencing: string; generated_at: string; metrics: { market_velocity: number; user_velocity: number; }; insights: { the_big_move: StrategicInsight; low_hanging_fruit: ContentRecommendation[]; threat_alerts: StrategicInsight[]; }; raw_data?: any; } export interface Props { report: StrategicInsightsReport; hideCreateContent?: boolean; } export const StrategicInsightsResults: React.FC = ({ report, hideCreateContent = false }) => { const { insights, metrics, week_commencing } = report; const handleCreateContent = (topic: string) => { // Logic to redirect to Blog Writer with pre-filled prompt const prompt = encodeURIComponent(`Write a high-quality blog post about "${topic}" that outperforms my competitors. Focus on unique value propositions and clear CTAs.`); window.location.href = `/blog-writer?prompt=${prompt}`; }; const PriorityChip = ({ priority }: { priority: string }) => { const isHigh = priority?.toLowerCase() === 'high'; return ( ); }; return ( Weekly Strategic Intelligence AI-generated insights for the week commencing {new Date(week_commencing).toLocaleDateString()}. MARKET VELOCITY {metrics.market_velocity} posts/wk {/* The Big Move - Hero Insight */} THE BIG MOVE {insights.the_big_move?.insight || "Analyzing market shifts..."} {insights.the_big_move?.reasoning || "We've detected a significant strategic shift in your competitive landscape. Addressing this now will give you a first-mover advantage."} {/* Low Hanging Fruit - Actionable Recommendations */} Low-Hanging Fruit Topics your competitors are starting to cover that you can easily outperform with better content. {insights.low_hanging_fruit?.slice(0, 4).map((rec, idx) => ( {rec.recommendation} Traffic: {rec.estimated_traffic} ROI: {rec.roi_estimate} {!hideCreateContent && ( )} {idx < 3 && } ))} {/* Threat Alerts */} Threat Alerts {insights.threat_alerts?.slice(0, 3).map((threat, idx) => ( {threat.type || 'Competitive Threat'} {threat.insight} ))} {!insights.threat_alerts?.length && ( No immediate threats detected this week. )} ); };