import Link from "next/link"; import type { CSSProperties, ReactNode } from "react"; type MockVariant = "mock1" | "mock2" | "mock3" | "mock4" | "mock5" | "mock6" | "mock7" | "mock8"; type DashboardMockProps = { variant: MockVariant; }; type Concept = { title: string; shortName: string; routeName: string; premise: string; bodyClass: string; }; const concepts: Record = { mock1: { title: "Signal Docket", shortName: "Docket", routeName: "Case Tape", premise: "Active claims, confirms, contra-flow, and invalidation marks on one symbol docket.", bodyClass: "mock-court" }, mock2: { title: "Alert Queue", shortName: "Desk", routeName: "Desk Queue", premise: "Ranked live signals by urgency, source state, and tape confirmation.", bodyClass: "mock-desk" }, mock3: { title: "Replay Tape", shortName: "Replay", routeName: "Tape Review", premise: "Frame-locked replay across prints, candles, packet state, and notes.", bodyClass: "mock-theatre" }, mock4: { title: "Pressure Map", shortName: "Map", routeName: "Cross-Market", premise: "Sector heat, linked symbols, and flow clusters before single-name drilldown.", bodyClass: "mock-map" }, mock5: { title: "OPRA Intake", shortName: "Options", routeName: "OPRA", premise: "Contract tape, premium concentration, sweep shape, ask lift, and packet eligibility.", bodyClass: "mock-options" }, mock6: { title: "Packet Stack", shortName: "Packets", routeName: "Packets", premise: "Flow packets scored by options burst, tape response, venue mix, and sector echo.", bodyClass: "mock-packets" }, mock7: { title: "Alert Blotter", shortName: "Alerts", routeName: "Alerts", premise: "Smart-money alerts with trigger, read type, severity, and invalidation level.", bodyClass: "mock-alerts" }, mock8: { title: "Activity Matrix", shortName: "Matrix", routeName: "Matrix", premise: "Options, packet, alert, and market context stitched into one activity map.", bodyClass: "mock-graph" } }; const variantOrder: MockVariant[] = [ "mock1", "mock2", "mock3", "mock4", "mock5", "mock6", "mock7", "mock8" ]; const symbols = [ { symbol: "AAPL", price: "194.88", move: "+1.22%", direction: "up", score: 94, sector: "Mega cap tech" }, { symbol: "NVDA", price: "120.19", move: "-0.41%", direction: "down", score: 81, sector: "AI semis" }, { symbol: "TSLA", price: "180.72", move: "+0.72%", direction: "up", score: 76, sector: "EV complex" }, { symbol: "AMZN", price: "186.31", move: "+0.35%", direction: "up", score: 68, sector: "Consumer platform" }, { symbol: "IWM", price: "205.41", move: "+0.21%", direction: "up", score: 59, sector: "Small caps" } ]; const anomalies = [ { time: "09:41:10", symbol: "AAPL", title: "Dark sweep aligns with call pressure", value: "$4.32M", confidence: "High", direction: "Bullish", cause: "off-exchange prints led the options burst by 72s" }, { time: "09:40:58", symbol: "NVDA", title: "Call wall absorbed at 120", value: "$2.01M", confidence: "Medium", direction: "Mixed", cause: "quote lift faded after the second split sweep" }, { time: "09:39:47", symbol: "TSLA", title: "Momentum classifier fired", value: "91%", confidence: "High", direction: "Bullish", cause: "volume acceleration exceeded five-session baseline" }, { time: "09:39:12", symbol: "AMZN", title: "Large block against tape", value: "$3.67M", confidence: "Watch", direction: "Bearish", cause: "print direction diverged from sector basket" } ]; const evidence = [ ["Options", "195 C sweep", "$2.31M", "Bullish"], ["Equity", "25,000 dark buy", "$4.87M", "Bullish"], ["News", "AI update crossed", "09:40:21", "Info"], ["Tape", "Momentum burst", "+1.22%", "Bullish"], ["Venue", "Off-exchange share", "64%", "Watch"] ]; const optionRows = [ ["2m", "AAPL", "May 17 195 C", "5,240", "$2.31M", "Sweep", "Bullish"], ["3m", "AAPL", "Jun 21 200 C", "6,800", "$1.87M", "Block", "Bullish"], ["4m", "NVDA", "May 24 120 C", "9,150", "$2.01M", "Split", "Mixed"], ["5m", "TSLA", "Jul 19 205 C", "10,000", "$3.45M", "Block", "Bullish"], ["6m", "AMZN", "May 17 185 P", "4,500", "$1.20M", "Sweep", "Bearish"] ]; const health = [ ["OPRA", "healthy", "120ms"], ["CBOE", "healthy", "85ms"], ["NYSE", "degraded", "412ms"], ["News", "healthy", "1.2s"] ]; const timeline = [ ["09:36", "Baseline drift", "AAPL and QQQ correlation widens"], ["09:39", "First print", "Dark block appears before visible call lift"], ["09:41", "Signal fired", "Sweep pressure confirms the print cluster"], ["09:45", "Replay note", "Price accepted above prior liquidity shelf"] ]; const atlasGroups = [ { name: "Mega cap tech", heat: 92, flow: "+$8.4M", symbols: ["AAPL", "MSFT", "AMZN"], x: 16, y: 22 }, { name: "AI semis", heat: 81, flow: "+$5.1M", symbols: ["NVDA", "AMD", "AVGO"], x: 64, y: 26 }, { name: "Beta basket", heat: 66, flow: "+$3.8M", symbols: ["TSLA", "COIN", "PLTR"], x: 34, y: 66 }, { name: "Defensive", heat: 38, flow: "-$1.2M", symbols: ["XLU", "XLV", "PG"], x: 74, y: 70 } ]; const intakeRows = [ [ "09:41:23.420", "AAPL", "17MAY24 195C", "12,480", "$4.32M", "sweep", "61%", "+3.8σ", "candidate" ], [ "09:41:18.092", "AAPL", "21JUN24 200C", "8,920", "$2.74M", "split sweep", "58%", "+2.9σ", "join" ], [ "09:40:52.774", "QQQ", "17MAY24 458C", "19,600", "$5.10M", "block lift", "49%", "+2.1σ", "confirm" ], ["09:40:11.018", "NVDA", "24MAY24 120C", "7,340", "$2.01M", "iso sweep", "42%", "+1.7σ", "watch"], [ "09:39:47.660", "TSLA", "19JUL24 205C", "10,000", "$3.45M", "block", "38%", "+2.4σ", "candidate" ], ["09:39:12.105", "AMZN", "17MAY24 185P", "4,500", "$1.20M", "sweep", "36%", "-1.9σ", "reject"], ["09:38:59.443", "IWM", "17MAY24 205C", "14,250", "$1.92M", "multi-leg", "31%", "+1.4σ", "watch"] ]; const packetSteps = [ { label: "options burst", time: "09:41:23", weight: 92, detail: "AAPL 195C + 200C clustered inside 72s with ask-side pressure" }, { label: "equity trace", time: "09:41:48", weight: 74, detail: "25k dark buy and visible bid lift hold above 194.50" }, { label: "venue mix", time: "09:42:06", weight: 68, detail: "Off-exchange share at 64%, above session baseline by 18 points" }, { label: "sector echo", time: "09:42:31", weight: 57, detail: "QQQ confirms, semis neutral, no broad risk-off objection" }, { label: "packet ready", time: "09:42:44", weight: 86, detail: "SMP candidate: stealth accumulation into short-dated calls" } ]; const packetRows = [ ["PKT-8841", "AAPL", "ready", "5 sources", "stealth accumulation", "86"], ["PKT-8838", "TSLA", "building", "3 sources", "momentum ignition", "71"], ["PKT-8834", "NVDA", "held", "2 sources", "call wall absorption", "63"], ["PKT-8827", "AMZN", "rejected", "2 sources", "put sweep divergence", "39"] ]; const alertRows = [ [ "09:42:51", "AAPL", "SMP Alert", "stealth accumulation", "options led stock by 72s; dark share elevated", "accept above 194.50", "high" ], [ "09:41:58", "TSLA", "Ignition Watch", "momentum ignition", "block call buy plus tape acceleration", "fails below 178.80", "medium" ], [ "09:40:34", "NVDA", "Absorption", "call wall defense", "buyers absorbed at 120 but price did not expand", "rejects 120.40", "watch" ], [ "09:39:22", "AMZN", "Divergence", "put sweep against basket", "bearish premium while sector bid held", "reclaims 186.20", "low" ] ]; const graphLanes = [ { label: "Options", x1: "5%", x2: "31%", y: "18%", tone: "good", text: "195C sweep + 200C join" }, { label: "Packet", x1: "35%", x2: "60%", y: "35%", tone: "info", text: "PKT-8841 ready, 5 sources" }, { label: "Alert", x1: "63%", x2: "88%", y: "22%", tone: "accent", text: "SMP alert: stealth accumulation" }, { label: "Market", x1: "20%", x2: "82%", y: "69%", tone: "watch", text: "QQQ confirms; semis neutral" } ]; export function DashboardMock({ variant }: DashboardMockProps) { const concept = concepts[variant]; return (
{variant === "mock1" ? : null} {variant === "mock2" ? : null} {variant === "mock3" ? : null} {variant === "mock4" ? : null} {variant === "mock5" ? : null} {variant === "mock6" ? : null} {variant === "mock7" ? : null} {variant === "mock8" ? : null}
); } function MockNavigation({ active, concept }: { active: MockVariant; concept: Concept }) { return (
IF terminal studies
live tape 09:41:23 ET

{concept.routeName}

{concept.title}

{concept.premise}
); } function SignalCourt() { return (
AAPL

Dark sweep confirmed by short-dated call lift.

AAPL holds above 194.50 with options lead, elevated dark share, and QQQ support.

); } function TriageDesk() { return (
{anomalies.map((item, index) => (
{item.symbol} {item.title} {item.cause}
{item.confidence}
))}
AAPL

Dark sweep aligns with call pressure

Monitor acceptance above 194.50; invalidate on failed retest.

); } function ReplayTheatre() { return (
May 16, 2024

09:41:23 confirm window

32x
    {timeline.map(([time, title, detail]) => (
  1. {title} {detail}
  2. ))}
); } function SectorCartography() { return (
{atlasGroups.map((group) => (
{group.name} {group.flow}
))}
{atlasGroups.map((group) => (
{group.name} {group.symbols.join(" / ")}
))}
); } function OptionsIntake() { return (
{["OPRA LIVE", "ASK LIFT", "+2 SIGMA", "PACKET FIT", "AAPL"].map((item, index) => ( ))}
{["Time", "Sym", "Contract", "Qty", "Premium", "Print", "Ask", "Z", "State"].map( (item) => ( {item} ) )}
{intakeRows.map(([time, symbol, contract, size, premium, shape, ask, baseline, use]) => (
{symbol} {contract} {size} {premium} {shape} {ask} {baseline} {use}
))}
); } function PacketForensics() { return (
{packetSteps.map((step, index) => (
{step.label}

{step.detail}

{index === packetSteps.length - 1 ? "alert eligible" : `${step.weight}% weight`}
))}
{["Packet", "Sym", "State", "Sources", "Read", "Score"].map((item) => ( {item} ))}
{packetRows.map(([id, symbol, state, sources, reason, score]) => (
{id} {symbol} {state} {sources} {reason} {score}
))}
); } function AlertReasonWall() { return (
{["Time", "Sym", "Type", "Read", "Trigger", "Invalid", "Severity"].map((item) => ( {item} ))}
{alertRows.map(([time, symbol, type, reason, why, invalidation, severity]) => (
{symbol} {type} {reason}

{why}

{invalidation} {severity}
))}
); } function MarketActivityGraph() { return (
{graphLanes.map((lane) => (
{lane.label} {lane.text}
))}
OPRA intake
Packet PKT-8841
SMP alert
Market state
{[ ["OPRA", "raw contract tape"], ["Packets", "merged source stack"], ["Alerts", "SMP read + invalidation"], ["Replay", "frame audit"] ].map(([route, purpose]) => (
{route} {purpose}
))}
packet -> alert"], ["Scope", "No duplicate panes"], ["Audit", "Alert traces to OPRA source"] ]} />
); } function Panel({ className, title, children }: { className?: string; title: string; children: ReactNode; }) { return (

{title}

{children}
); } function EvidenceStack() { return (
{evidence.map(([source, title, value, tone]) => (
{source} {title}
{value} {tone}
))}
); } function ChartSketch({ density, marker }: { density: number; marker: string }) { return (
AAPL 194.88 +1.22%
); } function FlowRows({ compact = false }: { compact?: boolean }) { const rows = compact ? optionRows.slice(0, 4) : optionRows; return (
Age Symbol Contract Size Premium Read
{rows.map(([time, symbol, contract, size, premium, type, read]) => (
{time} {symbol} {contract} {size} {premium} {type}
))}
); } function FlowLadder() { return (
{["raw print", "candidate", "packet", "SMP alert"].map((item, index) => (
{index + 1} {item}
))}
); } function HealthRows() { return (
{health.map(([name, state, lag]) => (
{name} {state} {lag}
))}
); } function FactList({ items }: { items: string[][] }) { return (
{items.map(([label, value]) => (
{label}
{value}
))}
); } function ReplayRail() { return (
09:00
09:41:23 10:15
); } function Meter({ value }: { value: number }) { return ( {value} ); } function Badge({ tone, children }: { tone: string; children: ReactNode }) { const normalized = tone === "Bearish" ? "bearish" : tone === "Watch" || tone === "Mixed" ? "watch" : tone === "Info" ? "info" : "bullish"; return {children}; }