root = Card([balancesCard, recentTxCard, spendingChartCard, billsCard, vacationCard, creditScoreCard, moveMoneyCard, freezeCreditCard, statementPeriodCard, alertManagementCard, disputeCard])
balancesCard = Card([checkingBal, savingsBal, creditBal], "sunk", "row", "xs", "center", "stretch", true)
recentTxCard = Card([recentTxList], "card", "row", "xs", "start", "stretch", false)
spendingChartCard = Card([spendingPieChart], "card", "row", "xs", "start", "stretch", false)
billsCard = Card([billsList], "card", "row", "xs", "start", "stretch", false)
vacationCard = Card([vacationProgress], "card", "row", "xs", "start", "stretch", false)
creditScoreCard = Card([creditScoreTag], "card", "row", "xs", "start", "stretch", false)
moveMoneyCard = Card([moveMoneyForm], "card", "row", "xs", "start", "stretch", false)
freezeCreditCard = Card([freezeCreditButton], "card", "row", "xs", "start", "stretch", false)
statementPeriodCard = Card([statementPeriodSelect], "card", "row", "xs", "start", "stretch", false)
alertManagementCard = Card([alertTriggerForm], "card", "row", "xs", "start", "stretch", false)
disputeCard = Card([disputeBtn], "card", "row", "xs", "start", "stretch", false)
checkingBal = TextContent("Checking balance: $1,200", "large")
savingsBal = TextContent("Savings balance: $5,400", "large")
creditBal = TextContent("Credit limit: $10,000", "large")
tx1 = ListItem("Starbucks", "$15.50")
tx2 = ListItem("Amazon", "$45.00")
tx3 = ListItem("Gas Station", "$30.20")
recentTxList = ListBlock(items: [tx1, tx2, tx3])
spendingLabels = ["Food", "Travel", "Rent", "Entertainment", "Utilities"]
spendingValues = [1200, 300, 800, 200, 150]
spendingPieChart = PieChart(spendingLabels, spendingValues, "pie", "circular")
bill1 = ListItem("Electricity", "$120")
bill2 = ListItem("Internet", "$60")
billsList = ListBlock(items: [bill1, bill2])
vacationProgress = Progress(0.45, "Vacation Savings")
creditScoreTag = Tag("720", null, "lg", "success")
sourceSelect = FormControl("From account", sourceInput)
sourceInput = Select("from_account", [checkingSelect, savingsSelect, creditSelect], "Select account", null, "checking", "medium")
checkingSelect = SelectItem("Checking", "Checking")
savingsSelect = SelectItem("Savings", "Savings")
creditSelect = SelectItem("Credit", "Credit")
destSelect = FormControl("To account", destInput)
destInput = Select("to_account", [checkingSelect, savingsSelect, creditSelect], "Select account", null, "checking", "medium")
amountInput = FormControl("Amount", amountInputField)
amountInputField = Input("amount", "Enter amount", "number", ["0-9"], "")
transferBtn = Button("Transfer", null, "primary")
moveMoneyButtons = Buttons([transferBtn])
moveMoneyForm = Form("move-money", moveMoneyButtons, [sourceSelect, destSelect, amountInput])
freezeCreditButton = Button("Freeze credit line", null, "destructive")
statementPeriodSelect = FormControl("Statement period", periodSelect)
periodSelect = Select("period", ["30d", "90d", "custom"], "Select period", null, "30d", "small")
alertTriggerForm = Form("alert-settings", alertButtons, [alertCheckboxGroup])
alertCheckboxGroup = FormControl("Alert triggers", alertCheckboxGroupInput)
alertCheckboxGroupInput = CheckBoxGroup("alert_triggers", [alertOption1, alertOption2, alertOption3], null, null)
alertOption1 = CheckBoxItem("Low balance", "Notify when balance falls below $500", "low_balance", true)
alertOption2 = CheckBoxItem("High credit usage", "Notify when credit utilization > 80%", "high_usage", false)
alertOption3 = CheckBoxItem("Large transaction", "Notify for transactions over $500", "large_tx", false)
alertButtons = Buttons([saveAlertBtn, cancelAlertBtn])
saveAlertBtn = Button("Save", null, "primary")
cancelAlertBtn = Button("Cancel", null, "secondary")
disputeBtn = Button("Dispute transaction", null, "secondary")