root = Card([header, dayNav, overview, nextPatientAlert, apptHeading, apptTable, checkinSection])
header = CardHeader("Day View", "Tuesday, June 17 · 09:45")
dayNav = Card([prevBtn, todayBtn, nextBtn], "sunk", "row", "m", "center")
prevBtn = Button("◀ Jun 16")
todayBtn = Button("Today", null, "secondary")
nextBtn = Button("Jun 18 ▶")
overview = Card([overviewHeading, overviewTable], "sunk")
overviewHeading = Heading("Today at a glance", "h3")
overviewTable = Table([metricCol, valueCol])
metricCol = Col("Metric", ["Patients expected", "No-show rate (this month)", "Rooms free right now"])
valueCol = Col("Value", ["12", "8.4%", "2 of 5"])
nextPatientAlert = Callout("info", "Next patient called out", "Sofia Anders — please proceed to Room 3 at 10:00")
apptHeading = Heading("Today's appointments", "h2")
apptTable = Table([timeCol, patientCol, roomCol, statusCol])
timeCol = Col("Time", ["09:00", "09:15", "09:30", "10:00", "10:30", "11:15", "12:00", "13:30", "14:00", "14:45", "15:30", "16:15"])
patientCol = Col("Patient", ["Marco Rossi", "Anna Schmidt", "David Chen", "Sofia Anders", "Liam Murphy", "Elena Rodriguez", "Noah Fischer", "Mia Weber", "Jonas Berg", "Clara Dubois", "Lucas Meyer", "Emma Novak"])
roomCol = Col("Room", ["3", "1", "2", "3", "4", "2", "5", "1", "4", "3", "5", "2"])
statusCol = Col("Status", ["In consultation", "In consultation", "Checked in", "Called", "Waiting", "Scheduled", "Scheduled", "Scheduled", "Scheduled", "Scheduled", "Scheduled", "Scheduled"])
checkinSection = Card([checkinHeading, checkinForm], "sunk")
checkinHeading = Heading("Check in a patient", "h3")
checkinForm = Form("check-in", checkinButtons, [patientField, roomField])
patientField = FormControl("Patient", patientSelect)
patientSelect = Select("patient", [arriving1, arriving2, arriving3], "Select an arriving patient")
arriving1 = SelectItem("Sofia Anders", "Sofia Anders — 10:00 (called)")
arriving2 = SelectItem("Liam Murphy", "Liam Murphy — 10:30")
arriving3 = SelectItem("Elena Rodriguez", "Elena Rodriguez — 11:15")
roomField = FormControl("Assign room", roomSelect, "Free rooms only")
roomSelect = Select("room", [freeRoom4, freeRoom5], "Choose a free room")
freeRoom4 = SelectItem("4", "Room 4 — free")
freeRoom5 = SelectItem("5", "Room 5 — free")
checkinButtons = Buttons([checkinBtn])
checkinBtn = Button("Check in patient", null, "primary")