export const orderDashboardApp = { name: 'order-dashboard', description: 'Dashboard showing order overview and recent orders', async render(context: any, data: any) { const { orders = [], stats = {} } = data; return ` Order Dashboard - Squarespace

📦 Order Dashboard

Total Orders
${stats.totalOrders || 0}
+${stats.ordersChange || 0}% vs last period
Total Revenue
$${stats.totalRevenue || '0.00'}
+${stats.revenueChange || 0}% vs last period
Avg Order Value
$${stats.avgOrderValue || '0.00'}
Pending Orders
${stats.pendingOrders || 0}
Recent Orders
${orders.map((order: any) => ` `).join('')}
Order # Customer Date Total Status Actions
#${order.orderNumber} ${order.customerEmail} ${new Date(order.createdOn).toLocaleDateString()} ${order.grandTotal.currency} ${order.grandTotal.value} ${order.fulfillmentStatus}
`; } };