"use client" import { useState } from "react" import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card" import { Button } from "@/components/ui/button" import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select" import { Download, ChevronLeft, ChevronRight, TrendingUp, Minus, TrendingDown } from "lucide-react" const financialTabs = [ { id: "key-stats", label: "Key Stats" }, { id: "income-statement", label: "Income Statement" }, { id: "balance-sheet", label: "Balance Sheet" }, { id: "cash-flow", label: "Cash Flow" }, ] const financialData = { years: ["12/31/2025", "12/31/2024", "12/31/2023", "12/31/2022", "12/31/2021"], metrics: [ { label: "Market Cap", values: ["-", "$1,291,076", "$788,551", "$385,553", "$1,042,337"], type: "currency", }, { label: "- Cash", values: ["-", "16,139", "16,398", "16,253", "17,576"], type: "number", indent: true, }, { label: "+ Debt", values: ["-", "13,623", "9,573", "5,748", "8,873"], type: "number", indent: true, }, { label: "Enterprise Value", values: ["-", "1,288,560", "781,726", "375,048", "1,033,634"], type: "currency", highlight: true, }, { label: "Revenue", values: ["92,915", "97,690", "96,773", "81,462", "53,823"], type: "currency", }, { label: "% Growth", values: ["-4.9%", "0.9%", "18.8%", "51.4%", "-"], type: "percentage", indent: true, italic: true, }, { label: "Gross Profit", values: ["15,912", "17,450", "17,660", "20,853", "13,606"], type: "currency", }, { label: "% Margin", values: ["17.1%", "17.9%", "18.2%", "25.6%", "25.3%"], type: "percentage", indent: true, italic: true, }, { label: "EBITDA", values: ["13,428", "14,708", "14,796", "17,657", "9,625"], type: "currency", }, { label: "% Margin", values: ["14.5%", "15.1%", "15.3%", "21.7%", "17.9%"], type: "percentage", indent: true, italic: true, }, { label: "Net Income", values: ["5,018", "7,130", "14,999", "12,583", "5,524"], type: "currency", }, { label: "% Margin", values: ["5.4%", "7.3%", "15.5%", "15.4%", "10.3%"], type: "percentage", indent: true, italic: true, }, { label: "EPS Diluted", values: ["3.84", "2.04", "4.31", "3.62", "1.63"], type: "number", }, { label: "% Growth", values: ["88.0%", "-52.7%", "19.1%", "122.1%", "-"], type: "percentage", indent: true, italic: true, }, { label: "Operating Cash Flow", values: ["12,484", "14,923", "13,256", "14,724", "11,497"], type: "currency", }, { label: "Capital Expenditures", values: ["-9,714", "-11,342", "-8,899", "-7,172", "-8,014"], type: "currency", }, { label: "Free Cash Flow", values: ["4,011", "3,581", "4,357", "7,552", "3,483"], type: "currency", highlight: true, }, ], } const allInsights = [ { title: "Strong EV Market Leadership Position", content: "Tesla maintains its position as the world's leading electric vehicle manufacturer with consistent delivery growth and expanding global market presence, particularly in key markets like China and Europe.", signal: "bullish", }, { title: "Autonomous Driving Technology Advancement", content: "Significant progress in Full Self-Driving capabilities and neural network improvements position Tesla ahead of traditional automakers in the autonomous vehicle race.", signal: "bullish", }, { title: "Energy Business Expansion", content: "Tesla's energy storage and solar business continues to grow, providing diversification beyond automotive and creating additional revenue streams with higher margins.", signal: "bullish", }, { title: "Market Capitalization Volatility amid Industry Events", content: "Tesla's market capitalization fluctuated dramatically from $1.04 trillion in 2021 to a low of $385.6 billion in 2022, before rebounding to over $1.29 trillion by the end of 2024.", signal: "neutral", }, { title: "Revenue Growth Stabilization", content: "Revenue growth has stabilized after the rapid expansion phase, with modest growth rates indicating market maturation in core segments.", signal: "neutral", }, { title: "Production Capacity Utilization", content: "Current production facilities are operating at high capacity, requiring significant capital investment for further expansion to meet growing demand.", signal: "neutral", }, { title: "Compressed Gross Margins Post-2022", content: "Gross profit margins declined significantly from a peak of 25.6% in 2022 to 17.9% in 2024, indicating aggressive pricing cuts and increased production costs.", signal: "bearish", }, { title: "Increased Competition in EV Market", content: "Traditional automakers and new EV startups are rapidly expanding their electric vehicle offerings, intensifying competition and potentially impacting Tesla's market share.", signal: "bearish", }, { title: "Regulatory and Policy Uncertainty", content: "Changes in government EV incentives and regulations across different markets could impact demand and profitability in key regions.", signal: "bearish", }, ] export function Financials() { const [activeFinancialTab, setActiveFinancialTab] = useState("key-stats") const [period, setPeriod] = useState("annual") const [currency, setCurrency] = useState("M") const [currentInsightIndex, setCurrentInsightIndex] = useState(0) const insightsPerPage = 3 const totalPages = Math.ceil(allInsights.length / insightsPerPage) const currentInsights = allInsights.slice(currentInsightIndex, currentInsightIndex + insightsPerPage) const nextInsights = () => { if (currentInsightIndex + insightsPerPage < allInsights.length) { setCurrentInsightIndex(currentInsightIndex + insightsPerPage) } } const prevInsights = () => { if (currentInsightIndex > 0) { setCurrentInsightIndex(Math.max(0, currentInsightIndex - insightsPerPage)) } } const getSignalStyle = (signal: string) => { switch (signal) { case "bullish": return { icon: TrendingUp, color: "text-green-500", bg: "bg-green-500/10", label: "Bullish Signal", } case "bearish": return { icon: TrendingDown, color: "text-red-500", bg: "bg-red-500/10", label: "Bearish Signal", } default: return { icon: Minus, color: "text-gray-500", bg: "bg-gray-500/10", label: "Neutral Effect", } } } return (
| {financialData.years.map((year) => ( | {year} | ))}
|---|---|
| {metric.label} | {metric.values.map((value, valueIndex) => ({value} | ))}
{insight.content}