root = Card([header, playersOnline, dailyMonthlyPlayers, revenueToday, revenuePerUser, sessionLengthChart, bestSellingItems, serverHealth, crashRateChart, liveEvents, playerReports, banAppeals, currencyInflation, experimentResults, draftPatchNotesForm, focusRegionButton, shipHotfixButton])
header = CardHeader("Live Ops Dashboard", null)
playersOnline = TextContent("Players online: 1245", "default")
colMetric = Col("Metric", ["Daily Active Players", "Monthly Active Players"], "string")
colValue = Col("Value", ["3420", "8910"], "string")
dailyMonthlyPlayers = Table([colMetric, colValue])
revenueToday = TextContent("Revenue Today: $128,400", "default")
revenuePerUser = TextContent("Revenue per User: $58", "default")
sessionSeries = Series("Session Length", [120,135,115,140,150,160,155,170,165,180,190,200,210,220])
sessionLengthChart = LineChart(["Day 1","Day 2","Day 3","Day 4","Day 5","Day 6","Day 7","Day 8","Day 9","Day 10","Day 11","Day 12","Day 13","Day 14"], [sessionSeries], "natural", "Day", "Minutes")
colItem = Col("Item", ["Sword", "Shield", "Potion", "Armor"], "string")
colUnits = Col("Units Sold", [1500,800,2300,500], "number")
bestSellingItems = Table([colItem, colUnits])
regionItemNorth = ListItem("North America", "Healthy", null, null)
regionItemEurope = ListItem("Europe", "Healthy", null, null)
regionItemAsia = ListItem("Asia", "Healthy", null, null)
regionItemSouthAmerica = ListItem("South America", "Healthy", null, null)
regionItemAfrica = ListItem("Africa", "Healthy", null, null)
serverHealth = ListBlock([regionItemNorth, regionItemEurope, regionItemAsia, regionItemSouthAmerica, regionItemAfrica], "number")
crashSeries = Series("Crash Rate", [2.5,1.8,3.2,2.0])
crashRateChart = BarChart(["v1.0","v1.1","v1.2","v1.3"], [crashSeries], "grouped", "Version", "Crash Rate (%)")
eventRunning = ListItem("Running", "Summer Festival", null, null)
eventUpcoming = ListItem("Upcoming", "Halloween Bash", null, null)
liveEvents = ListBlock([eventRunning, eventUpcoming], "number")
report1 = ListItem("Report #123", "Player name: John Doe", null, null)
report2 = ListItem("Report #124", "Player name: Jane Smith", null, null)
playerReports = ListBlock([report1, report2], "number")
appeal1 = ListItem("Appeal #56", "User: Alice", null, null)
appeal2 = ListItem("Appeal #57", "User: Bob", null, null)
banAppeals = ListBlock([appeal1, appeal2], "number")
currencyInflation = TextCallout("info", "Currency Inflation", "3.5% increase this week")
exp1 = TextCallout("info", "Experiment A", "Increased retention by 8%")
exp2 = TextCallout("info", "Experiment B", "Reduced churn by 5%")
experimentResults = Card([exp1, exp2], "clear")
noteLabel = "Patch Notes"
noteInput = TextArea("notes", "Draft notes here", 5, null, null)
noteField = FormControl(noteLabel, noteInput, "We will review and incorporate your suggestions")
submitBtn = Button("Submit", null, "primary", "normal", "medium")
cancelBtn = Button("Cancel", null, "tertiary", "normal", "medium")
formButtons = Buttons([submitBtn, cancelBtn], "column")
draftPatchNotesForm = Form("patch-notes", formButtons, [noteField])
focusRegionButton = Button("Focus Region", null, "secondary", "normal", "small")
shipHotfixButton = Button("Ship Hotfix", null, "primary", "destructive", "small")