root = Card([header, metricsCard, coursesTable, riskCallout, cohortSelect, engagementChart, messageForm])
header = CardHeader("Training Platform Analytics")
metricsCard = Card([activeLearners, completionRate, quizScore])
activeLearners = TextContent("1245", size "large")
completionRate = TextContent("78%", size "large")
quizScore = TextContent("85%", size "large")
coursesTable = Table([colCourse, colEnrollment])
colCourse = Col("Course", ["Course A", "Course B", "Course C", "Course D"], "string")
colEnrollment = Col("Enrollment", [1200, 800, 1500, 950], "number")
riskCallout = Callout("warning", "Learners at Risk", "5 learners")
cohortSelect = Select("cohort", [cohortA, cohortB, cohortC], "All")
cohortA = SelectItem("All", "All Cohorts")
cohortB = SelectItem("Cohort A", "Cohort A")
cohortC = SelectItem("Cohort B", "Cohort B")
engagementChart = LineChart(["W1","W2","W3","W4","W5","W6","W7","W8"], [Series("Active Learners", [1200,1300,1150,1400,1250,1350,1500,1600])], "linear", "Week", "Learners")
messageForm = Form("cohort-message", formButtons, [messageField])
messageField = FormControl("Message", messageInput)
messageInput = TextArea("msg", "Write your message", 3)
submitBtn = Button("Send", null, "primary")
cancelBtn = Button("Cancel", null, "tertiary")
formButtons = Buttons([submitBtn, cancelBtn])