@burdenoff/microfe-subscriberbot 2026.624.1 → 2026.625.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/dist/subscriberbot/components/EmptyState.js +17 -10
  2. package/dist/subscriberbot/components/EmptyState.js.map +1 -1
  3. package/dist/subscriberbot/components/InvestmentCard.js +23 -22
  4. package/dist/subscriberbot/components/InvestmentCard.js.map +1 -1
  5. package/dist/subscriberbot/components/MetricsCard.js +15 -12
  6. package/dist/subscriberbot/components/MetricsCard.js.map +1 -1
  7. package/dist/subscriberbot/components/PageLayout.js +27 -15
  8. package/dist/subscriberbot/components/PageLayout.js.map +1 -1
  9. package/dist/subscriberbot/components/RatingDisplay.js +3 -3
  10. package/dist/subscriberbot/components/RatingDisplay.js.map +1 -1
  11. package/dist/subscriberbot/components/StatusBadge.js +25 -13
  12. package/dist/subscriberbot/components/StatusBadge.js.map +1 -1
  13. package/dist/subscriberbot/context/SubscriberBotContext.js.map +1 -1
  14. package/dist/subscriberbot/pages/HomePage.js +67 -63
  15. package/dist/subscriberbot/pages/HomePage.js.map +1 -1
  16. package/dist/subscriberbot/pages/admin/AdminAnalyticsPage.js +42 -42
  17. package/dist/subscriberbot/pages/admin/AdminAnalyticsPage.js.map +1 -1
  18. package/dist/subscriberbot/pages/admin/AdminDashboard.js +42 -41
  19. package/dist/subscriberbot/pages/admin/AdminDashboard.js.map +1 -1
  20. package/dist/subscriberbot/pages/admin/AdminFinancialPage.js +14 -14
  21. package/dist/subscriberbot/pages/admin/AdminFinancialPage.js.map +1 -1
  22. package/dist/subscriberbot/pages/admin/AdminOrdersPage.js +24 -24
  23. package/dist/subscriberbot/pages/admin/AdminOrdersPage.js.map +1 -1
  24. package/dist/subscriberbot/pages/admin/AdminProfilePage.js +11 -11
  25. package/dist/subscriberbot/pages/admin/AdminProfilePage.js.map +1 -1
  26. package/dist/subscriberbot/pages/admin/AdminSettingsPage.js +14 -14
  27. package/dist/subscriberbot/pages/admin/AdminSettingsPage.js.map +1 -1
  28. package/dist/subscriberbot/pages/admin/CartManagementPage.js +41 -41
  29. package/dist/subscriberbot/pages/admin/CartManagementPage.js.map +1 -1
  30. package/dist/subscriberbot/pages/admin/UserManagementPage.js +47 -47
  31. package/dist/subscriberbot/pages/admin/UserManagementPage.js.map +1 -1
  32. package/dist/subscriberbot/pages/cart-owner/AnalyticsDashboard.js +44 -44
  33. package/dist/subscriberbot/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
  34. package/dist/subscriberbot/pages/cart-owner/BusinessSettingsPage.js +17 -17
  35. package/dist/subscriberbot/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
  36. package/dist/subscriberbot/pages/cart-owner/CartOwnerDashboard.js +94 -89
  37. package/dist/subscriberbot/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
  38. package/dist/subscriberbot/pages/cart-owner/CartOwnerProfilePage.js +58 -58
  39. package/dist/subscriberbot/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
  40. package/dist/subscriberbot/pages/cart-owner/CartServiceConfigPage.js +51 -51
  41. package/dist/subscriberbot/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
  42. package/dist/subscriberbot/pages/cart-owner/InventoryManagementPage.js +54 -54
  43. package/dist/subscriberbot/pages/cart-owner/InventoryManagementPage.js.map +1 -1
  44. package/dist/subscriberbot/pages/cart-owner/OrderManagementPage.js +54 -53
  45. package/dist/subscriberbot/pages/cart-owner/OrderManagementPage.js.map +1 -1
  46. package/dist/subscriberbot/pages/cart-owner/StaffManagementPage.js +51 -51
  47. package/dist/subscriberbot/pages/cart-owner/StaffManagementPage.js.map +1 -1
  48. package/dist/subscriberbot/pages/common/HelpSupportPage.js +65 -65
  49. package/dist/subscriberbot/pages/common/HelpSupportPage.js.map +1 -1
  50. package/dist/subscriberbot/pages/common/NotificationCenterPage.js +46 -45
  51. package/dist/subscriberbot/pages/common/NotificationCenterPage.js.map +1 -1
  52. package/dist/subscriberbot/pages/common/SettingsPage.js +46 -46
  53. package/dist/subscriberbot/pages/common/SettingsPage.js.map +1 -1
  54. package/dist/subscriberbot/pages/customer/BookingDetailsPage.js +24 -23
  55. package/dist/subscriberbot/pages/customer/BookingDetailsPage.js.map +1 -1
  56. package/dist/subscriberbot/pages/customer/CartDetailPage.js +31 -30
  57. package/dist/subscriberbot/pages/customer/CartDetailPage.js.map +1 -1
  58. package/dist/subscriberbot/pages/customer/CartDiscoveryPage.js +25 -23
  59. package/dist/subscriberbot/pages/customer/CartDiscoveryPage.js.map +1 -1
  60. package/dist/subscriberbot/pages/customer/CheckoutPage.js +26 -26
  61. package/dist/subscriberbot/pages/customer/CheckoutPage.js.map +1 -1
  62. package/dist/subscriberbot/pages/customer/CustomerDashboard.js +39 -38
  63. package/dist/subscriberbot/pages/customer/CustomerDashboard.js.map +1 -1
  64. package/dist/subscriberbot/pages/customer/CustomerProfilePage.js +36 -36
  65. package/dist/subscriberbot/pages/customer/CustomerProfilePage.js.map +1 -1
  66. package/dist/subscriberbot/pages/customer/DirectServiceBookingPage.js +37 -36
  67. package/dist/subscriberbot/pages/customer/DirectServiceBookingPage.js.map +1 -1
  68. package/dist/subscriberbot/pages/customer/FavoritesPage.js +16 -15
  69. package/dist/subscriberbot/pages/customer/FavoritesPage.js.map +1 -1
  70. package/dist/subscriberbot/pages/customer/OrderHistoryPage.js +19 -17
  71. package/dist/subscriberbot/pages/customer/OrderHistoryPage.js.map +1 -1
  72. package/dist/subscriberbot/pages/customer/OrderTrackingPage.js +21 -20
  73. package/dist/subscriberbot/pages/customer/OrderTrackingPage.js.map +1 -1
  74. package/dist/subscriberbot/pages/customer/PaymentMethodsPage.js +22 -21
  75. package/dist/subscriberbot/pages/customer/PaymentMethodsPage.js.map +1 -1
  76. package/dist/subscriberbot/pages/customer/ReviewsPage.js +29 -28
  77. package/dist/subscriberbot/pages/customer/ReviewsPage.js.map +1 -1
  78. package/dist/subscriberbot/pages/customer/SavedAddressesPage.js +26 -25
  79. package/dist/subscriberbot/pages/customer/SavedAddressesPage.js.map +1 -1
  80. package/dist/subscriberbot/pages/investor/InvestmentDetailsPage.js +46 -46
  81. package/dist/subscriberbot/pages/investor/InvestmentDetailsPage.js.map +1 -1
  82. package/dist/subscriberbot/pages/investor/InvestmentOpportunitiesPage.js +34 -32
  83. package/dist/subscriberbot/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
  84. package/dist/subscriberbot/pages/investor/InvestorAnalyticsPage.js +38 -38
  85. package/dist/subscriberbot/pages/investor/InvestorAnalyticsPage.js.map +1 -1
  86. package/dist/subscriberbot/pages/investor/InvestorDashboard.js +26 -25
  87. package/dist/subscriberbot/pages/investor/InvestorDashboard.js.map +1 -1
  88. package/dist/subscriberbot/pages/investor/InvestorInvestmentsPage.js +12 -11
  89. package/dist/subscriberbot/pages/investor/InvestorInvestmentsPage.js.map +1 -1
  90. package/dist/subscriberbot/pages/investor/InvestorPortfolioPage.js +25 -25
  91. package/dist/subscriberbot/pages/investor/InvestorPortfolioPage.js.map +1 -1
  92. package/dist/subscriberbot/pages/investor/InvestorProfilePage.js +58 -58
  93. package/dist/subscriberbot/pages/investor/InvestorProfilePage.js.map +1 -1
  94. package/dist/subscriberbot/pages/worker/TaskDetailsPage.js +26 -25
  95. package/dist/subscriberbot/pages/worker/TaskDetailsPage.js.map +1 -1
  96. package/dist/subscriberbot/pages/worker/WorkerDashboard.js +48 -47
  97. package/dist/subscriberbot/pages/worker/WorkerDashboard.js.map +1 -1
  98. package/dist/subscriberbot/pages/worker/WorkerOrdersPage.js +41 -40
  99. package/dist/subscriberbot/pages/worker/WorkerOrdersPage.js.map +1 -1
  100. package/dist/subscriberbot/pages/worker/WorkerProfilePage.js +44 -44
  101. package/dist/subscriberbot/pages/worker/WorkerProfilePage.js.map +1 -1
  102. package/dist/subscriberbot/pages/worker/WorkerSchedulePage.js +32 -30
  103. package/dist/subscriberbot/pages/worker/WorkerSchedulePage.js.map +1 -1
  104. package/package.json +3 -3
@@ -63,9 +63,9 @@ var T = [
63
63
  ];
64
64
  function D(e) {
65
65
  switch (e) {
66
- case "active": return "bg-green-500/20 text-green-600 dark:text-green-400";
67
- case "pending": return "bg-yellow-500/20 text-yellow-600 dark:text-yellow-400";
68
- case "completed": return "bg-blue-500/20 text-blue-600 dark:text-blue-400";
66
+ case "active": return "bg-status-success-bg/20 text-status-success-text";
67
+ case "pending": return "bg-status-warning-bg/20 text-status-warning-text";
68
+ case "completed": return "bg-status-info-bg/20 text-status-info-text";
69
69
  default: return "bg-secondary text-secondary-foreground";
70
70
  }
71
71
  }
@@ -96,6 +96,7 @@ function O() {
96
96
  }) : /* @__PURE__ */ w(n, {
97
97
  title: `Welcome back, ${I}!`,
98
98
  description: "Here's your investment portfolio overview.",
99
+ titleGradient: !0,
99
100
  children: [/* @__PURE__ */ w("section", { children: [/* @__PURE__ */ C("h2", {
100
101
  className: "mb-4 text-lg font-semibold text-text-primary",
101
102
  children: "Portfolio Overview"
@@ -160,11 +161,11 @@ function O() {
160
161
  }), /* @__PURE__ */ w("button", {
161
162
  type: "button",
162
163
  onClick: () => alert("Filter functionality coming soon!"),
163
- className: "flex items-center gap-2 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
164
+ className: "flex items-center gap-2 rounded-lg border border-border-seam px-3 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
164
165
  children: [/* @__PURE__ */ C(h, { className: "h-4 w-4" }), "Filter"]
165
166
  })]
166
167
  }), P.length === 0 ? /* @__PURE__ */ w("div", {
167
- className: "rounded-lg border border-dashed border-border-subtle p-8 text-center",
168
+ className: "rounded-lg border border-dashed border-border-seam p-8 text-center",
168
169
  children: [
169
170
  /* @__PURE__ */ C(p, { className: "mx-auto h-12 w-12 text-text-secondary opacity-20" }),
170
171
  /* @__PURE__ */ C("p", {
@@ -179,7 +180,7 @@ function O() {
179
180
  })
180
181
  ]
181
182
  }) : P.map((e) => /* @__PURE__ */ w("div", {
182
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm hover:shadow-md transition-shadow",
183
+ className: "rounded-lg border border-border-seam bg-bg-surface p-4 shadow-sm hover:shadow-md transition-shadow",
183
184
  children: [/* @__PURE__ */ w("div", {
184
185
  className: "flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",
185
186
  children: [/* @__PURE__ */ w("div", {
@@ -203,7 +204,7 @@ function O() {
203
204
  }), /* @__PURE__ */ w("button", {
204
205
  type: "button",
205
206
  onClick: () => O(`/investor/investments/${e.id}`),
206
- className: "flex items-center gap-2 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
207
+ className: "flex items-center gap-2 rounded-lg border border-border-seam px-3 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
207
208
  children: [/* @__PURE__ */ C(m, { className: "h-4 w-4" }), "View Details"]
208
209
  })]
209
210
  }), /* @__PURE__ */ w("div", {
@@ -220,7 +221,7 @@ function O() {
220
221
  className: "text-xs text-text-secondary",
221
222
  children: "Current Value"
222
223
  }), /* @__PURE__ */ C("p", {
223
- className: "text-sm font-semibold text-green-600 dark:text-green-400",
224
+ className: "text-sm font-semibold text-status-success-text",
224
225
  children: o(e.currentValue, { minimumFractionDigits: 0 })
225
226
  })] }),
226
227
  /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
@@ -234,7 +235,7 @@ function O() {
234
235
  className: "text-xs text-text-secondary",
235
236
  children: "Growth"
236
237
  }), /* @__PURE__ */ w("p", {
237
- className: "text-sm font-semibold text-green-600 dark:text-green-400",
238
+ className: "text-sm font-semibold text-status-success-text",
238
239
  children: [e.returnsPercentage, "%"]
239
240
  })] })
240
241
  ]
@@ -274,14 +275,14 @@ function O() {
274
275
  className: "mb-4 text-lg font-semibold text-text-primary",
275
276
  children: "Recent Activity"
276
277
  }), /* @__PURE__ */ C("div", {
277
- className: "divide-y divide-border rounded-lg border border-border-subtle bg-bg-surface",
278
+ className: "divide-y divide-border rounded-lg border border-border-seam bg-bg-surface",
278
279
  children: E.map((e) => /* @__PURE__ */ w("div", {
279
280
  className: "flex items-center justify-between px-4 py-3",
280
281
  children: [/* @__PURE__ */ w("div", {
281
282
  className: "flex items-center gap-3",
282
283
  children: [/* @__PURE__ */ C("div", {
283
- className: t("flex h-8 w-8 items-center justify-center rounded-full", e.amount > 0 ? "bg-green-500/10" : "bg-bg-sunken"),
284
- children: /* @__PURE__ */ C(u, { className: t("h-4 w-4", e.amount > 0 ? "text-green-600 dark:text-green-400" : "text-text-secondary") })
284
+ className: t("flex h-8 w-8 items-center justify-center rounded-full", e.amount > 0 ? "bg-status-success-bg/10" : "bg-bg-sunken"),
285
+ children: /* @__PURE__ */ C(u, { className: t("h-4 w-4", e.amount > 0 ? "text-status-success-text" : "text-text-secondary") })
285
286
  }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
286
287
  className: "text-sm font-medium text-text-primary",
287
288
  children: e.description
@@ -294,7 +295,7 @@ function O() {
294
295
  })
295
296
  })] })]
296
297
  }), /* @__PURE__ */ w("span", {
297
- className: t("text-sm font-semibold", e.amount > 0 ? "text-green-600 dark:text-green-400" : "text-text-primary"),
298
+ className: t("text-sm font-semibold", e.amount > 0 ? "text-status-success-text" : "text-text-primary"),
298
299
  children: [e.amount > 0 ? "+" : "", o(Math.abs(e.amount), { minimumFractionDigits: 0 })]
299
300
  })]
300
301
  }, e.id))
