root = Card([header, specialCallout, filterForm, drinksHeader, drinksTable, foodHeader, foodTable, hoursHeader, hoursList])
header = CardHeader("The Daily Grind", "Fresh coffee & wholesome food since 2019")
specialCallout = Callout("info", "Today's Special", "🎃 Pumpkin Spice Latte — $5.50\nHouse-made pumpkin syrup, espresso, steamed milk, whipped cream, cinnamon dust. Available all day!", true)
filterForm = Form("menu-filter", filterButtons, [filterControl])
filterButtons = Buttons([filterApply], "row")
filterApply = Button("Apply Filter", { type: "continue_conversation", context: "Filter menu to vegetarian items only" }, "primary")
filterControl = FormControl("Dietary Filter", filterChips, "Toggle to show only vegetarian items")
filterChips = Chips("diet-filter", "single", [chipAll, chipVeg], { required: false }, ["all"])
chipAll = ChipItem("all", "All Items", chipAllIcon)
chipAllIcon = Icon("list", "general")
chipVeg = ChipItem("vegetarian", "Vegetarian Only", chipVegIcon)
chipVegIcon = Icon("leaf", "nature")
drinksHeader = InlineHeader("Drinks", "Hot & cold beverages")
drinksTable = Table([drinkItemCol, drinkDescCol, drinkPriceCol, drinkVegCol])
drinkItemCol = Col("Item", drinkItems)
drinkDescCol = Col("Description", drinkDescs)
drinkPriceCol = Col("Price", drinkPrices)
drinkVegCol = Col("Veg", drinkVegFlags)
drinkItems = ["Espresso", "Cappuccino", "Latte", "Americano", "Cold Brew", "Iced Tea", "Hot Chocolate", "Matcha Latte", "Chai Latte"]
drinkDescs = ["Rich single-origin shot", "Espresso with steamed milk", "Espresso with more milk", "Espresso with hot water", "Slow-steeped 24 hours", "Fresh brewed, served cold", "Belgian chocolate, steamed milk", "Ceremonial grade matcha, oat milk", "Spiced black tea, steamed milk"]
drinkPrices = ["$3.00", "$4.50", "$5.00", "$3.50", "$4.50", "$3.50", "$5.00", "$5.50", "$5.00"]
drinkVegFlags = ["✓", "✓", "✓", "✓", "✓", "✓", "✓", "✓", "✓"]
foodHeader = InlineHeader("Food", "Breakfast, lunch & bakery")
foodTable = Table([foodItemCol, foodDescCol, foodPriceCol, foodVegCol])
foodItemCol = Col("Item", foodItems)
foodDescCol = Col("Description", foodDescs)
foodPriceCol = Col("Price", foodPrices)
foodVegCol = Col("Veg", foodVegFlags)
foodItems = ["Avocado Toast", "Breakfast Burrito", "Blueberry Pancakes", "Grilled Cheese", "Chicken Sandwich", "Caesar Salad", "Butter Croissant", "Almond Croissant", "Banana Bread"]
foodDescs = ["Sourdough, smashed avo, chili flakes, poached egg", "Scrambled eggs, black beans, cheddar, salsa", "Fluffy buttermilk, maple syrup, whipped butter", "Aged cheddar, gruyere, sourdough", "Grilled chicken, bacon, aioli, brioche bun", "Romaine, parmesan, croutons, caesar dressing", "Buttery, flaky, baked fresh daily", "Buttery croissant, almond cream filling", "Moist, walnut-studded, cream cheese frosting"]
foodPrices = ["$12.00", "$14.00", "$11.00", "$10.00", "$15.00", "$13.00", "$4.00", "$5.00", "$5.50"]
foodVegFlags = ["✓", "✗", "✓", "✓", "✗", "✗", "✓", "✓", "✓"]
hoursHeader = InlineHeader("Opening Hours", "Visit us seven days a week")
hoursList = EntityList(hoursRows, "default", hoursHeaderRow, hoursFooterRow)
hoursRows = [hrMon, hrTue, hrWed, hrThu, hrFri, hrSat, hrSun]
hrMon = { left: "Monday", right: "7:00 AM – 8:00 PM", rightVariant: "text" }
hrTue = { left: "Tuesday", right: "7:00 AM – 8:00 PM", rightVariant: "text" }
hrWed = { left: "Wednesday", right: "7:00 AM – 8:00 PM", rightVariant: "text" }
hrThu = { left: "Thursday", right: "7:00 AM – 8:00 PM", rightVariant: "text" }
hrFri = { left: "Friday", right: "7:00 AM – 9:00 PM", rightVariant: "text" }
hrSat = { left: "Saturday", right: "8:00 AM – 9:00 PM", rightVariant: "text" }
hrSun = { left: "Sunday", right: "8:00 AM – 6:00 PM", rightVariant: "text" }
hoursHeaderRow = { left: "Day", right: "Hours", rightVariant: "text" }
hoursFooterRow = { left: "Holiday Hours", right: "May vary — check Instagram", rightVariant: "text" }