import { FormEvent } from 'react'; import { Search, Menu, TrendingUp, TrendingDown, ChevronRight, PlayCircle, BarChart3, Briefcase, Globe, Lock, Clock, PieChart, Landmark, Globe2, User, Share2, Instagram } from 'lucide-react'; const DICT: Record = { pt: { back: 'Voltar ao Canal', latest: 'MERCADOS AGORA', vip: 'CONTEÚDO PREMIUM', readTime: 'MIN', articles: [ { id: '1', title: 'A FED Sinaliza Corte Surpresa nas Taxas de Juros', excerpt: 'Mercados globais reagem com otimismo após dados de inflação abaixo do esperado nos EUA.', category: 'Mercados', time: '5', img: 'https://images.unsplash.com/photo-1611974789855-9c2a0a223690?auto=format&fit=crop&q=80&w=800' }, { id: '2', title: 'Fusões e Aquisições Atingem Recorde de $2 Trilhões', excerpt: 'Grandes bancos de investimento aceleram processos de IPO em diversos setores da economia.', category: 'Negócios', time: '8', img: 'https://images.unsplash.com/photo-1554224155-6726b3ff858f?auto=format&fit=crop&q=80&w=800' }, { id: '3', title: 'O Futuro das Energias Renováveis no Brasil', excerpt: 'Investimentos massivos em hidrogênio verde colocam o país na vanguarda da economia limpa.', category: 'Energia', time: '12', img: 'https://images.unsplash.com/photo-1460925895917-afdab827c52f?auto=format&fit=crop&q=80&w=800' } ] } }; export default function CorporateTheme({ posts = [], activeView = 'home', currentArticle, children }: { posts?: any[], activeView?: 'home' | 'article', currentArticle?: any, children?: React.ReactNode }) { const lang = 'pt'; const ui = DICT[lang] || DICT['pt']; const articlesToRender = posts && posts.length > 0 ? posts.map((p, i) => ({ id: p.slug || p.id, category: p.category_name || 'NEGÓCIOS', title: p.title, excerpt: p.excerpt, time: '5', rating: '4.9', img: p.image || `https://images.unsplash.com/photo-1611974789855-9c2a0a223690?auto=format&fit=crop&q=80&w=800&random=${i}`, content: p.content, date: new Date(p.created_at || Date.now()).toLocaleDateString('pt-BR') })) : ui.articles; const displayArticle = currentArticle ? { ...currentArticle, id: currentArticle.slug || currentArticle.id, category: currentArticle.category_name || 'NEGÓCIOS', time: '5', rating: '4.9', img: currentArticle.image || `https://images.unsplash.com/photo-1611974789855-9c2a0a223690?auto=format&fit=crop&q=80&w=800` } : articlesToRender[0]; return (
{/* Top Bar - Markets Ticker Style */}
IBOV +1.25% S&P 500 +0.85% USD/BRL -0.45% BTC +2.15% OIL -1.10%
CORPORATE TERMINAL ACTIVE v4.0
{/* Main Corporate Header */}
CORPFINANCE
{activeView === 'home' ? (
{/* Main Financial Billboard */}
Billboard
Urgente

{articlesToRender[0].title}

{articlesToRender[0].excerpt}

Análises do Dia

{[articlesToRender[1], articlesToRender[2]].map((art: any, i: number) => ( {art.category}

{art.title}

{art.time} {ui.readTime}
))}
{/* Corporate Grid with Dividers */}
{articlesToRender.slice(1, 4).map((art: any, i: number) => (
{art.title}/

{art.title}

{art.excerpt}

Ler Análise Completa →
))}
{/* Corporate Sponsor Banner */}
B2B Financial Services // SPONSOR

Gestão de Risco para Multinacionais.

Conheça as novas diretrizes de compliance global que estão transformando o setor bancário europeu.

) : ( /* --- ARTICLE VIEW --- */
← {ui.back}
{displayArticle.category}

{displayArticle.title}

{displayArticle.excerpt}

Por Analista Sênior Editoria de Mercados Globais
{displayArticle.time} {ui.readTime} Acesso Assinante
{children}
)} {/* Corporate Professional Footer */}
); }