@@ -305,17 +306,17 @@ function O() {
305
306
  className: "space-y-6",
306
307
  children: [
307
308
  /* @__PURE__ */ w("div", {
308
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4",
309
+ className: "rounded-lg border border-border-seam bg-bg-surface p-4",
309
310
  children: [/* @__PURE__ */ w("div", {
310
311
  className: "mb-3 flex items-center gap-2",
311
- children: [/* @__PURE__ */ C(_, { className: "h-5 w-5 text-yellow-500" }), /* @__PURE__ */ C("h3", {
312
+ children: [/* @__PURE__ */ C(_, { className: "h-5 w-5 text-status-warning-text" }), /* @__PURE__ */ C("h3", {
312
313
  className: "text-base font-semibold text-text-primary",
313
314
  children: "AI Insights"
314
315
  })]
315
316
  }), /* @__PURE__ */ C("div", {
316
317
  className: "space-y-3",
317
318
  children: T.map((e) => /* @__PURE__ */ w("div", {
318
- className: "rounded-lg border border-border-subtle bg-bg-sunken/50 p-3",
319
+ className: "rounded-lg border border-border-seam bg-bg-sunken/50 p-3",
319
320
  children: [/* @__PURE__ */ w("div", {
320
321
  className: "mb-1 flex items-center justify-between",
321
322
  children: [/* @__PURE__ */ C("h4", {
@@ -333,7 +334,7 @@ function O() {
333
334
  })]
334
335
  }),
335
336
  /* @__PURE__ */ w("div", {
336
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4",
337
+ className: "rounded-lg border border-border-seam bg-bg-surface p-4",
337
338
  children: [/* @__PURE__ */ C("h3", {
338
339
  className: "mb-3 text-base font-semibold text-text-primary",
339
340
  children: "Quick Actions"
@@ -343,32 +344,32 @@ function O() {
343
344
  /* @__PURE__ */ w("button", {
344
345
  type: "button",
345
346
  onClick: () => O("/investor/portfolio"),
346
- className: "flex w-full items-center gap-2 rounded-lg border border-border-subtle px-3 py-2.5 text-left text-sm font-medium text-text-primary hover:bg-accent transition-colors",
347
+ className: "flex w-full items-center gap-2 rounded-lg border border-border-seam px-3 py-2.5 text-left text-sm font-medium text-text-primary hover:bg-accent transition-colors",
347
348
  children: [/* @__PURE__ */ C(y, { className: "h-4 w-4 text-text-secondary" }), "View Full Portfolio"]
348
349
  }),
349
350
  /* @__PURE__ */ w("button", {
350
351
  type: "button",
351
352
  onClick: () => O("/investor/opportunities"),
352
- className: "flex w-full items-center gap-2 rounded-lg border border-border-subtle px-3 py-2.5 text-left text-sm font-medium text-text-primary hover:bg-accent transition-colors",
353
+ className: "flex w-full items-center gap-2 rounded-lg border border-border-seam px-3 py-2.5 text-left text-sm font-medium text-text-primary hover:bg-accent transition-colors",
353
354
  children: [/* @__PURE__ */ C(x, { className: "h-4 w-4 text-text-secondary" }), "Browse Opportunities"]
354
355
  }),
355
356
  /* @__PURE__ */ w("button", {
356
357
  type: "button",
357
358
  onClick: () => O("/investor/analytics"),
358
- className: "flex w-full items-center gap-2 rounded-lg border border-border-subtle px-3 py-2.5 text-left text-sm font-medium text-text-primary hover:bg-accent transition-colors",
359
+ className: "flex w-full items-center gap-2 rounded-lg border border-border-seam px-3 py-2.5 text-left text-sm font-medium text-text-primary hover:bg-accent transition-colors",
359
360
  children: [/* @__PURE__ */ C(f, { className: "h-4 w-4 text-text-secondary" }), "Investment Analytics"]
360
361
  }),
361
362
  /* @__PURE__ */ w("button", {
362
363
  type: "button",
363
364
  onClick: () => O("/investor/profile"),
364
- className: "flex w-full items-center gap-2 rounded-lg border border-border-subtle px-3 py-2.5 text-left text-sm font-medium text-text-primary hover:bg-accent transition-colors",
365
+ className: "flex w-full items-center gap-2 rounded-lg border border-border-seam px-3 py-2.5 text-left text-sm font-medium text-text-primary hover:bg-accent transition-colors",
365
366
  children: [/* @__PURE__ */ C(d, { className: "h-4 w-4 text-text-secondary" }), "View Profile"]
366
367
  })
367
368
  ]
368
369
  })]
369
370
  }),
370
371
  /* @__PURE__ */ w("div", {
371
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4",
372
+ className: "rounded-lg border border-border-seam bg-bg-surface p-4",
372
373
  children: [/* @__PURE__ */ C("h3", {
373
374
  className: "mb-3 text-base font-semibold text-text-primary",
374
375
  children: "Market Updates"
@@ -376,7 +377,7 @@ function O() {
376
377
  className: "space-y-3",
377
378
  children: [
378
379
  /* @__PURE__ */ w("div", {
379
- className: "border-l-4 border-green-500 pl-3",
380
+ className: "border-l-4 border-status-success-border pl-3",
380
381
  children: [/* @__PURE__ */ C("h4", {
381
382
  className: "text-xs font-semibold text-text-primary",
382
383
  children: "Mobile Services Market Growing"
@@ -386,7 +387,7 @@ function O() {
386
387
  })]
387
388
  }),
388
389
  /* @__PURE__ */ w("div", {
389
- className: "border-l-4 border-blue-500 pl-3",
390
+ className: "border-l-4 border-status-info-border pl-3",
390
391
  children: [/* @__PURE__ */ C("h4", {
391
392
  className: "text-xs font-semibold text-text-primary",
392
393
  children: "New Investment Tax Benefits"
@@ -396,7 +397,7 @@ function O() {
396
397
  })]
397
398
  }),
398
399
  /* @__PURE__ */ w("div", {
399
- className: "border-l-4 border-yellow-500 pl-3",
400
+ className: "border-l-4 border-status-warning-border pl-3",
400
401
  children: [/* @__PURE__ */ C("h4", {
401
402
  className: "text-xs font-semibold text-text-primary",
402
403
  children: "Home Services Demand Surge"
@@ -1 +1 @@
1
- {"version":3,"file":"InvestorDashboard.js","names":[],"sources":["../../../../src/subscriberbot/pages/investor/InvestorDashboard.tsx"],"sourcesContent":["/**\n * Investor Dashboard Page\n * @module subscriberbot/pages/investor\n *\n * Portfolio overview with metrics, tab navigation (portfolio/opportunities),\n * AI insights sidebar, quick actions, market updates, and recent activity.\n */\n\nimport { useState, useEffect, useMemo } from 'react';\nimport {\n Wallet,\n TrendingUp,\n PieChart,\n Briefcase,\n ArrowRight,\n Activity,\n IndianRupee,\n Target,\n Award,\n Filter,\n Eye,\n Plus,\n MapPin,\n Lightbulb,\n BarChart3,\n} from 'lucide-react';\nimport { PageLayout } from '../../components/PageLayout';\nimport { MetricsCard } from '../../components/MetricsCard';\nimport { InvestmentCard } from '../../components/InvestmentCard';\nimport { RatingDisplay } from '../../components/RatingDisplay';\nimport { useSubscriberBot } from '../../context/SubscriberBotContext';\nimport { useInvestmentOpportunities, useInvestments } from '../../hooks/useSubscriberBotApi';\nimport { cn } from '../../utils/cn';\nimport { formatCurrency } from '../../utils/formatters';\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\ninterface DashboardInvestment {\n id: string;\n cartName: string;\n cartOwner: string;\n investmentAmount: number;\n equityPercentage: number;\n investmentDate: string;\n currentValue: number;\n monthlyReturns: number;\n status: 'active' | 'pending' | 'completed';\n location: string;\n category: string;\n rating: number;\n riskLevel: 'low' | 'medium' | 'high';\n}\n\nconst mockAiInsights = [\n {\n id: '1',\n type: 'opportunity' as const,\n title: 'High-Potential Business Detected',\n description:\n 'Glow Beauty Services in Koramangala shows 95% growth potential based on location analytics and market demand.',\n confidence: 94,\n },\n {\n id: '2',\n type: 'suggestion' as const,\n title: 'Portfolio Diversification Recommended',\n description:\n 'Consider investing in Education & Skills to balance your services-heavy portfolio. Current allocation: 70% services, 30% retail.',\n confidence: 87,\n },\n {\n id: '3',\n type: 'trend' as const,\n title: 'Market Trend Alert',\n description:\n 'Health & Wellness businesses in tech hubs are experiencing 40% higher returns. Whitefield shows promising opportunities.',\n confidence: 91,\n },\n];\n\nconst mockRecentActivity = [\n {\n id: 'act-1',\n type: 'dividend',\n description: 'Dividend received from Quick Cuts Salon',\n amount: 4200,\n date: '2024-01-14T10:00:00Z',\n },\n {\n id: 'act-2',\n type: 'investment',\n description: 'Invested in Spotless Cleaning Services',\n amount: -40000,\n date: '2024-01-10T09:30:00Z',\n },\n {\n id: 'act-3',\n type: 'return',\n description: 'Returns from Fix-It Mobile Repair',\n amount: 6800,\n date: '2024-01-05T14:00:00Z',\n },\n {\n id: 'act-4',\n type: 'investment',\n description: 'Invested in Fix-It Mobile Repair',\n amount: -75000,\n date: '2023-12-20T11:00:00Z',\n },\n];\n\n// ---------------------------------------------------------------------------\n// Helpers\n// ---------------------------------------------------------------------------\n\nfunction getRiskBadgeColor(risk: string): string {\n switch (risk) {\n case 'low':\n return 'bg-green-500/20 text-green-600 dark:text-green-400';\n case 'medium':\n return 'bg-yellow-500/20 text-yellow-600 dark:text-yellow-400';\n case 'high':\n return 'bg-red-500/20 text-red-600 dark:text-red-400';\n default:\n return 'bg-secondary text-secondary-foreground';\n }\n}\n\nfunction getStatusBadgeColor(status: string): string {\n switch (status) {\n case 'active':\n return 'bg-green-500/20 text-green-600 dark:text-green-400';\n case 'pending':\n return 'bg-yellow-500/20 text-yellow-600 dark:text-yellow-400';\n case 'completed':\n return 'bg-blue-500/20 text-blue-600 dark:text-blue-400';\n default:\n return 'bg-secondary text-secondary-foreground';\n }\n}\n\n// ---------------------------------------------------------------------------\n// Component\n// ---------------------------------------------------------------------------\n\nexport function InvestorDashboard() {\n const { navigateTo, currentUser } = useSubscriberBot();\n const [activeTab, setActiveTab] = useState<'portfolio' | 'opportunities'>('portfolio');\n\n const { data: opportunities = [], isLoading: opportunitiesLoading } =\n useInvestmentOpportunities();\n const { data: investments = [], isLoading: investmentsLoading } = useInvestments(\n currentUser?.id || ''\n );\n\n const firstName = currentUser?.firstName ?? currentUser?.name ?? 'Investor';\n\n const activeOpportunities = opportunities.filter((inv) => inv.status === 'active');\n\n const portfolioSummary = useMemo(() => {\n const totalInvested = investments.reduce((sum, inv) => sum + inv.investedAmount, 0);\n const currentValue = investments.reduce((sum, inv) => sum + inv.currentValue, 0);\n const totalReturns = investments.reduce((sum, inv) => sum + inv.returns, 0);\n const monthlyIncome = totalReturns / 12; // Simple mock derivation\n const roi = totalInvested > 0 ? (totalReturns / totalInvested) * 100 : 0;\n\n return {\n totalInvested,\n currentValue,\n totalReturns,\n monthlyIncome,\n roi,\n };\n }, [investments]);\n\n if (opportunitiesLoading || investmentsLoading) {\n return (\n <PageLayout title=\"Investment Dashboard\" description=\"Loading your portfolio...\">\n <div className=\"flex items-center justify-center py-20\">\n <div className=\"text-center\">\n <div className=\"mx-auto mb-4 h-12 w-12 animate-spin rounded-full border-b-2 border-primary\" />\n <p className=\"text-sm text-text-secondary\">Loading your portfolio...</p>\n </div>\n </div>\n </PageLayout>\n );\n }\n\n return (\n <PageLayout\n title={`Welcome back, ${firstName}!`}\n description=\"Here's your investment portfolio overview.\"\n >\n {/* Portfolio Summary Metrics */}\n <section>\n <h2 className=\"mb-4 text-lg font-semibold text-text-primary\">Portfolio Overview</h2>\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4\">\n <MetricsCard\n icon={<Wallet className=\"h-5 w-5\" />}\n value={formatCurrency(portfolioSummary.totalInvested, { minimumFractionDigits: 0 })}\n label=\"Total Invested\"\n trend=\"up\"\n trendValue=\"Across all businesses\"\n />\n <MetricsCard\n icon={<IndianRupee className=\"h-5 w-5\" />}\n value={formatCurrency(portfolioSummary.currentValue, { minimumFractionDigits: 0 })}\n label=\"Current Value\"\n trend=\"up\"\n trendValue={`+${portfolioSummary.roi.toFixed(1)}%`}\n />\n <MetricsCard\n icon={<Target className=\"h-5 w-5\" />}\n value={formatCurrency(portfolioSummary.totalReturns, { minimumFractionDigits: 0 })}\n label=\"Total Returns\"\n trend=\"up\"\n trendValue=\"+15.2% this month\"\n />\n <MetricsCard\n icon={<Activity className=\"h-5 w-5\" />}\n value={formatCurrency(portfolioSummary.monthlyIncome, { minimumFractionDigits: 0 })}\n label=\"Monthly Income\"\n trend=\"up\"\n trendValue=\"+8.5% vs last month\"\n />\n </div>\n </section>\n\n {/* Main Content + Sidebar */}\n <div className=\"mt-8 grid grid-cols-1 gap-6 lg:grid-cols-3\">\n {/* Main Content */}\n <div className=\"lg:col-span-2\">\n {/* Tab Navigation */}\n <div className=\"mb-6 flex rounded-lg bg-bg-sunken p-1\">\n <button\n type=\"button\"\n onClick={() => setActiveTab('portfolio')}\n className={cn(\n 'flex-1 rounded-md px-4 py-2 text-sm font-medium transition-colors',\n activeTab === 'portfolio'\n ? 'bg-bg-surface text-text-primary shadow-sm'\n : 'text-text-secondary hover:text-text-primary'\n )}\n >\n My Investments\n </button>\n <button\n type=\"button\"\n onClick={() => setActiveTab('opportunities')}\n className={cn(\n 'flex-1 rounded-md px-4 py-2 text-sm font-medium transition-colors',\n activeTab === 'opportunities'\n ? 'bg-bg-surface text-text-primary shadow-sm'\n : 'text-text-secondary hover:text-text-primary'\n )}\n >\n New Opportunities\n </button>\n </div>\n\n {/* Portfolio Tab */}\n {activeTab === 'portfolio' && (\n <div className=\"space-y-4\">\n <div className=\"flex items-center justify-between\">\n <h3 className=\"text-base font-semibold text-text-primary\">Active Investments</h3>\n <button\n type=\"button\"\n onClick={() => alert('Filter functionality coming soon!')}\n className=\"flex items-center gap-2 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors\"\n >\n <Filter className=\"h-4 w-4\" />\n Filter\n </button>\n </div>\n\n {investments.length === 0 ? (\n <div className=\"rounded-lg border border-dashed border-border-subtle p-8 text-center\">\n <Briefcase className=\"mx-auto h-12 w-12 text-text-secondary opacity-20\" />\n <p className=\"mt-2 text-sm text-text-secondary\">No active investments found.</p>\n <button\n type=\"button\"\n onClick={() => setActiveTab('opportunities')}\n className=\"mt-4 text-sm font-medium text-primary hover:underline\"\n >\n Browse opportunities\n </button>\n </div>\n ) : (\n investments.map((investment) => (\n <div\n key={investment.id}\n className=\"rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm hover:shadow-md transition-shadow\"\n >\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between\">\n <div className=\"flex-1\">\n <div className=\"mb-2 flex flex-wrap items-center gap-2\">\n <h4 className=\"text-base font-semibold text-text-primary\">\n {investment.cartName}\n </h4>\n <span\n className={cn(\n 'rounded-full px-2 py-0.5 text-xs font-medium',\n getStatusBadgeColor(investment.status)\n )}\n >\n {investment.status}\n </span>\n </div>\n <div className=\"mb-3 flex flex-wrap items-center gap-3 text-xs text-text-secondary\">\n <span className=\"flex items-center gap-1\">\n <MapPin className=\"h-3.5 w-3.5\" />\n {'India'}\n </span>\n <span>{'Services'}</span>\n </div>\n </div>\n <button\n type=\"button\"\n onClick={() => navigateTo(`/investor/investments/${investment.id}`)}\n className=\"flex items-center gap-2 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors\"\n >\n <Eye className=\"h-4 w-4\" />\n View Details\n </button>\n </div>\n\n <div className=\"grid grid-cols-2 gap-3 sm:grid-cols-4\">\n <div>\n <p className=\"text-xs text-text-secondary\">Invested</p>\n <p className=\"text-sm font-semibold text-text-primary\">\n {formatCurrency(investment.investedAmount, { minimumFractionDigits: 0 })}\n </p>\n </div>\n <div>\n <p className=\"text-xs text-text-secondary\">Current Value</p>\n <p className=\"text-sm font-semibold text-green-600 dark:text-green-400\">\n {formatCurrency(investment.currentValue, { minimumFractionDigits: 0 })}\n </p>\n </div>\n <div>\n <p className=\"text-xs text-text-secondary\">Returns</p>\n <p className=\"text-sm font-semibold text-text-primary\">\n {formatCurrency(investment.returns, { minimumFractionDigits: 0 })}\n </p>\n </div>\n <div>\n <p className=\"text-xs text-text-secondary\">Growth</p>\n <p className=\"text-sm font-semibold text-green-600 dark:text-green-400\">\n {investment.returnsPercentage}%\n </p>\n </div>\n </div>\n </div>\n ))\n )}\n </div>\n )}\n\n {/* Opportunities Tab */}\n {activeTab === 'opportunities' && (\n <div className=\"space-y-4\">\n <div className=\"flex items-center justify-between\">\n <h3 className=\"text-base font-semibold text-text-primary\">\n Investment Opportunities\n </h3>\n <button\n type=\"button\"\n onClick={() => navigateTo('/investor/opportunities')}\n className=\"flex items-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors\"\n >\n <Plus className=\"h-4 w-4\" />\n Browse All\n </button>\n </div>\n\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2\">\n {activeOpportunities.slice(0, 2).map((opp) => (\n <InvestmentCard\n key={opp.id}\n id={opp.id}\n cartName={opp.cartName}\n targetAmount={opp.targetAmount}\n raisedAmount={opp.raisedAmount}\n expectedReturns={`${opp.expectedReturns}%`}\n riskLevel={opp.riskLevel}\n status={opp.status}\n onClick={(id) => navigateTo(`/investor/opportunities/${id}`)}\n />\n ))}\n </div>\n </div>\n )}\n\n {/* Recent Activity */}\n <section className=\"mt-8\">\n <h2 className=\"mb-4 text-lg font-semibold text-text-primary\">Recent Activity</h2>\n <div className=\"divide-y divide-border rounded-lg border border-border-subtle bg-bg-surface\">\n {mockRecentActivity.map((activity) => (\n <div key={activity.id} className=\"flex items-center justify-between px-4 py-3\">\n <div className=\"flex items-center gap-3\">\n <div\n className={cn(\n 'flex h-8 w-8 items-center justify-center rounded-full',\n activity.amount > 0 ? 'bg-green-500/10' : 'bg-bg-sunken'\n )}\n >\n <Activity\n className={cn(\n 'h-4 w-4',\n activity.amount > 0\n ? 'text-green-600 dark:text-green-400'\n : 'text-text-secondary'\n )}\n />\n </div>\n <div>\n <p className=\"text-sm font-medium text-text-primary\">{activity.description}</p>\n <p className=\"text-xs text-text-secondary\">\n {new Date(activity.date).toLocaleDateString('en-IN', {\n day: 'numeric',\n month: 'short',\n year: 'numeric',\n })}\n </p>\n </div>\n </div>\n <span\n className={cn(\n 'text-sm font-semibold',\n activity.amount > 0 ? 'text-green-600 dark:text-green-400' : 'text-text-primary'\n )}\n >\n {activity.amount > 0 ? '+' : ''}\n {formatCurrency(Math.abs(activity.amount), { minimumFractionDigits: 0 })}\n </span>\n </div>\n ))}\n </div>\n </section>\n </div>\n\n {/* Sidebar */}\n <div className=\"space-y-6\">\n {/* AI Insights */}\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-4\">\n <div className=\"mb-3 flex items-center gap-2\">\n <Lightbulb className=\"h-5 w-5 text-yellow-500\" />\n <h3 className=\"text-base font-semibold text-text-primary\">AI Insights</h3>\n </div>\n <div className=\"space-y-3\">\n {mockAiInsights.map((insight) => (\n <div key={insight.id} className=\"rounded-lg border border-border-subtle bg-bg-sunken/50 p-3\">\n <div className=\"mb-1 flex items-center justify-between\">\n <h4 className=\"text-xs font-semibold text-text-primary\">{insight.title}</h4>\n <span className=\"rounded-full bg-action-primary-bg/10 px-2 py-0.5 text-xs font-medium text-primary\">\n {insight.confidence}%\n </span>\n </div>\n <p className=\"text-xs leading-relaxed text-text-secondary\">\n {insight.description}\n </p>\n </div>\n ))}\n </div>\n </div>\n\n {/* Quick Actions */}\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-4\">\n <h3 className=\"mb-3 text-base font-semibold text-text-primary\">Quick Actions</h3>\n <div className=\"space-y-2\">\n <button\n type=\"button\"\n onClick={() => navigateTo('/investor/portfolio')}\n className=\"flex w-full items-center gap-2 rounded-lg border border-border-subtle px-3 py-2.5 text-left text-sm font-medium text-text-primary hover:bg-accent transition-colors\"\n >\n <PieChart className=\"h-4 w-4 text-text-secondary\" />\n View Full Portfolio\n </button>\n <button\n type=\"button\"\n onClick={() => navigateTo('/investor/opportunities')}\n className=\"flex w-full items-center gap-2 rounded-lg border border-border-subtle px-3 py-2.5 text-left text-sm font-medium text-text-primary hover:bg-accent transition-colors\"\n >\n <Target className=\"h-4 w-4 text-text-secondary\" />\n Browse Opportunities\n </button>\n <button\n type=\"button\"\n onClick={() => navigateTo('/investor/analytics')}\n className=\"flex w-full items-center gap-2 rounded-lg border border-border-subtle px-3 py-2.5 text-left text-sm font-medium text-text-primary hover:bg-accent transition-colors\"\n >\n <BarChart3 className=\"h-4 w-4 text-text-secondary\" />\n Investment Analytics\n </button>\n <button\n type=\"button\"\n onClick={() => navigateTo('/investor/profile')}\n className=\"flex w-full items-center gap-2 rounded-lg border border-border-subtle px-3 py-2.5 text-left text-sm font-medium text-text-primary hover:bg-accent transition-colors\"\n >\n <Award className=\"h-4 w-4 text-text-secondary\" />\n View Profile\n </button>\n </div>\n </div>\n\n {/* Market Updates */}\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-4\">\n <h3 className=\"mb-3 text-base font-semibold text-text-primary\">Market Updates</h3>\n <div className=\"space-y-3\">\n <div className=\"border-l-4 border-green-500 pl-3\">\n <h4 className=\"text-xs font-semibold text-text-primary\">\n Mobile Services Market Growing\n </h4>\n <p className=\"mt-1 text-xs leading-relaxed text-text-secondary\">\n Mobile service industry shows 35% growth in Q4 2024\n </p>\n </div>\n <div className=\"border-l-4 border-blue-500 pl-3\">\n <h4 className=\"text-xs font-semibold text-text-primary\">\n New Investment Tax Benefits\n </h4>\n <p className=\"mt-1 text-xs leading-relaxed text-text-secondary\">\n Government announces SME investment incentives\n </p>\n </div>\n <div className=\"border-l-4 border-yellow-500 pl-3\">\n <h4 className=\"text-xs font-semibold text-text-primary\">\n Home Services Demand Surge\n </h4>\n <p className=\"mt-1 text-xs leading-relaxed text-text-secondary\">\n Cleaning and maintenance businesses up 25% this quarter\n </p>\n </div>\n </div>\n </div>\n </div>\n </div>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;AAuDA,IAAM,IAAiB;CACrB;EACE,IAAI;EACJ,MAAM;EACN,OAAO;EACP,aACE;EACF,YAAY;EACb;CACD;EACE,IAAI;EACJ,MAAM;EACN,OAAO;EACP,aACE;EACF,YAAY;EACb;CACD;EACE,IAAI;EACJ,MAAM;EACN,OAAO;EACP,aACE;EACF,YAAY;EACb;CACF,EAEK,IAAqB;CACzB;EACE,IAAI;EACJ,MAAM;EACN,aAAa;EACb,QAAQ;EACR,MAAM;EACP;CACD;EACE,IAAI;EACJ,MAAM;EACN,aAAa;EACb,QAAQ;EACR,MAAM;EACP;CACD;EACE,IAAI;EACJ,MAAM;EACN,aAAa;EACb,QAAQ;EACR,MAAM;EACP;CACD;EACE,IAAI;EACJ,MAAM;EACN,aAAa;EACb,QAAQ;EACR,MAAM;EACP;CACF;AAmBD,SAAS,EAAoB,GAAwB;AACnD,SAAQ,GAAR;EACE,KAAK,SACH,QAAO;EACT,KAAK,UACH,QAAO;EACT,KAAK,YACH,QAAO;EACT,QACE,QAAO;;;AAQb,SAAgB,IAAoB;CAClC,IAAM,EAAE,eAAY,mBAAgB,GAAkB,EAChD,CAAC,GAAW,KAAgB,EAAwC,YAAY,EAEhF,EAAE,MAAM,IAAgB,EAAE,EAAE,WAAW,MAC3C,GAA4B,EACxB,EAAE,MAAM,IAAc,EAAE,EAAE,WAAW,MAAuB,EAChE,GAAa,MAAM,GACpB,EAEK,IAAY,GAAa,aAAa,GAAa,QAAQ,YAE3D,IAAsB,EAAc,QAAQ,MAAQ,EAAI,WAAW,SAAS,EAE5E,IAAmB,QAAc;EACrC,IAAM,IAAgB,EAAY,QAAQ,GAAK,MAAQ,IAAM,EAAI,gBAAgB,EAAE,EAC7E,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,GAAD,EAAQ,WAAU,+BAAgC,CAAA,EAAA,uBAE3C;;QACT,kBAAC,UAAD;SACE,MAAK;SACL,eAAe,EAAW,sBAAsB;SAChD,WAAU;mBAHZ,CAKE,kBAAC,GAAD,EAAW,WAAU,+BAAgC,CAAA,EAAA,uBAE9C;;QACT,kBAAC,UAAD;SACE,MAAK;SACL,eAAe,EAAW,oBAAoB;SAC9C,WAAU;mBAHZ,CAKE,kBAAC,GAAD,EAAO,WAAU,+BAAgC,CAAA,EAAA,eAE1C;;QACL;SACF;;KAGN,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,MAAD;OAAI,WAAU;iBAAiD;OAAmB,CAAA,EAClF,kBAAC,OAAD;OAAK,WAAU;iBAAf;QACE,kBAAC,OAAD;SAAK,WAAU;mBAAf,CACE,kBAAC,MAAD;UAAI,WAAU;oBAA0C;UAEnD,CAAA,EACL,kBAAC,KAAD;UAAG,WAAU;oBAAmD;UAE5D,CAAA,CACA;;QACN,kBAAC,OAAD;SAAK,WAAU;mBAAf,CACE,kBAAC,MAAD;UAAI,WAAU;oBAA0C;UAEnD,CAAA,EACL,kBAAC,KAAD;UAAG,WAAU;oBAAmD;UAE5D,CAAA,CACA;;QACN,kBAAC,OAAD;SAAK,WAAU;mBAAf,CACE,kBAAC,MAAD;UAAI,WAAU;oBAA0C;UAEnD,CAAA,EACL,kBAAC,KAAD;UAAG,WAAU;oBAAmD;UAE5D,CAAA,CACA;;QACF;SACF;;KACF;MACF;KACK"}
1
+ {"version":3,"file":"InvestorDashboard.js","names":[],"sources":["../../../../src/subscriberbot/pages/investor/InvestorDashboard.tsx"],"sourcesContent":["/**\n * Investor Dashboard Page\n * @module subscriberbot/pages/investor\n *\n * Portfolio overview with metrics, tab navigation (portfolio/opportunities),\n * AI insights sidebar, quick actions, market updates, and recent activity.\n */\n\nimport { useState, useEffect, useMemo } from 'react';\nimport {\n Wallet,\n TrendingUp,\n PieChart,\n Briefcase,\n ArrowRight,\n Activity,\n IndianRupee,\n Target,\n Award,\n Filter,\n Eye,\n Plus,\n MapPin,\n Lightbulb,\n BarChart3,\n} from 'lucide-react';\nimport { PageLayout } from '../../components/PageLayout';\nimport { MetricsCard } from '../../components/MetricsCard';\nimport { InvestmentCard } from '../../components/InvestmentCard';\nimport { RatingDisplay } from '../../components/RatingDisplay';\nimport { useSubscriberBot } from '../../context/SubscriberBotContext';\nimport { useInvestmentOpportunities, useInvestments } from '../../hooks/useSubscriberBotApi';\nimport { cn } from '../../utils/cn';\nimport { formatCurrency } from '../../utils/formatters';\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\ninterface DashboardInvestment {\n id: string;\n cartName: string;\n cartOwner: string;\n investmentAmount: number;\n equityPercentage: number;\n investmentDate: string;\n currentValue: number;\n monthlyReturns: number;\n status: 'active' | 'pending' | 'completed';\n location: string;\n category: string;\n rating: number;\n riskLevel: 'low' | 'medium' | 'high';\n}\n\nconst mockAiInsights = [\n {\n id: '1',\n type: 'opportunity' as const,\n title: 'High-Potential Business Detected',\n description:\n 'Glow Beauty Services in Koramangala shows 95% growth potential based on location analytics and market demand.',\n confidence: 94,\n },\n {\n id: '2',\n type: 'suggestion' as const,\n title: 'Portfolio Diversification Recommended',\n description:\n 'Consider investing in Education & Skills to balance your services-heavy portfolio. Current allocation: 70% services, 30% retail.',\n confidence: 87,\n },\n {\n id: '3',\n type: 'trend' as const,\n title: 'Market Trend Alert',\n description:\n 'Health & Wellness businesses in tech hubs are experiencing 40% higher returns. Whitefield shows promising opportunities.',\n confidence: 91,\n },\n];\n\nconst mockRecentActivity = [\n {\n id: 'act-1',\n type: 'dividend',\n description: 'Dividend received from Quick Cuts Salon',\n amount: 4200,\n date: '2024-01-14T10:00:00Z',\n },\n {\n id: 'act-2',\n type: 'investment',\n description: 'Invested in Spotless Cleaning Services',\n amount: -40000,\n date: '2024-01-10T09:30:00Z',\n },\n {\n id: 'act-3',\n type: 'return',\n description: 'Returns from Fix-It Mobile Repair',\n amount: 6800,\n date: '2024-01-05T14:00:00Z',\n },\n {\n id: 'act-4',\n type: 'investment',\n description: 'Invested in Fix-It Mobile Repair',\n amount: -75000,\n date: '2023-12-20T11:00:00Z',\n },\n];\n\n// ---------------------------------------------------------------------------\n// Helpers\n// ---------------------------------------------------------------------------\n\nfunction getRiskBadgeColor(risk: string): string {\n switch (risk) {\n case 'low':\n return 'bg-status-success-bg/20 text-status-success-text';\n case 'medium':\n return 'bg-status-warning-bg/20 text-status-warning-text';\n case 'high':\n return 'bg-status-error-bg/20 text-status-error-text';\n default:\n return 'bg-secondary text-secondary-foreground';\n }\n}\n\nfunction getStatusBadgeColor(status: string): string {\n switch (status) {\n case 'active':\n return 'bg-status-success-bg/20 text-status-success-text';\n case 'pending':\n return 'bg-status-warning-bg/20 text-status-warning-text';\n case 'completed':\n return 'bg-status-info-bg/20 text-status-info-text';\n default:\n return 'bg-secondary text-secondary-foreground';\n }\n}\n\n// ---------------------------------------------------------------------------\n// Component\n// ---------------------------------------------------------------------------\n\nexport function InvestorDashboard() {\n const { navigateTo, currentUser } = useSubscriberBot();\n const [activeTab, setActiveTab] = useState<'portfolio' | 'opportunities'>('portfolio');\n\n const { data: opportunities = [], isLoading: opportunitiesLoading } =\n useInvestmentOpportunities();\n const { data: investments = [], isLoading: investmentsLoading } = useInvestments(\n currentUser?.id || ''\n );\n\n const firstName = currentUser?.firstName ?? currentUser?.name ?? 'Investor';\n\n const activeOpportunities = opportunities.filter((inv) => inv.status === 'active');\n\n const portfolioSummary = useMemo(() => {\n const totalInvested = investments.reduce((sum, inv) => sum + inv.investedAmount, 0);\n const currentValue = investments.reduce((sum, inv) => sum + inv.currentValue, 0);\n const totalReturns = investments.reduce((sum, inv) => sum + inv.returns, 0);\n const monthlyIncome = totalReturns / 12; // Simple mock derivation\n const roi = totalInvested > 0 ? (totalReturns / totalInvested) * 100 : 0;\n\n return {\n totalInvested,\n currentValue,\n totalReturns,\n monthlyIncome,\n roi,\n };\n }, [investments]);\n\n if (opportunitiesLoading || investmentsLoading) {\n return (\n <PageLayout title=\"Investment Dashboard\" description=\"Loading your portfolio...\">\n <div className=\"flex items-center justify-center py-20\">\n <div className=\"text-center\">\n <div className=\"mx-auto mb-4 h-12 w-12 animate-spin rounded-full border-b-2 border-primary\" />\n <p className=\"text-sm text-text-secondary\">Loading your portfolio...</p>\n </div>\n </div>\n </PageLayout>\n );\n }\n\n return (\n <PageLayout\n title={`Welcome back, ${firstName}!`}\n description=\"Here's your investment portfolio overview.\"\n titleGradient\n >\n {/* Portfolio Summary Metrics */}\n <section>\n <h2 className=\"mb-4 text-lg font-semibold text-text-primary\">Portfolio Overview</h2>\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4\">\n <MetricsCard\n icon={<Wallet className=\"h-5 w-5\" />}\n value={formatCurrency(portfolioSummary.totalInvested, { minimumFractionDigits: 0 })}\n label=\"Total Invested\"\n trend=\"up\"\n trendValue=\"Across all businesses\"\n />\n <MetricsCard\n icon={<IndianRupee className=\"h-5 w-5\" />}\n value={formatCurrency(portfolioSummary.currentValue, { minimumFractionDigits: 0 })}\n label=\"Current Value\"\n trend=\"up\"\n trendValue={`+${portfolioSummary.roi.toFixed(1)}%`}\n />\n <MetricsCard\n icon={<Target className=\"h-5 w-5\" />}\n value={formatCurrency(portfolioSummary.totalReturns, { minimumFractionDigits: 0 })}\n label=\"Total Returns\"\n trend=\"up\"\n trendValue=\"+15.2% this month\"\n />\n <MetricsCard\n icon={<Activity className=\"h-5 w-5\" />}\n value={formatCurrency(portfolioSummary.monthlyIncome, { minimumFractionDigits: 0 })}\n label=\"Monthly Income\"\n trend=\"up\"\n trendValue=\"+8.5% vs last month\"\n />\n </div>\n </section>\n\n {/* Main Content + Sidebar */}\n <div className=\"mt-8 grid grid-cols-1 gap-6 lg:grid-cols-3\">\n {/* Main Content */}\n <div className=\"lg:col-span-2\">\n {/* Tab Navigation */}\n <div className=\"mb-6 flex rounded-lg bg-bg-sunken p-1\">\n <button\n type=\"button\"\n onClick={() => setActiveTab('portfolio')}\n className={cn(\n 'flex-1 rounded-md px-4 py-2 text-sm font-medium transition-colors',\n activeTab === 'portfolio'\n ? 'bg-bg-surface text-text-primary shadow-sm'\n : 'text-text-secondary hover:text-text-primary'\n )}\n >\n My Investments\n </button>\n <button\n type=\"button\"\n onClick={() => setActiveTab('opportunities')}\n className={cn(\n 'flex-1 rounded-md px-4 py-2 text-sm font-medium transition-colors',\n activeTab === 'opportunities'\n ? 'bg-bg-surface text-text-primary shadow-sm'\n : 'text-text-secondary hover:text-text-primary'\n )}\n >\n New Opportunities\n </button>\n </div>\n\n {/* Portfolio Tab */}\n {activeTab === 'portfolio' && (\n <div className=\"space-y-4\">\n <div className=\"flex items-center justify-between\">\n <h3 className=\"text-base font-semibold text-text-primary\">Active Investments</h3>\n <button\n type=\"button\"\n onClick={() => alert('Filter functionality coming soon!')}\n className=\"flex items-center gap-2 rounded-lg border border-border-seam px-3 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors\"\n >\n <Filter className=\"h-4 w-4\" />\n Filter\n </button>\n </div>\n\n {investments.length === 0 ? (\n <div className=\"rounded-lg border border-dashed border-border-seam p-8 text-center\">\n <Briefcase className=\"mx-auto h-12 w-12 text-text-secondary opacity-20\" />\n <p className=\"mt-2 text-sm text-text-secondary\">No active investments found.</p>\n <button\n type=\"button\"\n onClick={() => setActiveTab('opportunities')}\n className=\"mt-4 text-sm font-medium text-primary hover:underline\"\n >\n Browse opportunities\n </button>\n </div>\n ) : (\n investments.map((investment) => (\n <div\n key={investment.id}\n className=\"rounded-lg border border-border-seam bg-bg-surface p-4 shadow-sm hover:shadow-md transition-shadow\"\n >\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between\">\n <div className=\"flex-1\">\n <div className=\"mb-2 flex flex-wrap items-center gap-2\">\n <h4 className=\"text-base font-semibold text-text-primary\">\n {investment.cartName}\n </h4>\n <span\n className={cn(\n 'rounded-full px-2 py-0.5 text-xs font-medium',\n getStatusBadgeColor(investment.status)\n )}\n >\n {investment.status}\n </span>\n </div>\n <div className=\"mb-3 flex flex-wrap items-center gap-3 text-xs text-text-secondary\">\n <span className=\"flex items-center gap-1\">\n <MapPin className=\"h-3.5 w-3.5\" />\n {'India'}\n </span>\n <span>{'Services'}</span>\n </div>\n </div>\n <button\n type=\"button\"\n onClick={() => navigateTo(`/investor/investments/${investment.id}`)}\n className=\"flex items-center gap-2 rounded-lg border border-border-seam px-3 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors\"\n >\n <Eye className=\"h-4 w-4\" />\n View Details\n </button>\n </div>\n\n <div className=\"grid grid-cols-2 gap-3 sm:grid-cols-4\">\n <div>\n <p className=\"text-xs text-text-secondary\">Invested</p>\n <p className=\"text-sm font-semibold text-text-primary\">\n {formatCurrency(investment.investedAmount, { minimumFractionDigits: 0 })}\n </p>\n </div>\n <div>\n <p className=\"text-xs text-text-secondary\">Current Value</p>\n <p className=\"text-sm font-semibold text-status-success-text\">\n {formatCurrency(investment.currentValue, { minimumFractionDigits: 0 })}\n </p>\n </div>\n <div>\n <p className=\"text-xs text-text-secondary\">Returns</p>\n <p className=\"text-sm font-semibold text-text-primary\">\n {formatCurrency(investment.returns, { minimumFractionDigits: 0 })}\n </p>\n </div>\n <div>\n <p className=\"text-xs text-text-secondary\">Growth</p>\n <p className=\"text-sm font-semibold text-status-success-text\">\n {investment.returnsPercentage}%\n </p>\n </div>\n </div>\n </div>\n ))\n )}\n </div>\n )}\n\n {/* Opportunities Tab */}\n {activeTab === 'opportunities' && (\n <div className=\"space-y-4\">\n <div className=\"flex items-center justify-between\">\n <h3 className=\"text-base font-semibold text-text-primary\">\n Investment Opportunities\n </h3>\n <button\n type=\"button\"\n onClick={() => navigateTo('/investor/opportunities')}\n className=\"flex items-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors\"\n >\n <Plus className=\"h-4 w-4\" />\n Browse All\n </button>\n </div>\n\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2\">\n {activeOpportunities.slice(0, 2).map((opp) => (\n <InvestmentCard\n key={opp.id}\n id={opp.id}\n cartName={opp.cartName}\n targetAmount={opp.targetAmount}\n raisedAmount={opp.raisedAmount}\n expectedReturns={`${opp.expectedReturns}%`}\n riskLevel={opp.riskLevel}\n status={opp.status}\n onClick={(id) => navigateTo(`/investor/opportunities/${id}`)}\n />\n ))}\n </div>\n </div>\n )}\n\n {/* Recent Activity */}\n <section className=\"mt-8\">\n <h2 className=\"mb-4 text-lg font-semibold text-text-primary\">Recent Activity</h2>\n <div className=\"divide-y divide-border rounded-lg border border-border-seam bg-bg-surface\">\n {mockRecentActivity.map((activity) => (\n <div key={activity.id} className=\"flex items-center justify-between px-4 py-3\">\n <div className=\"flex items-center gap-3\">\n <div\n className={cn(\n 'flex h-8 w-8 items-center justify-center rounded-full',\n activity.amount > 0 ? 'bg-status-success-bg/10' : 'bg-bg-sunken'\n )}\n >\n <Activity\n className={cn(\n 'h-4 w-4',\n activity.amount > 0 ? 'text-status-success-text' : 'text-text-secondary'\n )}\n />\n </div>\n <div>\n <p className=\"text-sm font-medium text-text-primary\">\n {activity.description}\n </p>\n <p className=\"text-xs text-text-secondary\">\n {new Date(activity.date).toLocaleDateString('en-IN', {\n day: 'numeric',\n month: 'short',\n year: 'numeric',\n })}\n </p>\n </div>\n </div>\n <span\n className={cn(\n 'text-sm font-semibold',\n activity.amount > 0 ? 'text-status-success-text' : 'text-text-primary'\n )}\n >\n {activity.amount > 0 ? '+' : ''}\n {formatCurrency(Math.abs(activity.amount), { minimumFractionDigits: 0 })}\n </span>\n </div>\n ))}\n </div>\n </section>\n </div>\n\n {/* Sidebar */}\n <div className=\"space-y-6\">\n {/* AI Insights */}\n <div className=\"rounded-lg border border-border-seam bg-bg-surface p-4\">\n <div className=\"mb-3 flex items-center gap-2\">\n <Lightbulb className=\"h-5 w-5 text-status-warning-text\" />\n <h3 className=\"text-base font-semibold text-text-primary\">AI Insights</h3>\n </div>\n <div className=\"space-y-3\">\n {mockAiInsights.map((insight) => (\n <div\n key={insight.id}\n className=\"rounded-lg border border-border-seam bg-bg-sunken/50 p-3\"\n >\n <div className=\"mb-1 flex items-center justify-between\">\n <h4 className=\"text-xs font-semibold text-text-primary\">{insight.title}</h4>\n <span className=\"rounded-full bg-action-primary-bg/10 px-2 py-0.5 text-xs font-medium text-primary\">\n {insight.confidence}%\n </span>\n </div>\n <p className=\"text-xs leading-relaxed text-text-secondary\">\n {insight.description}\n </p>\n </div>\n ))}\n </div>\n </div>\n\n {/* Quick Actions */}\n <div className=\"rounded-lg border border-border-seam bg-bg-surface p-4\">\n <h3 className=\"mb-3 text-base font-semibold text-text-primary\">Quick Actions</h3>\n <div className=\"space-y-2\">\n <button\n type=\"button\"\n onClick={() => navigateTo('/investor/portfolio')}\n className=\"flex w-full items-center gap-2 rounded-lg border border-border-seam px-3 py-2.5 text-left text-sm font-medium text-text-primary hover:bg-accent transition-colors\"\n >\n <PieChart className=\"h-4 w-4 text-text-secondary\" />\n View Full Portfolio\n </button>\n <button\n type=\"button\"\n onClick={() => navigateTo('/investor/opportunities')}\n className=\"flex w-full items-center gap-2 rounded-lg border border-border-seam px-3 py-2.5 text-left text-sm font-medium text-text-primary hover:bg-accent transition-colors\"\n >\n <Target className=\"h-4 w-4 text-text-secondary\" />\n Browse Opportunities\n </button>\n <button\n type=\"button\"\n onClick={() => navigateTo('/investor/analytics')}\n className=\"flex w-full items-center gap-2 rounded-lg border border-border-seam px-3 py-2.5 text-left text-sm font-medium text-text-primary hover:bg-accent transition-colors\"\n >\n <BarChart3 className=\"h-4 w-4 text-text-secondary\" />\n Investment Analytics\n </button>\n <button\n type=\"button\"\n onClick={() => navigateTo('/investor/profile')}\n className=\"flex w-full items-center gap-2 rounded-lg border border-border-seam px-3 py-2.5 text-left text-sm font-medium text-text-primary hover:bg-accent transition-colors\"\n >\n <Award className=\"h-4 w-4 text-text-secondary\" />\n View Profile\n </button>\n </div>\n </div>\n\n {/* Market Updates */}\n <div className=\"rounded-lg border border-border-seam bg-bg-surface p-4\">\n <h3 className=\"mb-3 text-base font-semibold text-text-primary\">Market Updates</h3>\n <div className=\"space-y-3\">\n <div className=\"border-l-4 border-status-success-border pl-3\">\n <h4 className=\"text-xs font-semibold text-text-primary\">\n Mobile Services Market Growing\n </h4>\n <p className=\"mt-1 text-xs leading-relaxed text-text-secondary\">\n Mobile service industry shows 35% growth in Q4 2024\n </p>\n </div>\n <div className=\"border-l-4 border-status-info-border pl-3\">\n <h4 className=\"text-xs font-semibold text-text-primary\">\n New Investment Tax Benefits\n </h4>\n <p className=\"mt-1 text-xs leading-relaxed text-text-secondary\">\n Government announces SME investment incentives\n </p>\n </div>\n <div className=\"border-l-4 border-status-warning-border pl-3\">\n <h4 className=\"text-xs font-semibold text-text-primary\">\n Home Services Demand Surge\n </h4>\n <p className=\"mt-1 text-xs leading-relaxed text-text-secondary\">\n Cleaning and maintenance businesses up 25% this quarter\n </p>\n </div>\n </div>\n </div>\n </div>\n </div>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;AAuDA,IAAM,IAAiB;CACrB;EACE,IAAI;EACJ,MAAM;EACN,OAAO;EACP,aACE;EACF,YAAY;EACb;CACD;EACE,IAAI;EACJ,MAAM;EACN,OAAO;EACP,aACE;EACF,YAAY;EACb;CACD;EACE,IAAI;EACJ,MAAM;EACN,OAAO;EACP,aACE;EACF,YAAY;EACb;CACF,EAEK,IAAqB;CACzB;EACE,IAAI;EACJ,MAAM;EACN,aAAa;EACb,QAAQ;EACR,MAAM;EACP;CACD;EACE,IAAI;EACJ,MAAM;EACN,aAAa;EACb,QAAQ;EACR,MAAM;EACP;CACD;EACE,IAAI;EACJ,MAAM;EACN,aAAa;EACb,QAAQ;EACR,MAAM;EACP;CACD;EACE,IAAI;EACJ,MAAM;EACN,aAAa;EACb,QAAQ;EACR,MAAM;EACP;CACF;AAmBD,SAAS,EAAoB,GAAwB;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,kBAAC,KAAD;UAAG,WAAU;oBAAmD;UAE5D,CAAA,CACA;;QACN,kBAAC,OAAD;SAAK,WAAU;mBAAf,CACE,kBAAC,MAAD;UAAI,WAAU;oBAA0C;UAEnD,CAAA,EACL,kBAAC,KAAD;UAAG,WAAU;oBAAmD;UAE5D,CAAA,CACA;;QACF;SACF;;KACF;MACF;KACK"}
@@ -95,9 +95,9 @@ var x = [
95
95
  };
96
96
  function C(e) {
97
97
  switch (e) {
98
- case "active": return "bg-green-500/20 text-green-600 dark:text-green-400";
99
- case "pending": return "bg-yellow-500/20 text-yellow-600 dark:text-yellow-400";
100
- case "matured": return "bg-blue-500/20 text-blue-600 dark:text-blue-400";
98
+ case "active": return "bg-status-success-bg/20 text-status-success-text";
99
+ case "pending": return "bg-status-warning-bg/20 text-status-warning-text";
100
+ case "matured": return "bg-status-info-bg/20 text-status-info-text";
101
101
  case "withdrawn": return "bg-secondary text-secondary-foreground";
102
102
  default: return "bg-secondary text-secondary-foreground";
103
103
  }
@@ -194,7 +194,7 @@ function T() {
194
194
  ]
195
195
  }),
196
196
  /* @__PURE__ */ y("div", {
197
- className: "mt-6 rounded-lg border border-border-subtle bg-bg-surface p-4",
197
+ className: "mt-6 rounded-lg border border-border-seam bg-bg-surface p-4",
198
198
  children: /* @__PURE__ */ y("div", {
199
199
  className: "flex flex-wrap gap-2",
200
200
  children: k.map((e) => /* @__PURE__ */ b("button", {
@@ -211,7 +211,7 @@ function T() {
211
211
  /* @__PURE__ */ y("div", {
212
212
  className: "mt-6 space-y-4",
213
213
  children: O.length > 0 ? O.map((e) => /* @__PURE__ */ b("div", {
214
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 sm:p-6",
214
+ className: "rounded-lg border border-border-seam bg-bg-surface p-4 sm:p-6",
215
215
  children: [/* @__PURE__ */ b("div", {
216
216
  className: "block space-y-4 lg:hidden",
217
217
  children: [
@@ -252,7 +252,7 @@ function T() {
252
252
  className: "text-sm text-text-secondary",
253
253
  children: "P&L"
254
254
  }), /* @__PURE__ */ b("p", {
255
- className: t("font-semibold", e.profitLoss >= 0 ? "text-green-600 dark:text-green-400" : "text-red-600 dark:text-red-400"),
255
+ className: t("font-semibold", e.profitLoss >= 0 ? "text-status-success-text" : "text-status-error-text"),
256
256
  children: [
257
257
  e.profitLoss >= 0 ? "+" : "",
258
258
  a(e.profitLoss, { minimumFractionDigits: 0 }),
@@ -272,7 +272,7 @@ function T() {
272
272
  ]
273
273
  }),
274
274
  /* @__PURE__ */ b("div", {
275
- className: "flex items-center justify-between border-t border-border-subtle pt-2",
275
+ className: "flex items-center justify-between border-t border-border-seam pt-2",
276
276
  children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
277
277
  className: "text-xs text-text-secondary",
278
278
  children: "Invested on"
@@ -285,7 +285,7 @@ function T() {
285
285
  })] }), /* @__PURE__ */ b("button", {
286
286
  type: "button",
287
287
  onClick: () => u(`/investor/investments/${e.id}`),
288
- className: "flex items-center gap-2 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
288
+ className: "flex items-center gap-2 rounded-lg border border-border-seam px-3 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
289
289
  children: [/* @__PURE__ */ y(p, { className: "h-4 w-4" }), "View Details"]
290
290
  })]
291
291
  })
@@ -335,11 +335,11 @@ function T() {
335
335
  children: "P&L"
336
336
  }),
337
337
  /* @__PURE__ */ b("p", {
338
- className: t("font-semibold", e.profitLoss >= 0 ? "text-green-600 dark:text-green-400" : "text-red-600 dark:text-red-400"),
338
+ className: t("font-semibold", e.profitLoss >= 0 ? "text-status-success-text" : "text-status-error-text"),
339
339
  children: [e.profitLoss >= 0 ? "+" : "", a(e.profitLoss, { minimumFractionDigits: 0 })]
340
340
  }),
341
341
  /* @__PURE__ */ b("p", {
342
- className: t("text-xs", e.profitLoss >= 0 ? "text-green-600 dark:text-green-400" : "text-red-600 dark:text-red-400"),
342
+ className: t("text-xs", e.profitLoss >= 0 ? "text-status-success-text" : "text-status-error-text"),
343
343
  children: [
344
344
  "(",
345
345
  e.profitLossPercentage >= 0 ? "+" : "",
@@ -373,12 +373,13 @@ function T() {
373
373
  children: /* @__PURE__ */ b("button", {
374
374
  type: "button",
375
375
  onClick: () => u(`/investor/investments/${e.id}`),
376
- className: "flex items-center gap-2 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
376
+ className: "flex items-center gap-2 rounded-lg border border-border-seam px-3 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
377
377
  children: [/* @__PURE__ */ y(p, { className: "h-4 w-4" }), "View Details"]
378
378
  })
379
379
  })]
380
380
  })]
381
381
  }, e.id)) : /* @__PURE__ */ y(i, {
382
+ illustration: "empty-data",
382
383
  icon: /* @__PURE__ */ y(g, { className: "h-12 w-12" }),
383
384
  title: `No ${E === "all" ? "" : E} investments found`,
384
385
  description: E === "all" ? "You haven't made any investments yet. Start exploring opportunities to grow your wealth." : `You don't have any ${E} investments at the moment.`,
@@ -1 +1 @@
1
- {"version":3,"file":"InvestorInvestmentsPage.js","names":[],"sources":["../../../../src/subscriberbot/pages/investor/InvestorInvestmentsPage.tsx"],"sourcesContent":["/**\n * Investor Investments Page\n * @module subscriberbot/pages/investor\n *\n * MetricsGrid summary cards, filter tabs (all/active/pending/matured) with counts,\n * responsive mobile/desktop layouts, P&L display, ROI display, status icons,\n * empty state.\n */\n\nimport { useState, useEffect, useMemo } from 'react';\nimport {\n TrendingUp,\n TrendingDown,\n Briefcase,\n Eye,\n BarChart3,\n AlertCircle,\n CheckCircle2,\n Clock,\n Wallet,\n IndianRupee,\n Plus,\n Target,\n} from 'lucide-react';\nimport { PageLayout } from '../../components/PageLayout';\nimport { MetricsCard } from '../../components/MetricsCard';\nimport { EmptyState } from '../../components/EmptyState';\nimport { useSubscriberBot } from '../../context/SubscriberBotContext';\nimport { cn } from '../../utils/cn';\nimport { formatCurrency, formatDate } from '../../utils/formatters';\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\ninterface Investment {\n id: string;\n cartName: string;\n cartOwner: string;\n investmentAmount: number;\n currentValue: number;\n profitLoss: number;\n profitLossPercentage: number;\n investmentDate: string;\n status: 'active' | 'pending' | 'matured' | 'withdrawn';\n roiAnnual: number;\n duration: string;\n nextPayout: string;\n totalReturns: number;\n}\n\ninterface InvestmentSummary {\n totalInvested: number;\n currentValue: number;\n totalReturns: number;\n activeInvestments: number;\n averageRoi: number;\n profitLoss: number;\n profitLossPercentage: number;\n}\n\ntype FilterKey = 'all' | 'active' | 'pending' | 'matured';\n\n// ---------------------------------------------------------------------------\n// Mock data\n// ---------------------------------------------------------------------------\n\nconst mockInvestments: Investment[] = [\n {\n id: 'inv-001',\n cartName: 'South Indian Express',\n cartOwner: 'Raj Kumar',\n investmentAmount: 50000,\n currentValue: 58500,\n profitLoss: 8500,\n profitLossPercentage: 17.0,\n investmentDate: '2024-01-15',\n status: 'active',\n roiAnnual: 22.5,\n duration: '18 months',\n nextPayout: '2024-12-15',\n totalReturns: 8500,\n },\n {\n id: 'inv-002',\n cartName: 'Pizza Corner',\n cartOwner: 'Priya Singh',\n investmentAmount: 75000,\n currentValue: 82000,\n profitLoss: 7000,\n profitLossPercentage: 9.3,\n investmentDate: '2024-03-10',\n status: 'active',\n roiAnnual: 18.0,\n duration: '24 months',\n nextPayout: '2024-12-10',\n totalReturns: 7000,\n },\n {\n id: 'inv-003',\n cartName: 'Healthy Bites',\n cartOwner: 'Amit Patel',\n investmentAmount: 30000,\n currentValue: 31200,\n profitLoss: 1200,\n profitLossPercentage: 4.0,\n investmentDate: '2024-06-01',\n status: 'active',\n roiAnnual: 15.0,\n duration: '12 months',\n nextPayout: '2024-12-01',\n totalReturns: 1200,\n },\n {\n id: 'inv-004',\n cartName: 'Street Food Junction',\n cartOwner: 'Neha Sharma',\n investmentAmount: 40000,\n currentValue: 40000,\n profitLoss: 0,\n profitLossPercentage: 0,\n investmentDate: '2024-08-15',\n status: 'pending',\n roiAnnual: 20.0,\n duration: '15 months',\n nextPayout: '2025-01-15',\n totalReturns: 0,\n },\n {\n id: 'inv-005',\n cartName: 'Biryani House',\n cartOwner: 'Suresh Reddy',\n investmentAmount: 60000,\n currentValue: 72000,\n profitLoss: 12000,\n profitLossPercentage: 20.0,\n investmentDate: '2023-12-01',\n status: 'matured',\n roiAnnual: 25.0,\n duration: '12 months',\n nextPayout: '-',\n totalReturns: 12000,\n },\n];\n\nconst mockSummary: InvestmentSummary = {\n totalInvested: 255000,\n currentValue: 283700,\n totalReturns: 28700,\n activeInvestments: 3,\n averageRoi: 19.6,\n profitLoss: 28700,\n profitLossPercentage: 11.3,\n};\n\n// ---------------------------------------------------------------------------\n// Helpers\n// ---------------------------------------------------------------------------\n\nfunction getStatusColor(status: string): string {\n switch (status) {\n case 'active':\n return 'bg-green-500/20 text-green-600 dark:text-green-400';\n case 'pending':\n return 'bg-yellow-500/20 text-yellow-600 dark:text-yellow-400';\n case 'matured':\n return 'bg-blue-500/20 text-blue-600 dark:text-blue-400';\n case 'withdrawn':\n return 'bg-secondary text-secondary-foreground';\n default:\n return 'bg-secondary text-secondary-foreground';\n }\n}\n\nfunction getStatusIcon(status: string) {\n switch (status) {\n case 'active':\n return <CheckCircle2 className=\"h-4 w-4\" />;\n case 'pending':\n return <Clock className=\"h-4 w-4\" />;\n case 'matured':\n return <CheckCircle2 className=\"h-4 w-4\" />;\n default:\n return <AlertCircle className=\"h-4 w-4\" />;\n }\n}\n\n// ---------------------------------------------------------------------------\n// Component\n// ---------------------------------------------------------------------------\n\nexport function InvestorInvestmentsPage() {\n const { navigateTo } = useSubscriberBot();\n const [isLoading, setIsLoading] = useState(true);\n const [filter, setFilter] = useState<FilterKey>('all');\n\n useEffect(() => {\n const timer = setTimeout(() => setIsLoading(false), 600);\n return () => clearTimeout(timer);\n }, []);\n\n const filteredInvestments = useMemo(() => {\n if (filter === 'all') return mockInvestments;\n return mockInvestments.filter((inv) => inv.status === filter);\n }, [filter]);\n\n const filterTabs: Array<{ key: FilterKey; label: string }> = [\n { key: 'all', label: 'All Investments' },\n { key: 'active', label: 'Active' },\n { key: 'pending', label: 'Pending' },\n { key: 'matured', label: 'Matured' },\n ];\n\n function getCount(key: FilterKey): number {\n if (key === 'all') return mockInvestments.length;\n return mockInvestments.filter((inv) => inv.status === key).length;\n }\n\n if (isLoading) {\n return (\n <PageLayout title=\"My Investments\" description=\"Loading your investments...\">\n <div className=\"flex items-center justify-center py-20\">\n <div className=\"text-center\">\n <div className=\"mx-auto mb-4 h-12 w-12 animate-spin rounded-full border-b-2 border-primary\" />\n <p className=\"text-sm text-text-secondary\">Loading your investments...</p>\n </div>\n </div>\n </PageLayout>\n );\n }\n\n return (\n <PageLayout\n title=\"My Investments\"\n description=\"Track and manage your investment portfolio\"\n actions={\n <button\n type=\"button\"\n onClick={() => navigateTo('/investor/opportunities')}\n className=\"flex items-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors\"\n >\n <Plus className=\"h-4 w-4\" />\n New Investment\n </button>\n }\n >\n {/* Investment Summary */}\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4\">\n <MetricsCard\n icon={<Wallet className=\"h-5 w-5\" />}\n value={formatCurrency(mockSummary.totalInvested, { minimumFractionDigits: 0 })}\n label=\"Total Invested\"\n trend=\"up\"\n trendValue=\"Total amount invested\"\n />\n <MetricsCard\n icon={<IndianRupee className=\"h-5 w-5\" />}\n value={formatCurrency(mockSummary.currentValue, { minimumFractionDigits: 0 })}\n label=\"Current Value\"\n trend={mockSummary.profitLoss > 0 ? 'up' : 'down'}\n trendValue={`${mockSummary.profitLossPercentage > 0 ? '+' : ''}${mockSummary.profitLossPercentage}% total returns`}\n />\n <MetricsCard\n icon={<TrendingUp className=\"h-5 w-5\" />}\n value={formatCurrency(mockSummary.totalReturns, { minimumFractionDigits: 0 })}\n label=\"Total Returns\"\n trend=\"up\"\n trendValue=\"Total profit earned\"\n />\n <MetricsCard\n icon={<CheckCircle2 className=\"h-5 w-5\" />}\n value={String(mockSummary.activeInvestments)}\n label=\"Active Investments\"\n trend=\"neutral\"\n trendValue={`${mockSummary.averageRoi}% avg ROI`}\n />\n </div>\n\n {/* Filter Tabs */}\n <div className=\"mt-6 rounded-lg border border-border-subtle bg-bg-surface p-4\">\n <div className=\"flex flex-wrap gap-2\">\n {filterTabs.map((tab) => (\n <button\n key={tab.key}\n type=\"button\"\n onClick={() => setFilter(tab.key)}\n className={cn(\n 'flex items-center gap-2 rounded-lg px-4 py-2 text-sm font-medium transition-colors',\n filter === tab.key\n ? 'bg-action-primary-bg text-action-primary-text'\n : 'bg-bg-sunken text-text-primary hover:bg-bg-sunken/80'\n )}\n >\n {tab.label}\n <span\n className={cn(\n 'rounded-full px-2 py-0.5 text-xs',\n filter === tab.key\n ? 'bg-primary-foreground/20 text-action-primary-text'\n : 'bg-action-primary-bg/10 text-primary'\n )}\n >\n {getCount(tab.key)}\n </span>\n </button>\n ))}\n </div>\n </div>\n\n {/* Investments List */}\n <div className=\"mt-6 space-y-4\">\n {filteredInvestments.length > 0 ? (\n filteredInvestments.map((investment) => (\n <div key={investment.id} className=\"rounded-lg border border-border-subtle bg-bg-surface p-4 sm:p-6\">\n {/* Mobile Layout */}\n <div className=\"block space-y-4 lg:hidden\">\n <div className=\"flex items-start justify-between\">\n <div>\n <h3 className=\"text-lg font-semibold text-text-primary\">{investment.cartName}</h3>\n <p className=\"text-sm text-text-secondary\">by {investment.cartOwner}</p>\n </div>\n <span\n className={cn(\n 'flex items-center gap-1 rounded-full px-3 py-1 text-sm font-medium',\n getStatusColor(investment.status)\n )}\n >\n {getStatusIcon(investment.status)}\n <span className=\"capitalize\">{investment.status}</span>\n </span>\n </div>\n\n <div className=\"grid grid-cols-2 gap-4\">\n <div>\n <p className=\"text-sm text-text-secondary\">Invested</p>\n <p className=\"font-semibold text-text-primary\">\n {formatCurrency(investment.investmentAmount, { minimumFractionDigits: 0 })}\n </p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">Current Value</p>\n <p className=\"font-semibold text-text-primary\">\n {formatCurrency(investment.currentValue, { minimumFractionDigits: 0 })}\n </p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">P&L</p>\n <p\n className={cn(\n 'font-semibold',\n investment.profitLoss >= 0\n ? 'text-green-600 dark:text-green-400'\n : 'text-red-600 dark:text-red-400'\n )}\n >\n {investment.profitLoss >= 0 ? '+' : ''}\n {formatCurrency(investment.profitLoss, { minimumFractionDigits: 0 })} (\n {investment.profitLossPercentage >= 0 ? '+' : ''}\n {investment.profitLossPercentage}%)\n </p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">ROI</p>\n <p className=\"font-semibold text-text-primary\">{investment.roiAnnual}% p.a.</p>\n </div>\n </div>\n\n <div className=\"flex items-center justify-between border-t border-border-subtle pt-2\">\n <div>\n <p className=\"text-xs text-text-secondary\">Invested on</p>\n <p className=\"text-sm font-medium text-text-primary\">\n {formatDate(investment.investmentDate, {\n hour: undefined,\n minute: undefined,\n })}\n </p>\n </div>\n <button\n type=\"button\"\n onClick={() => navigateTo(`/investor/investments/${investment.id}`)}\n className=\"flex items-center gap-2 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors\"\n >\n <Eye className=\"h-4 w-4\" />\n View Details\n </button>\n </div>\n </div>\n\n {/* Desktop Layout */}\n <div className=\"hidden lg:flex lg:items-center lg:justify-between\">\n <div className=\"min-w-0 flex-1\">\n <div className=\"mb-2 flex items-center justify-between\">\n <h3 className=\"text-lg font-semibold text-text-primary\">{investment.cartName}</h3>\n <span\n className={cn(\n 'flex items-center gap-1 rounded-full px-3 py-1 text-sm font-medium',\n getStatusColor(investment.status)\n )}\n >\n {getStatusIcon(investment.status)}\n <span className=\"capitalize\">{investment.status}</span>\n </span>\n </div>\n <p className=\"mb-4 text-sm text-text-secondary\">by {investment.cartOwner}</p>\n\n <div className=\"grid grid-cols-5 gap-6\">\n <div>\n <p className=\"text-sm text-text-secondary\">Invested</p>\n <p className=\"font-semibold text-text-primary\">\n {formatCurrency(investment.investmentAmount, { minimumFractionDigits: 0 })}\n </p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">Current Value</p>\n <p className=\"font-semibold text-text-primary\">\n {formatCurrency(investment.currentValue, { minimumFractionDigits: 0 })}\n </p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">P&L</p>\n <p\n className={cn(\n 'font-semibold',\n investment.profitLoss >= 0\n ? 'text-green-600 dark:text-green-400'\n : 'text-red-600 dark:text-red-400'\n )}\n >\n {investment.profitLoss >= 0 ? '+' : ''}\n {formatCurrency(investment.profitLoss, { minimumFractionDigits: 0 })}\n </p>\n <p\n className={cn(\n 'text-xs',\n investment.profitLoss >= 0\n ? 'text-green-600 dark:text-green-400'\n : 'text-red-600 dark:text-red-400'\n )}\n >\n ({investment.profitLossPercentage >= 0 ? '+' : ''}\n {investment.profitLossPercentage}%)\n </p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">ROI</p>\n <p className=\"font-semibold text-text-primary\">{investment.roiAnnual}% p.a.</p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">Invested on</p>\n <p className=\"font-semibold text-text-primary\">\n {formatDate(investment.investmentDate, {\n hour: undefined,\n minute: undefined,\n })}\n </p>\n </div>\n </div>\n </div>\n\n <div className=\"ml-6\">\n <button\n type=\"button\"\n onClick={() => navigateTo(`/investor/investments/${investment.id}`)}\n className=\"flex items-center gap-2 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors\"\n >\n <Eye className=\"h-4 w-4\" />\n View Details\n </button>\n </div>\n </div>\n </div>\n ))\n ) : (\n <EmptyState\n icon={<TrendingDown className=\"h-12 w-12\" />}\n title={`No ${filter !== 'all' ? filter : ''} investments found`}\n description={\n filter === 'all'\n ? \"You haven't made any investments yet. Start exploring opportunities to grow your wealth.\"\n : `You don't have any ${filter} investments at the moment.`\n }\n action={\n <button\n type=\"button\"\n onClick={() => navigateTo('/investor/opportunities')}\n className=\"rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors\"\n >\n Explore Investment Opportunities\n </button>\n }\n />\n )}\n </div>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;AAmEA,IAAM,IAAgC;CACpC;EACE,IAAI;EACJ,UAAU;EACV,WAAW;EACX,kBAAkB;EAClB,cAAc;EACd,YAAY;EACZ,sBAAsB;EACtB,gBAAgB;EAChB,QAAQ;EACR,WAAW;EACX,UAAU;EACV,YAAY;EACZ,cAAc;EACf;CACD;EACE,IAAI;EACJ,UAAU;EACV,WAAW;EACX,kBAAkB;EAClB,cAAc;EACd,YAAY;EACZ,sBAAsB;EACtB,gBAAgB;EAChB,QAAQ;EACR,WAAW;EACX,UAAU;EACV,YAAY;EACZ,cAAc;EACf;CACD;EACE,IAAI;EACJ,UAAU;EACV,WAAW;EACX,kBAAkB;EAClB,cAAc;EACd,YAAY;EACZ,sBAAsB;EACtB,gBAAgB;EAChB,QAAQ;EACR,WAAW;EACX,UAAU;EACV,YAAY;EACZ,cAAc;EACf;CACD;EACE,IAAI;EACJ,UAAU;EACV,WAAW;EACX,kBAAkB;EAClB,cAAc;EACd,YAAY;EACZ,sBAAsB;EACtB,gBAAgB;EAChB,QAAQ;EACR,WAAW;EACX,UAAU;EACV,YAAY;EACZ,cAAc;EACf;CACD;EACE,IAAI;EACJ,UAAU;EACV,WAAW;EACX,kBAAkB;EAClB,cAAc;EACd,YAAY;EACZ,sBAAsB;EACtB,gBAAgB;EAChB,QAAQ;EACR,WAAW;EACX,UAAU;EACV,YAAY;EACZ,cAAc;EACf;CACF,EAEK,IAAiC;CACrC,eAAe;CACf,cAAc;CACd,cAAc;CACd,mBAAmB;CACnB,YAAY;CACZ,YAAY;CACZ,sBAAsB;CACvB;AAMD,SA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AAK;QACL,eAAe,EAAW,yBAAyB,EAAW,KAAK;QACnE,WAAU;kBAHZ,CAKE,kBAAC,GAAD,EAAK,WAAU,WAAY,CAAA,EAAA,eAEpB;;OACL,CAAA,CACF;QACF;OA7JI,EAAW,GA6Jf,CACN,GAEF,kBAAC,GAAD;KACE,MAAM,kBAAC,GAAD,EAAc,WAAU,aAAc,CAAA;KAC5C,OAAO,MAAM,MAAW,QAAiB,KAAT,EAAY;KAC5C,aACE,MAAW,QACP,6FACA,sBAAsB,EAAO;KAEnC,QACE,kBAAC,UAAD;MACE,MAAK;MACL,eAAe,EAAW,0BAA0B;MACpD,WAAU;gBACX;MAEQ,CAAA;KAEX,CAAA;IAEA,CAAA;GACK"}
1
+ {"version":3,"file":"InvestorInvestmentsPage.js","names":[],"sources":["../../../../src/subscriberbot/pages/investor/InvestorInvestmentsPage.tsx"],"sourcesContent":["/**\n * Investor Investments Page\n * @module subscriberbot/pages/investor\n *\n * MetricsGrid summary cards, filter tabs (all/active/pending/matured) with counts,\n * responsive mobile/desktop layouts, P&L display, ROI display, status icons,\n * empty state.\n */\n\nimport { useState, useEffect, useMemo } from 'react';\nimport {\n TrendingUp,\n TrendingDown,\n Briefcase,\n Eye,\n BarChart3,\n AlertCircle,\n CheckCircle2,\n Clock,\n Wallet,\n IndianRupee,\n Plus,\n Target,\n} from 'lucide-react';\nimport { PageLayout } from '../../components/PageLayout';\nimport { MetricsCard } from '../../components/MetricsCard';\nimport { EmptyState } from '../../components/EmptyState';\nimport { useSubscriberBot } from '../../context/SubscriberBotContext';\nimport { cn } from '../../utils/cn';\nimport { formatCurrency, formatDate } from '../../utils/formatters';\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\ninterface Investment {\n id: string;\n cartName: string;\n cartOwner: string;\n investmentAmount: number;\n currentValue: number;\n profitLoss: number;\n profitLossPercentage: number;\n investmentDate: string;\n status: 'active' | 'pending' | 'matured' | 'withdrawn';\n roiAnnual: number;\n duration: string;\n nextPayout: string;\n totalReturns: number;\n}\n\ninterface InvestmentSummary {\n totalInvested: number;\n currentValue: number;\n totalReturns: number;\n activeInvestments: number;\n averageRoi: number;\n profitLoss: number;\n profitLossPercentage: number;\n}\n\ntype FilterKey = 'all' | 'active' | 'pending' | 'matured';\n\n// ---------------------------------------------------------------------------\n// Mock data\n// ---------------------------------------------------------------------------\n\nconst mockInvestments: Investment[] = [\n {\n id: 'inv-001',\n cartName: 'South Indian Express',\n cartOwner: 'Raj Kumar',\n investmentAmount: 50000,\n currentValue: 58500,\n profitLoss: 8500,\n profitLossPercentage: 17.0,\n investmentDate: '2024-01-15',\n status: 'active',\n roiAnnual: 22.5,\n duration: '18 months',\n nextPayout: '2024-12-15',\n totalReturns: 8500,\n },\n {\n id: 'inv-002',\n cartName: 'Pizza Corner',\n cartOwner: 'Priya Singh',\n investmentAmount: 75000,\n currentValue: 82000,\n profitLoss: 7000,\n profitLossPercentage: 9.3,\n investmentDate: '2024-03-10',\n status: 'active',\n roiAnnual: 18.0,\n duration: '24 months',\n nextPayout: '2024-12-10',\n totalReturns: 7000,\n },\n {\n id: 'inv-003',\n cartName: 'Healthy Bites',\n cartOwner: 'Amit Patel',\n investmentAmount: 30000,\n currentValue: 31200,\n profitLoss: 1200,\n profitLossPercentage: 4.0,\n investmentDate: '2024-06-01',\n status: 'active',\n roiAnnual: 15.0,\n duration: '12 months',\n nextPayout: '2024-12-01',\n totalReturns: 1200,\n },\n {\n id: 'inv-004',\n cartName: 'Street Food Junction',\n cartOwner: 'Neha Sharma',\n investmentAmount: 40000,\n currentValue: 40000,\n profitLoss: 0,\n profitLossPercentage: 0,\n investmentDate: '2024-08-15',\n status: 'pending',\n roiAnnual: 20.0,\n duration: '15 months',\n nextPayout: '2025-01-15',\n totalReturns: 0,\n },\n {\n id: 'inv-005',\n cartName: 'Biryani House',\n cartOwner: 'Suresh Reddy',\n investmentAmount: 60000,\n currentValue: 72000,\n profitLoss: 12000,\n profitLossPercentage: 20.0,\n investmentDate: '2023-12-01',\n status: 'matured',\n roiAnnual: 25.0,\n duration: '12 months',\n nextPayout: '-',\n totalReturns: 12000,\n },\n];\n\nconst mockSummary: InvestmentSummary = {\n totalInvested: 255000,\n currentValue: 283700,\n totalReturns: 28700,\n activeInvestments: 3,\n averageRoi: 19.6,\n profitLoss: 28700,\n profitLossPercentage: 11.3,\n};\n\n// ---------------------------------------------------------------------------\n// Helpers\n// ---------------------------------------------------------------------------\n\nfunction getStatusColor(status: string): string {\n switch (status) {\n case 'active':\n return 'bg-status-success-bg/20 text-status-success-text';\n case 'pending':\n return 'bg-status-warning-bg/20 text-status-warning-text';\n case 'matured':\n return 'bg-status-info-bg/20 text-status-info-text';\n case 'withdrawn':\n return 'bg-secondary text-secondary-foreground';\n default:\n return 'bg-secondary text-secondary-foreground';\n }\n}\n\nfunction getStatusIcon(status: string) {\n switch (status) {\n case 'active':\n return <CheckCircle2 className=\"h-4 w-4\" />;\n case 'pending':\n return <Clock className=\"h-4 w-4\" />;\n case 'matured':\n return <CheckCircle2 className=\"h-4 w-4\" />;\n default:\n return <AlertCircle className=\"h-4 w-4\" />;\n }\n}\n\n// ---------------------------------------------------------------------------\n// Component\n// ---------------------------------------------------------------------------\n\nexport function InvestorInvestmentsPage() {\n const { navigateTo } = useSubscriberBot();\n const [isLoading, setIsLoading] = useState(true);\n const [filter, setFilter] = useState<FilterKey>('all');\n\n useEffect(() => {\n const timer = setTimeout(() => setIsLoading(false), 600);\n return () => clearTimeout(timer);\n }, []);\n\n const filteredInvestments = useMemo(() => {\n if (filter === 'all') return mockInvestments;\n return mockInvestments.filter((inv) => inv.status === filter);\n }, [filter]);\n\n const filterTabs: Array<{ key: FilterKey; label: string }> = [\n { key: 'all', label: 'All Investments' },\n { key: 'active', label: 'Active' },\n { key: 'pending', label: 'Pending' },\n { key: 'matured', label: 'Matured' },\n ];\n\n function getCount(key: FilterKey): number {\n if (key === 'all') return mockInvestments.length;\n return mockInvestments.filter((inv) => inv.status === key).length;\n }\n\n if (isLoading) {\n return (\n <PageLayout title=\"My Investments\" description=\"Loading your investments...\">\n <div className=\"flex items-center justify-center py-20\">\n <div className=\"text-center\">\n <div className=\"mx-auto mb-4 h-12 w-12 animate-spin rounded-full border-b-2 border-primary\" />\n <p className=\"text-sm text-text-secondary\">Loading your investments...</p>\n </div>\n </div>\n </PageLayout>\n );\n }\n\n return (\n <PageLayout\n title=\"My Investments\"\n description=\"Track and manage your investment portfolio\"\n actions={\n <button\n type=\"button\"\n onClick={() => navigateTo('/investor/opportunities')}\n className=\"flex items-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors\"\n >\n <Plus className=\"h-4 w-4\" />\n New Investment\n </button>\n }\n >\n {/* Investment Summary */}\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4\">\n <MetricsCard\n icon={<Wallet className=\"h-5 w-5\" />}\n value={formatCurrency(mockSummary.totalInvested, { minimumFractionDigits: 0 })}\n label=\"Total Invested\"\n trend=\"up\"\n trendValue=\"Total amount invested\"\n />\n <MetricsCard\n icon={<IndianRupee className=\"h-5 w-5\" />}\n value={formatCurrency(mockSummary.currentValue, { minimumFractionDigits: 0 })}\n label=\"Current Value\"\n trend={mockSummary.profitLoss > 0 ? 'up' : 'down'}\n trendValue={`${mockSummary.profitLossPercentage > 0 ? '+' : ''}${mockSummary.profitLossPercentage}% total returns`}\n />\n <MetricsCard\n icon={<TrendingUp className=\"h-5 w-5\" />}\n value={formatCurrency(mockSummary.totalReturns, { minimumFractionDigits: 0 })}\n label=\"Total Returns\"\n trend=\"up\"\n trendValue=\"Total profit earned\"\n />\n <MetricsCard\n icon={<CheckCircle2 className=\"h-5 w-5\" />}\n value={String(mockSummary.activeInvestments)}\n label=\"Active Investments\"\n trend=\"neutral\"\n trendValue={`${mockSummary.averageRoi}% avg ROI`}\n />\n </div>\n\n {/* Filter Tabs */}\n <div className=\"mt-6 rounded-lg border border-border-seam bg-bg-surface p-4\">\n <div className=\"flex flex-wrap gap-2\">\n {filterTabs.map((tab) => (\n <button\n key={tab.key}\n type=\"button\"\n onClick={() => setFilter(tab.key)}\n className={cn(\n 'flex items-center gap-2 rounded-lg px-4 py-2 text-sm font-medium transition-colors',\n filter === tab.key\n ? 'bg-action-primary-bg text-action-primary-text'\n : 'bg-bg-sunken text-text-primary hover:bg-bg-sunken/80'\n )}\n >\n {tab.label}\n <span\n className={cn(\n 'rounded-full px-2 py-0.5 text-xs',\n filter === tab.key\n ? 'bg-primary-foreground/20 text-action-primary-text'\n : 'bg-action-primary-bg/10 text-primary'\n )}\n >\n {getCount(tab.key)}\n </span>\n </button>\n ))}\n </div>\n </div>\n\n {/* Investments List */}\n <div className=\"mt-6 space-y-4\">\n {filteredInvestments.length > 0 ? (\n filteredInvestments.map((investment) => (\n <div\n key={investment.id}\n className=\"rounded-lg border border-border-seam bg-bg-surface p-4 sm:p-6\"\n >\n {/* Mobile Layout */}\n <div className=\"block space-y-4 lg:hidden\">\n <div className=\"flex items-start justify-between\">\n <div>\n <h3 className=\"text-lg font-semibold text-text-primary\">\n {investment.cartName}\n </h3>\n <p className=\"text-sm text-text-secondary\">by {investment.cartOwner}</p>\n </div>\n <span\n className={cn(\n 'flex items-center gap-1 rounded-full px-3 py-1 text-sm font-medium',\n getStatusColor(investment.status)\n )}\n >\n {getStatusIcon(investment.status)}\n <span className=\"capitalize\">{investment.status}</span>\n </span>\n </div>\n\n <div className=\"grid grid-cols-2 gap-4\">\n <div>\n <p className=\"text-sm text-text-secondary\">Invested</p>\n <p className=\"font-semibold text-text-primary\">\n {formatCurrency(investment.investmentAmount, { minimumFractionDigits: 0 })}\n </p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">Current Value</p>\n <p className=\"font-semibold text-text-primary\">\n {formatCurrency(investment.currentValue, { minimumFractionDigits: 0 })}\n </p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">P&L</p>\n <p\n className={cn(\n 'font-semibold',\n investment.profitLoss >= 0\n ? 'text-status-success-text'\n : 'text-status-error-text'\n )}\n >\n {investment.profitLoss >= 0 ? '+' : ''}\n {formatCurrency(investment.profitLoss, { minimumFractionDigits: 0 })} (\n {investment.profitLossPercentage >= 0 ? '+' : ''}\n {investment.profitLossPercentage}%)\n </p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">ROI</p>\n <p className=\"font-semibold text-text-primary\">{investment.roiAnnual}% p.a.</p>\n </div>\n </div>\n\n <div className=\"flex items-center justify-between border-t border-border-seam pt-2\">\n <div>\n <p className=\"text-xs text-text-secondary\">Invested on</p>\n <p className=\"text-sm font-medium text-text-primary\">\n {formatDate(investment.investmentDate, {\n hour: undefined,\n minute: undefined,\n })}\n </p>\n </div>\n <button\n type=\"button\"\n onClick={() => navigateTo(`/investor/investments/${investment.id}`)}\n className=\"flex items-center gap-2 rounded-lg border border-border-seam px-3 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors\"\n >\n <Eye className=\"h-4 w-4\" />\n View Details\n </button>\n </div>\n </div>\n\n {/* Desktop Layout */}\n <div className=\"hidden lg:flex lg:items-center lg:justify-between\">\n <div className=\"min-w-0 flex-1\">\n <div className=\"mb-2 flex items-center justify-between\">\n <h3 className=\"text-lg font-semibold text-text-primary\">\n {investment.cartName}\n </h3>\n <span\n className={cn(\n 'flex items-center gap-1 rounded-full px-3 py-1 text-sm font-medium',\n getStatusColor(investment.status)\n )}\n >\n {getStatusIcon(investment.status)}\n <span className=\"capitalize\">{investment.status}</span>\n </span>\n </div>\n <p className=\"mb-4 text-sm text-text-secondary\">by {investment.cartOwner}</p>\n\n <div className=\"grid grid-cols-5 gap-6\">\n <div>\n <p className=\"text-sm text-text-secondary\">Invested</p>\n <p className=\"font-semibold text-text-primary\">\n {formatCurrency(investment.investmentAmount, { minimumFractionDigits: 0 })}\n </p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">Current Value</p>\n <p className=\"font-semibold text-text-primary\">\n {formatCurrency(investment.currentValue, { minimumFractionDigits: 0 })}\n </p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">P&L</p>\n <p\n className={cn(\n 'font-semibold',\n investment.profitLoss >= 0\n ? 'text-status-success-text'\n : 'text-status-error-text'\n )}\n >\n {investment.profitLoss >= 0 ? '+' : ''}\n {formatCurrency(investment.profitLoss, { minimumFractionDigits: 0 })}\n </p>\n <p\n className={cn(\n 'text-xs',\n investment.profitLoss >= 0\n ? 'text-status-success-text'\n : 'text-status-error-text'\n )}\n >\n ({investment.profitLossPercentage >= 0 ? '+' : ''}\n {investment.profitLossPercentage}%)\n </p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">ROI</p>\n <p className=\"font-semibold text-text-primary\">\n {investment.roiAnnual}% p.a.\n </p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">Invested on</p>\n <p className=\"font-semibold text-text-primary\">\n {formatDate(investment.investmentDate, {\n hour: undefined,\n minute: undefined,\n })}\n </p>\n </div>\n </div>\n </div>\n\n <div className=\"ml-6\">\n <button\n type=\"button\"\n onClick={() => navigateTo(`/investor/investments/${investment.id}`)}\n className=\"flex items-center gap-2 rounded-lg border border-border-seam px-3 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors\"\n >\n <Eye className=\"h-4 w-4\" />\n View Details\n </button>\n </div>\n </div>\n </div>\n ))\n ) : (\n <EmptyState\n illustration=\"empty-data\"\n icon={<TrendingDown className=\"h-12 w-12\" />}\n title={`No ${filter !== 'all' ? filter : ''} investments found`}\n description={\n filter === 'all'\n ? \"You haven't made any investments yet. Start exploring opportunities to grow your wealth.\"\n : `You don't have any ${filter} investments at the moment.`\n }\n action={\n <button\n type=\"button\"\n onClick={() => navigateTo('/investor/opportunities')}\n className=\"rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors\"\n >\n Explore Investment Opportunities\n </button>\n }\n />\n )}\n </div>\n </PageLayout>\n );\n}\n"],"mappings":";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