@burdenoff/microfe-kadaikodi 2026.704.3 → 2026.704.5

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 (145) hide show
  1. package/dist/kadaikodi/KadaikodiRoutes.js +34 -26
  2. package/dist/kadaikodi/KadaikodiRoutes.js.map +1 -1
  3. package/dist/kadaikodi/components/viz/AllocationBar.js +68 -0
  4. package/dist/kadaikodi/components/viz/AllocationBar.js.map +1 -0
  5. package/dist/kadaikodi/components/viz/AreaChart.js +102 -0
  6. package/dist/kadaikodi/components/viz/AreaChart.js.map +1 -0
  7. package/dist/kadaikodi/components/viz/AvatarStack.js +36 -0
  8. package/dist/kadaikodi/components/viz/AvatarStack.js.map +1 -0
  9. package/dist/kadaikodi/components/viz/BarChart.js +83 -0
  10. package/dist/kadaikodi/components/viz/BarChart.js.map +1 -0
  11. package/dist/kadaikodi/components/viz/CertificateCard.js +4 -0
  12. package/dist/kadaikodi/components/viz/DonutChart.js +109 -0
  13. package/dist/kadaikodi/components/viz/DonutChart.js.map +1 -0
  14. package/dist/kadaikodi/components/viz/HBarFunnel.js +54 -0
  15. package/dist/kadaikodi/components/viz/HBarFunnel.js.map +1 -0
  16. package/dist/kadaikodi/components/viz/Heatmap.js +3 -0
  17. package/dist/kadaikodi/components/viz/KanbanBoard.js +50 -0
  18. package/dist/kadaikodi/components/viz/KanbanBoard.js.map +1 -0
  19. package/dist/kadaikodi/components/viz/LineChart.js +4 -0
  20. package/dist/kadaikodi/components/viz/OrgTree.js +2 -0
  21. package/dist/kadaikodi/components/viz/PathSteps.js +3 -0
  22. package/dist/kadaikodi/components/viz/ProgressRing.js +68 -0
  23. package/dist/kadaikodi/components/viz/ProgressRing.js.map +1 -0
  24. package/dist/kadaikodi/components/viz/RatingStars.js +51 -0
  25. package/dist/kadaikodi/components/viz/RatingStars.js.map +1 -0
  26. package/dist/kadaikodi/components/viz/SegmentedTabs.js +69 -0
  27. package/dist/kadaikodi/components/viz/SegmentedTabs.js.map +1 -0
  28. package/dist/kadaikodi/components/viz/SkillBar.js +3 -0
  29. package/dist/kadaikodi/components/viz/Sparkline.js +74 -0
  30. package/dist/kadaikodi/components/viz/Sparkline.js.map +1 -0
  31. package/dist/kadaikodi/components/viz/StatCard.js +60 -0
  32. package/dist/kadaikodi/components/viz/StatCard.js.map +1 -0
  33. package/dist/kadaikodi/components/viz/StepProgress.js +64 -0
  34. package/dist/kadaikodi/components/viz/StepProgress.js.map +1 -0
  35. package/dist/kadaikodi/components/viz/Timeline.js +66 -0
  36. package/dist/kadaikodi/components/viz/Timeline.js.map +1 -0
  37. package/dist/kadaikodi/components/viz/index.js +23 -0
  38. package/dist/kadaikodi/components/viz/lib/Avatar.js +30 -0
  39. package/dist/kadaikodi/components/viz/lib/Avatar.js.map +1 -0
  40. package/dist/kadaikodi/components/viz/lib/CartesianFrame.js +119 -0
  41. package/dist/kadaikodi/components/viz/lib/CartesianFrame.js.map +1 -0
  42. package/dist/kadaikodi/components/viz/lib/ResponsiveSvg.js +35 -0
  43. package/dist/kadaikodi/components/viz/lib/ResponsiveSvg.js.map +1 -0
  44. package/dist/kadaikodi/components/viz/lib/format.js +21 -0
  45. package/dist/kadaikodi/components/viz/lib/format.js.map +1 -0
  46. package/dist/kadaikodi/components/viz/lib/geometry.js +61 -0
  47. package/dist/kadaikodi/components/viz/lib/geometry.js.map +1 -0
  48. package/dist/kadaikodi/components/viz/lib/hooks.js +39 -0
  49. package/dist/kadaikodi/components/viz/lib/hooks.js.map +1 -0
  50. package/dist/kadaikodi/components/viz/lib/palette.js +27 -0
  51. package/dist/kadaikodi/components/viz/lib/palette.js.map +1 -0
  52. package/dist/kadaikodi/hooks/useKadaikodiApi.js +84 -6
  53. package/dist/kadaikodi/hooks/useKadaikodiApi.js.map +1 -1
  54. package/dist/kadaikodi/pages/HomePage.js +373 -631
  55. package/dist/kadaikodi/pages/HomePage.js.map +1 -1
  56. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js +304 -169
  57. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js.map +1 -1
  58. package/dist/kadaikodi/pages/admin/AdminDashboard.js +255 -271
  59. package/dist/kadaikodi/pages/admin/AdminDashboard.js.map +1 -1
  60. package/dist/kadaikodi/pages/admin/AdminFinancialPage.js +185 -125
  61. package/dist/kadaikodi/pages/admin/AdminFinancialPage.js.map +1 -1
  62. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js +141 -102
  63. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js.map +1 -1
  64. package/dist/kadaikodi/pages/admin/AdminProfilePage.js.map +1 -1
  65. package/dist/kadaikodi/pages/admin/AdminSettingsPage.js +332 -276
  66. package/dist/kadaikodi/pages/admin/AdminSettingsPage.js.map +1 -1
  67. package/dist/kadaikodi/pages/admin/CartManagementPage.js +564 -729
  68. package/dist/kadaikodi/pages/admin/CartManagementPage.js.map +1 -1
  69. package/dist/kadaikodi/pages/admin/UserManagementPage.js +310 -366
  70. package/dist/kadaikodi/pages/admin/UserManagementPage.js.map +1 -1
  71. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js +201 -120
  72. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
  73. package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js +290 -257
  74. package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
  75. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js +173 -194
  76. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
  77. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js +270 -228
  78. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
  79. package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js +194 -173
  80. package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
  81. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js +428 -347
  82. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js.map +1 -1
  83. package/dist/kadaikodi/pages/cart-owner/InvestmentListingPage.js +332 -0
  84. package/dist/kadaikodi/pages/cart-owner/InvestmentListingPage.js.map +1 -0
  85. package/dist/kadaikodi/pages/cart-owner/MerchantOnboardingPage.js +373 -0
  86. package/dist/kadaikodi/pages/cart-owner/MerchantOnboardingPage.js.map +1 -0
  87. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js +294 -162
  88. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js.map +1 -1
  89. package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js +180 -181
  90. package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js.map +1 -1
  91. package/dist/kadaikodi/pages/common/HelpSupportPage.js +310 -317
  92. package/dist/kadaikodi/pages/common/HelpSupportPage.js.map +1 -1
  93. package/dist/kadaikodi/pages/common/NotificationCenterPage.js.map +1 -1
  94. package/dist/kadaikodi/pages/common/SettingsPage.js +502 -586
  95. package/dist/kadaikodi/pages/common/SettingsPage.js.map +1 -1
  96. package/dist/kadaikodi/pages/customer/BookingDetailsPage.js +239 -156
  97. package/dist/kadaikodi/pages/customer/BookingDetailsPage.js.map +1 -1
  98. package/dist/kadaikodi/pages/customer/CartDetailPage.js +405 -248
  99. package/dist/kadaikodi/pages/customer/CartDetailPage.js.map +1 -1
  100. package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js +258 -232
  101. package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js.map +1 -1
  102. package/dist/kadaikodi/pages/customer/CheckoutPage.js +254 -205
  103. package/dist/kadaikodi/pages/customer/CheckoutPage.js.map +1 -1
  104. package/dist/kadaikodi/pages/customer/CustomerDashboard.js +5 -5
  105. package/dist/kadaikodi/pages/customer/CustomerDashboard.js.map +1 -1
  106. package/dist/kadaikodi/pages/customer/CustomerProfilePage.js +189 -199
  107. package/dist/kadaikodi/pages/customer/CustomerProfilePage.js.map +1 -1
  108. package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js +272 -230
  109. package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js.map +1 -1
  110. package/dist/kadaikodi/pages/customer/FavoritesPage.js +150 -413
  111. package/dist/kadaikodi/pages/customer/FavoritesPage.js.map +1 -1
  112. package/dist/kadaikodi/pages/customer/OrderHistoryPage.js +173 -134
  113. package/dist/kadaikodi/pages/customer/OrderHistoryPage.js.map +1 -1
  114. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js +411 -305
  115. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js.map +1 -1
  116. package/dist/kadaikodi/pages/customer/ReviewsPage.js +310 -406
  117. package/dist/kadaikodi/pages/customer/ReviewsPage.js.map +1 -1
  118. package/dist/kadaikodi/pages/customer/SavedAddressesPage.js.map +1 -1
  119. package/dist/kadaikodi/pages/customer/shared.js +181 -0
  120. package/dist/kadaikodi/pages/customer/shared.js.map +1 -0
  121. package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js +438 -311
  122. package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js.map +1 -1
  123. package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js +320 -293
  124. package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
  125. package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js +159 -91
  126. package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js.map +1 -1
  127. package/dist/kadaikodi/pages/investor/InvestorDashboard.js +137 -107
  128. package/dist/kadaikodi/pages/investor/InvestorDashboard.js.map +1 -1
  129. package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js +157 -135
  130. package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js.map +1 -1
  131. package/dist/kadaikodi/pages/investor/InvestorPortfolioPage.js +280 -206
  132. package/dist/kadaikodi/pages/investor/InvestorPortfolioPage.js.map +1 -1
  133. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js +441 -514
  134. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js.map +1 -1
  135. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js +428 -431
  136. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js.map +1 -1
  137. package/dist/kadaikodi/pages/worker/WorkerDashboard.js +328 -445
  138. package/dist/kadaikodi/pages/worker/WorkerDashboard.js.map +1 -1
  139. package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js +141 -164
  140. package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js.map +1 -1
  141. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js +360 -288
  142. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js.map +1 -1
  143. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js +303 -281
  144. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js.map +1 -1
  145. package/package.json +1 -1
@@ -1,374 +1,501 @@
1
1
  import { useKadaikodi as e } from "../../context/KadaikodiContext.js";
2
2
  import { cn as t } from "../../utils/cn.js";
3
3
  import { PageLayout as n } from "../../components/PageLayout.js";
4
- import { EmptyState as r } from "../../components/EmptyState.js";
5
- import { useInvestmentOpportunities as i, useInvestments as a } from "../../hooks/useKadaikodiApi.js";
6
- import { formatCurrency as o, formatDate as s } from "../../utils/formatters.js";
7
- import { useMemo as c } from "react";
8
- import { ArrowLeft as l, BarChart3 as u, Building2 as d, Clock as f, IndianRupee as p, PieChart as m, Shield as h, Target as g, TrendingUp as _, Users as v } from "lucide-react";
9
- import { useParams as y } from "react-router-dom";
10
- import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
11
- import { EmphasisPanel as C, PagePurpose as w } from "@burdenoff/fe-libs/ui";
4
+ import { EmptyState as ee } from "../../components/EmptyState.js";
5
+ import { useInvest as r, useInvestmentOpportunities as i, useInvestments as a, useProvider as te } from "../../hooks/useKadaikodiApi.js";
6
+ import { formatCurrency as o, formatDate as ne } from "../../utils/formatters.js";
7
+ import { AreaChart as s } from "../../components/viz/AreaChart.js";
8
+ import { ProgressRing as c } from "../../components/viz/ProgressRing.js";
9
+ import { StatCard as l } from "../../components/viz/StatCard.js";
10
+ import "../../components/viz/index.js";
11
+ import { useCallback as u, useMemo as d, useState as f } from "react";
12
+ import { ArrowLeft as re, CheckCircle2 as p, IndianRupee as m, Lock as ie, MessageSquare as h, Receipt as g, Shield as _, Star as v, Tag as y, Target as b, TrendingUp as x, Users as S } from "lucide-react";
13
+ import { useParams as C } from "react-router-dom";
14
+ import { jsx as w, jsxs as T } from "react/jsx-runtime";
15
+ import { EmphasisPanel as ae, GlassCard as E, PagePurpose as oe } from "@burdenoff/fe-libs/ui";
12
16
  //#region src/kadaikodi/pages/investor/InvestmentDetailsPage.tsx
13
- function T(e) {
17
+ function se(e) {
14
18
  switch (e) {
15
19
  case "low": return {
16
- label: "Low Risk",
17
- color: "text-status-success-text"
20
+ label: "Low risk",
21
+ color: "text-status-success-text",
22
+ badge: "border-status-success-border bg-status-success-bg-subtle text-status-success-text"
18
23
  };
19
24
  case "medium": return {
20
- label: "Medium Risk",
21
- color: "text-status-warning-text"
25
+ label: "Medium risk",
26
+ color: "text-status-warning-text",
27
+ badge: "border-status-warning-border bg-status-warning-bg-subtle text-status-warning-text"
22
28
  };
23
29
  case "high": return {
24
- label: "High Risk",
25
- color: "text-status-error-text"
30
+ label: "High risk",
31
+ color: "text-status-error-text",
32
+ badge: "border-status-error-border bg-status-error-bg-subtle text-status-error-text"
26
33
  };
27
34
  default: return {
28
35
  label: e,
29
- color: "text-text-secondary"
36
+ color: "text-text-secondary",
37
+ badge: "border-border-default"
30
38
  };
31
39
  }
32
40
  }
33
- function E() {
34
- let { navigateTo: E, currentUser: D } = e(), { id: O } = y(), { data: k = [], isLoading: A } = i(), { data: j = [], isLoading: M } = a(D?.id || ""), N = A || M, P = c(() => j.find((e) => e.id === O), [j, O]), F = c(() => k.find((e) => e.id === O || e.id === P?.opportunityId) ?? null, [
41
+ function ce(e) {
42
+ return o(e, {
43
+ minimumFractionDigits: 0,
44
+ notation: "compact"
45
+ });
46
+ }
47
+ function D() {
48
+ let { navigateTo: D, currentUser: O } = e(), { id: k } = C(), { data: A = [], isLoading: j } = i(), { data: M = [], isLoading: N } = a(O?.id || ""), P = j || N, F = d(() => M.find((e) => e.id === k), [M, k]), I = d(() => A.find((e) => e.id === k || e.id === F?.opportunityId) ?? null, [
49
+ A,
35
50
  k,
36
- O,
37
- P
51
+ F
52
+ ]), { data: L } = te(I?.cartId), R = r(), [z, B] = f(""), [V, H] = f("idle"), U = I?.minimumInvestment ?? 0, W = I ? Math.max(0, I.targetAmount - I.raisedAmount) : 0, G = Math.max(U, W), K = Number.parseInt(z, 10), q = !Number.isNaN(K) && K >= U && K <= G, le = u(() => {
53
+ if (!I || !q) {
54
+ H("error");
55
+ return;
56
+ }
57
+ R.mutate({
58
+ amount: K,
59
+ investorId: O?.id ?? "",
60
+ opportunityId: I.id
61
+ }, {
62
+ onSuccess: () => {
63
+ H("success"), window.setTimeout(() => D("/investor/portfolio"), 1400);
64
+ },
65
+ onError: () => H("error")
66
+ });
67
+ }, [
68
+ I,
69
+ q,
70
+ R,
71
+ K,
72
+ O?.id,
73
+ D
74
+ ]), J = d(() => {
75
+ if (!I) return [];
76
+ let e = q ? K : U || I.targetAmount / 10, t = e * (1 + I.expectedReturns / 100), n = Math.min(Math.max(I.investmentPeriod, 3), 12);
77
+ return Array.from({ length: 7 }, (ee, r) => ({
78
+ label: r === 0 ? "Now" : r === 6 ? `${n}mo` : `M${Math.round(n * r / 6)}`,
79
+ value: e + (t - e) * (r / 6)
80
+ }));
81
+ }, [
82
+ I,
83
+ q,
84
+ K,
85
+ U
38
86
  ]);
39
- if (N) return /* @__PURE__ */ x(n, {
87
+ if (P) return /* @__PURE__ */ w(n, {
40
88
  title: "Investment Details",
41
89
  description: "Loading...",
42
- children: /* @__PURE__ */ x("div", {
43
- className: "flex items-center justify-center py-20",
44
- children: /* @__PURE__ */ S("div", {
45
- className: "text-center",
46
- children: [/* @__PURE__ */ x("div", { className: "mx-auto mb-4 h-12 w-12 animate-spin rounded-full border-b-2 border-primary" }), /* @__PURE__ */ x("p", {
47
- className: "text-sm text-text-secondary",
48
- children: "Loading investment details..."
49
- })]
50
- })
90
+ children: /* @__PURE__ */ T("div", {
91
+ className: "space-y-4",
92
+ children: [/* @__PURE__ */ w("div", { className: "h-28 animate-pulse rounded-[var(--radius-card)] bg-bg-sunken" }), /* @__PURE__ */ T("div", {
93
+ className: "grid gap-6 lg:grid-cols-3",
94
+ children: [/* @__PURE__ */ w("div", { className: "h-96 animate-pulse rounded-[var(--radius-card)] bg-bg-sunken lg:col-span-2" }), /* @__PURE__ */ w("div", { className: "h-96 animate-pulse rounded-[var(--radius-card)] bg-bg-sunken" })]
95
+ })]
51
96
  })
52
97
  });
53
- if (!F && !P) return /* @__PURE__ */ x(n, {
98
+ if (!I && !F) return /* @__PURE__ */ w(n, {
54
99
  title: "Investment Not Found",
55
- children: /* @__PURE__ */ x(r, {
100
+ children: /* @__PURE__ */ w(ee, {
56
101
  illustration: "empty-generic",
57
102
  title: "Investment not found",
58
103
  description: "We couldn't find this investment. It may have been closed or the link is out of date.",
59
- action: /* @__PURE__ */ x("button", {
104
+ action: /* @__PURE__ */ w("button", {
60
105
  type: "button",
61
- onClick: () => E("/investor/portfolio"),
106
+ onClick: () => D("/investor/portfolio"),
62
107
  className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
63
108
  children: "Back to Portfolio"
64
109
  })
65
110
  })
66
111
  });
67
- let I = F?.cartName ?? P?.cartName ?? "Investment", L = F ? T(F.riskLevel) : null, R = F && F.targetAmount > 0 ? Math.min(F.raisedAmount / F.targetAmount * 100, 100) : 0, z = F?.expiresAt ? Math.max(0, Math.ceil((new Date(F.expiresAt).getTime() - Date.now()) / 864e5)) : null, B = P ? P.currentValue - P.investedAmount : 0, V = P && P.investedAmount > 0 ? B / P.investedAmount * 100 : 0;
68
- return /* @__PURE__ */ S(n, {
69
- title: I,
70
- description: "Investment Details & Performance",
71
- actions: /* @__PURE__ */ S("button", {
112
+ let ue = I?.cartName ?? F?.cartName ?? "Investment", Y = I ? se(I.riskLevel) : null, X = I && I.targetAmount > 0 ? Math.min(I.raisedAmount / I.targetAmount * 100, 100) : 0, Z = I?.expiresAt ? Math.max(0, Math.ceil((new Date(I.expiresAt).getTime() - Date.now()) / 864e5)) : null, de = F ? F.currentValue - F.investedAmount : 0, Q = F && F.investedAmount > 0 ? de / F.investedAmount * 100 : 0, $ = !!I && I?.status === "active";
113
+ return /* @__PURE__ */ T(n, {
114
+ title: ue,
115
+ description: "Investment details & performance",
116
+ actions: /* @__PURE__ */ T("button", {
72
117
  type: "button",
73
- onClick: () => E("/investor/portfolio"),
118
+ onClick: () => D("/investor/portfolio"),
74
119
  className: "flex items-center gap-1.5 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
75
120
  children: [
76
- /* @__PURE__ */ x(l, { className: "h-4 w-4" }),
77
- /* @__PURE__ */ x("span", {
121
+ /* @__PURE__ */ w(re, { className: "h-4 w-4" }),
122
+ /* @__PURE__ */ w("span", {
78
123
  className: "hidden sm:inline",
79
124
  children: "Back to Portfolio"
80
125
  }),
81
- /* @__PURE__ */ x("span", {
126
+ /* @__PURE__ */ w("span", {
82
127
  className: "sm:hidden",
83
128
  children: "Back"
84
129
  })
85
130
  ]
86
131
  }),
87
132
  children: [
88
- /* @__PURE__ */ x(w, {
133
+ /* @__PURE__ */ w(oe, {
89
134
  className: "mb-6",
90
- children: "A deep dive into this investment. Review the funding progress, expected returns and terms on offer, and — if you already hold a stake — exactly what you've put in and what it's worth today."
135
+ children: "A deep dive into this investment. Review the business behind it, funding progress, expected returns and terms on offer, and — if you already hold a stake — exactly what you've put in and what it's worth today."
91
136
  }),
92
- /* @__PURE__ */ x(C, { children: P ? /* @__PURE__ */ S("div", {
93
- className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
94
- children: [
95
- /* @__PURE__ */ S("div", {
96
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 text-center",
97
- children: [
98
- /* @__PURE__ */ x(p, { className: "mx-auto mb-2 h-6 w-6 text-primary sm:h-8 sm:w-8" }),
99
- /* @__PURE__ */ x("div", {
100
- className: "text-lg font-bold text-text-primary sm:text-2xl",
101
- children: o(P.investedAmount, { minimumFractionDigits: 0 })
102
- }),
103
- /* @__PURE__ */ x("div", {
104
- className: "text-xs text-text-secondary sm:text-sm",
105
- children: "Your Investment"
106
- })
107
- ]
108
- }),
109
- /* @__PURE__ */ S("div", {
110
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 text-center",
111
- children: [
112
- /* @__PURE__ */ x(_, { className: "mx-auto mb-2 h-6 w-6 text-status-success-text sm:h-8 sm:w-8" }),
113
- /* @__PURE__ */ S("div", {
114
- className: t("text-lg font-bold sm:text-2xl", B >= 0 ? "text-status-success-text" : "text-status-error-text"),
115
- children: [
116
- V >= 0 ? "+" : "",
117
- V.toFixed(1),
118
- "%"
119
- ]
120
- }),
121
- /* @__PURE__ */ x("div", {
122
- className: "text-xs text-text-secondary sm:text-sm",
123
- children: "Returns"
124
- })
125
- ]
126
- }),
127
- /* @__PURE__ */ S("div", {
128
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 text-center",
129
- children: [
130
- /* @__PURE__ */ x(d, { className: "mx-auto mb-2 h-6 w-6 text-text-primary sm:h-8 sm:w-8" }),
131
- /* @__PURE__ */ x("div", {
132
- className: "text-lg font-bold text-text-primary sm:text-2xl",
133
- children: o(P.currentValue, { minimumFractionDigits: 0 })
134
- }),
135
- /* @__PURE__ */ x("div", {
136
- className: "text-xs text-text-secondary sm:text-sm",
137
- children: "Current Value"
138
- })
139
- ]
140
- }),
141
- /* @__PURE__ */ S("div", {
142
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 text-center",
143
- children: [
144
- /* @__PURE__ */ x(m, { className: "mx-auto mb-2 h-6 w-6 text-text-primary sm:h-8 sm:w-8" }),
145
- /* @__PURE__ */ S("div", {
146
- className: "text-lg font-bold text-text-primary sm:text-2xl",
147
- children: [P.returnsPercentage, "%"]
148
- }),
149
- /* @__PURE__ */ x("div", {
150
- className: "text-xs text-text-secondary sm:text-sm",
151
- children: "Expected Return"
152
- })
153
- ]
154
- })
155
- ]
156
- }) : F && /* @__PURE__ */ S("div", {
137
+ F && /* @__PURE__ */ T(ae, { children: [/* @__PURE__ */ w("h2", {
138
+ className: "mb-4 text-base font-semibold text-text-primary",
139
+ children: "Your Position"
140
+ }), /* @__PURE__ */ T("div", {
157
141
  className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
158
142
  children: [
159
- /* @__PURE__ */ S("div", {
160
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 text-center",
161
- children: [
162
- /* @__PURE__ */ x(g, { className: "mx-auto mb-2 h-6 w-6 text-primary sm:h-8 sm:w-8" }),
163
- /* @__PURE__ */ x("div", {
164
- className: "text-lg font-bold text-text-primary sm:text-2xl",
165
- children: o(F.targetAmount, { minimumFractionDigits: 0 })
166
- }),
167
- /* @__PURE__ */ x("div", {
168
- className: "text-xs text-text-secondary sm:text-sm",
169
- children: "Target Amount"
170
- })
171
- ]
143
+ /* @__PURE__ */ w(l, {
144
+ label: "Your Investment",
145
+ value: o(F.investedAmount, { minimumFractionDigits: 0 }),
146
+ icon: /* @__PURE__ */ w(m, { className: "h-4 w-4" })
172
147
  }),
173
- /* @__PURE__ */ S("div", {
174
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 text-center",
175
- children: [
176
- /* @__PURE__ */ x(p, { className: "mx-auto mb-2 h-6 w-6 text-status-success-text sm:h-8 sm:w-8" }),
177
- /* @__PURE__ */ x("div", {
178
- className: "text-lg font-bold text-text-primary sm:text-2xl",
179
- children: o(F.raisedAmount, { minimumFractionDigits: 0 })
180
- }),
181
- /* @__PURE__ */ x("div", {
182
- className: "text-xs text-text-secondary sm:text-sm",
183
- children: "Raised So Far"
184
- })
185
- ]
148
+ /* @__PURE__ */ w(l, {
149
+ label: "Current Value",
150
+ value: o(F.currentValue, { minimumFractionDigits: 0 }),
151
+ icon: /* @__PURE__ */ w(x, { className: "h-4 w-4" })
186
152
  }),
187
- /* @__PURE__ */ S("div", {
188
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 text-center",
189
- children: [
190
- /* @__PURE__ */ x(_, { className: "mx-auto mb-2 h-6 w-6 text-status-success-text sm:h-8 sm:w-8" }),
191
- /* @__PURE__ */ S("div", {
192
- className: "text-lg font-bold text-status-success-text sm:text-2xl",
193
- children: [F.expectedReturns, "%"]
194
- }),
195
- /* @__PURE__ */ x("div", {
196
- className: "text-xs text-text-secondary sm:text-sm",
197
- children: "Expected Returns"
198
- })
199
- ]
153
+ /* @__PURE__ */ w(l, {
154
+ label: "Returns",
155
+ value: `${Q >= 0 ? "+" : ""}${Q.toFixed(1)}%`,
156
+ delta: Number(Q.toFixed(1)),
157
+ deltaLabel: "on invested",
158
+ icon: /* @__PURE__ */ w(x, { className: "h-4 w-4" })
200
159
  }),
201
- /* @__PURE__ */ S("div", {
202
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 text-center",
203
- children: [
204
- /* @__PURE__ */ x(p, { className: "mx-auto mb-2 h-6 w-6 text-text-primary sm:h-8 sm:w-8" }),
205
- /* @__PURE__ */ x("div", {
206
- className: "text-lg font-bold text-text-primary sm:text-2xl",
207
- children: o(F.minimumInvestment, { minimumFractionDigits: 0 })
208
- }),
209
- /* @__PURE__ */ x("div", {
210
- className: "text-xs text-text-secondary sm:text-sm",
211
- children: "Min Investment"
212
- })
213
- ]
160
+ /* @__PURE__ */ w(l, {
161
+ label: "Realised Returns",
162
+ value: o(F.returns, { minimumFractionDigits: 0 }),
163
+ icon: /* @__PURE__ */ w(g, { className: "h-4 w-4" })
214
164
  })
215
165
  ]
216
- }) }),
217
- /* @__PURE__ */ S("div", {
166
+ })] }),
167
+ /* @__PURE__ */ T("div", {
218
168
  className: "mt-6 grid gap-6 lg:grid-cols-3",
219
- children: [/* @__PURE__ */ S("div", {
169
+ children: [/* @__PURE__ */ T("div", {
220
170
  className: "space-y-6 lg:col-span-2",
221
- children: [F && /* @__PURE__ */ S(b, { children: [F.description && /* @__PURE__ */ S("div", {
222
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 sm:p-6",
223
- children: [/* @__PURE__ */ x("h2", {
224
- className: "mb-4 text-lg font-semibold text-text-primary",
225
- children: "About This Cart"
226
- }), /* @__PURE__ */ x("p", {
227
- className: "text-sm leading-relaxed text-text-secondary",
228
- children: F.description
229
- })]
230
- }), /* @__PURE__ */ S("div", {
231
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 sm:p-6",
232
- children: [
233
- /* @__PURE__ */ x("h2", {
234
- className: "mb-4 text-lg font-semibold text-text-primary",
235
- children: "Funding Progress"
236
- }),
237
- /* @__PURE__ */ S("div", {
238
- className: "mb-2 flex justify-between text-sm",
239
- children: [/* @__PURE__ */ S("span", {
240
- className: "font-medium text-text-primary",
241
- children: [o(F.raisedAmount, { minimumFractionDigits: 0 }), " raised"]
242
- }), /* @__PURE__ */ S("span", {
243
- className: "text-text-secondary",
244
- children: ["of ", o(F.targetAmount, { minimumFractionDigits: 0 })]
171
+ children: [
172
+ I && /* @__PURE__ */ T(E, {
173
+ treatment: "glass",
174
+ className: "p-5 sm:p-6",
175
+ children: [/* @__PURE__ */ T("div", {
176
+ className: "flex flex-wrap items-start justify-between gap-3",
177
+ children: [/* @__PURE__ */ T("div", {
178
+ className: "min-w-0",
179
+ children: [/* @__PURE__ */ w("p", {
180
+ className: "text-sm text-text-secondary",
181
+ children: I.businessOwner
182
+ }), /* @__PURE__ */ w("h2", {
183
+ className: "mt-0.5 text-xl font-bold tracking-tight text-text-primary sm:text-2xl",
184
+ children: I.cartName
185
+ })]
186
+ }), Y && /* @__PURE__ */ T("span", {
187
+ className: t("inline-flex items-center gap-1.5 rounded-full border px-3 py-1 text-sm font-semibold", Y.badge),
188
+ children: [/* @__PURE__ */ w(_, { className: "h-4 w-4" }), Y.label]
245
189
  })]
246
- }),
247
- /* @__PURE__ */ x("div", {
248
- className: "h-2 w-full overflow-hidden rounded-full bg-bg-sunken",
249
- children: /* @__PURE__ */ x("div", {
250
- className: "h-full rounded-full bg-action-primary-bg transition-all duration-300",
251
- style: { width: `${R}%` }
252
- })
253
- }),
254
- /* @__PURE__ */ S("div", {
255
- className: "mt-2 flex justify-between text-xs text-text-secondary",
256
- children: [/* @__PURE__ */ S("span", { children: [R.toFixed(0), "% funded"] }), z !== null && /* @__PURE__ */ S("span", { children: [z, " days left"] })]
257
- })
258
- ]
259
- })] }), P && /* @__PURE__ */ S("div", {
260
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 sm:p-6",
261
- children: [/* @__PURE__ */ x("h2", {
262
- className: "mb-4 text-lg font-semibold text-text-primary",
263
- children: "Your Holding"
264
- }), /* @__PURE__ */ S("div", {
265
- className: "grid gap-4 sm:grid-cols-2",
190
+ }), I.description && /* @__PURE__ */ w("p", {
191
+ className: "mt-4 text-sm leading-relaxed text-text-secondary",
192
+ children: I.description
193
+ })]
194
+ }),
195
+ L && /* @__PURE__ */ T("section", { children: [/* @__PURE__ */ w("h3", {
196
+ className: "mb-3 text-lg font-semibold text-text-primary",
197
+ children: "Business Metrics"
198
+ }), /* @__PURE__ */ T("div", {
199
+ className: "grid grid-cols-2 gap-3 sm:grid-cols-4 sm:gap-4",
266
200
  children: [
267
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
268
- className: "text-sm text-text-secondary",
269
- children: "Invested Amount"
270
- }), /* @__PURE__ */ x("p", {
271
- className: "font-medium text-text-primary",
272
- children: o(P.investedAmount, { minimumFractionDigits: 0 })
273
- })] }),
274
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
275
- className: "text-sm text-text-secondary",
276
- children: "Current Value"
277
- }), /* @__PURE__ */ x("p", {
278
- className: "font-medium text-text-primary",
279
- children: o(P.currentValue, { minimumFractionDigits: 0 })
280
- })] }),
281
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
282
- className: "text-sm text-text-secondary",
283
- children: "Returns Realised"
284
- }), /* @__PURE__ */ x("p", {
285
- className: "font-medium text-text-primary",
286
- children: o(P.returns, { minimumFractionDigits: 0 })
287
- })] }),
288
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
289
- className: "text-sm text-text-secondary",
290
- children: "Invested On"
291
- }), /* @__PURE__ */ x("p", {
292
- className: "font-medium text-text-primary",
293
- children: s(P.investmentDate, {
294
- hour: void 0,
295
- minute: void 0
296
- })
297
- })] })
201
+ /* @__PURE__ */ w(l, {
202
+ label: "Rating",
203
+ value: L.rating > 0 ? L.rating.toFixed(1) : "—",
204
+ icon: /* @__PURE__ */ w(v, { className: "h-4 w-4" })
205
+ }),
206
+ /* @__PURE__ */ w(l, {
207
+ label: "Reviews",
208
+ value: L.totalRatings.toLocaleString("en-IN"),
209
+ icon: /* @__PURE__ */ w(h, { className: "h-4 w-4" })
210
+ }),
211
+ /* @__PURE__ */ w(l, {
212
+ label: "Avg Order",
213
+ value: L.averageOrderValue ? o(L.averageOrderValue, { minimumFractionDigits: 0 }) : "—",
214
+ icon: /* @__PURE__ */ w(g, { className: "h-4 w-4" })
215
+ }),
216
+ /* @__PURE__ */ w(l, {
217
+ label: "Category",
218
+ value: /* @__PURE__ */ w("span", {
219
+ className: "text-lg font-semibold capitalize",
220
+ children: L.category || "—"
221
+ }),
222
+ icon: /* @__PURE__ */ w(y, { className: "h-4 w-4" })
223
+ })
298
224
  ]
299
- })]
300
- })]
301
- }), /* @__PURE__ */ x("div", {
302
- className: "space-y-6",
303
- children: F && /* @__PURE__ */ S("div", {
304
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 sm:p-6",
305
- children: [
306
- /* @__PURE__ */ x("h2", {
225
+ })] }),
226
+ I && /* @__PURE__ */ T(E, {
227
+ treatment: "plain",
228
+ className: "p-5 sm:p-6",
229
+ children: [/* @__PURE__ */ w("h3", {
307
230
  className: "mb-4 text-lg font-semibold text-text-primary",
308
- children: "Investment Terms"
309
- }),
310
- /* @__PURE__ */ S("div", {
311
- className: "space-y-4",
312
- children: [
313
- /* @__PURE__ */ S("div", {
314
- className: "flex items-center justify-between",
315
- children: [/* @__PURE__ */ S("span", {
316
- className: "flex items-center gap-2 text-sm text-text-secondary",
317
- children: [/* @__PURE__ */ x(_, { className: "h-4 w-4" }), "Expected Returns"]
318
- }), /* @__PURE__ */ S("span", {
319
- className: "font-medium text-status-success-text",
320
- children: [F.expectedReturns, "%"]
321
- })]
322
- }),
323
- /* @__PURE__ */ S("div", {
324
- className: "flex items-center justify-between",
325
- children: [/* @__PURE__ */ S("span", {
326
- className: "flex items-center gap-2 text-sm text-text-secondary",
327
- children: [/* @__PURE__ */ x(f, { className: "h-4 w-4" }), "Lock-in Period"]
328
- }), /* @__PURE__ */ S("span", {
329
- className: "font-medium text-text-primary",
330
- children: [F.investmentPeriod, " months"]
331
- })]
332
- }),
333
- /* @__PURE__ */ S("div", {
334
- className: "flex items-center justify-between",
335
- children: [/* @__PURE__ */ S("span", {
336
- className: "flex items-center gap-2 text-sm text-text-secondary",
337
- children: [/* @__PURE__ */ x(p, { className: "h-4 w-4" }), "Minimum Investment"]
338
- }), /* @__PURE__ */ x("span", {
339
- className: "font-medium text-text-primary",
340
- children: o(F.minimumInvestment, { minimumFractionDigits: 0 })
341
- })]
342
- }),
343
- L && /* @__PURE__ */ S("div", {
344
- className: "flex items-center justify-between",
345
- children: [/* @__PURE__ */ S("span", {
346
- className: "flex items-center gap-2 text-sm text-text-secondary",
347
- children: [/* @__PURE__ */ x(h, { className: "h-4 w-4" }), "Risk Level"]
348
- }), /* @__PURE__ */ x("span", {
349
- className: t("font-medium", L.color),
350
- children: L.label
351
- })]
352
- }),
353
- F.investors.length > 0 && /* @__PURE__ */ S("div", {
354
- className: "flex items-center justify-between",
355
- children: [/* @__PURE__ */ S("span", {
356
- className: "flex items-center gap-2 text-sm text-text-secondary",
357
- children: [/* @__PURE__ */ x(v, { className: "h-4 w-4" }), "Investors"]
358
- }), /* @__PURE__ */ x("span", {
359
- className: "font-medium text-text-primary",
360
- children: F.investors.length
231
+ children: "Funding Progress"
232
+ }), /* @__PURE__ */ T("div", {
233
+ className: "flex flex-col items-center gap-6 sm:flex-row sm:gap-8",
234
+ children: [/* @__PURE__ */ w(c, {
235
+ value: X,
236
+ size: 140,
237
+ label: `${X.toFixed(0)}%`,
238
+ caption: "funded"
239
+ }), /* @__PURE__ */ T("div", {
240
+ className: "w-full flex-1 space-y-4",
241
+ children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("div", {
242
+ className: "flex items-baseline justify-between",
243
+ children: [/* @__PURE__ */ w("span", {
244
+ className: "text-2xl font-bold text-text-primary",
245
+ children: o(I.raisedAmount, { minimumFractionDigits: 0 })
246
+ }), /* @__PURE__ */ T("span", {
247
+ className: "text-sm text-text-secondary",
248
+ children: ["of ", o(I.targetAmount, { minimumFractionDigits: 0 })]
361
249
  })]
362
- })
250
+ }), /* @__PURE__ */ w("p", {
251
+ className: "mt-1 text-sm text-text-secondary",
252
+ children: "raised so far"
253
+ })] }), /* @__PURE__ */ T("div", {
254
+ className: "grid grid-cols-3 gap-3 border-t border-border-subtle pt-4 text-center",
255
+ children: [
256
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
257
+ className: "text-base font-bold text-text-primary sm:text-lg",
258
+ children: I.investors.length
259
+ }), /* @__PURE__ */ w("p", {
260
+ className: "text-xs text-text-secondary",
261
+ children: "Investors"
262
+ })] }),
263
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
264
+ className: "text-base font-bold text-text-primary sm:text-lg",
265
+ children: o(W, {
266
+ minimumFractionDigits: 0,
267
+ notation: "compact"
268
+ })
269
+ }), /* @__PURE__ */ w("p", {
270
+ className: "text-xs text-text-secondary",
271
+ children: "To Go"
272
+ })] }),
273
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
274
+ className: "text-base font-bold text-text-primary sm:text-lg",
275
+ children: Z === null ? "—" : `${Z}`
276
+ }), /* @__PURE__ */ w("p", {
277
+ className: "text-xs text-text-secondary",
278
+ children: "Days Left"
279
+ })] })
280
+ ]
281
+ })]
282
+ })]
283
+ })]
284
+ }),
285
+ F && /* @__PURE__ */ T(E, {
286
+ treatment: "plain",
287
+ className: "p-5 sm:p-6",
288
+ children: [/* @__PURE__ */ w("h3", {
289
+ className: "mb-4 text-lg font-semibold text-text-primary",
290
+ children: "Your Holding"
291
+ }), /* @__PURE__ */ T("div", {
292
+ className: "grid gap-4 sm:grid-cols-2",
293
+ children: [
294
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
295
+ className: "text-sm text-text-secondary",
296
+ children: "Invested Amount"
297
+ }), /* @__PURE__ */ w("p", {
298
+ className: "font-medium text-text-primary",
299
+ children: o(F.investedAmount, { minimumFractionDigits: 0 })
300
+ })] }),
301
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
302
+ className: "text-sm text-text-secondary",
303
+ children: "Current Value"
304
+ }), /* @__PURE__ */ w("p", {
305
+ className: "font-medium text-text-primary",
306
+ children: o(F.currentValue, { minimumFractionDigits: 0 })
307
+ })] }),
308
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
309
+ className: "text-sm text-text-secondary",
310
+ children: "Returns Realised"
311
+ }), /* @__PURE__ */ w("p", {
312
+ className: "font-medium text-text-primary",
313
+ children: o(F.returns, { minimumFractionDigits: 0 })
314
+ })] }),
315
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
316
+ className: "text-sm text-text-secondary",
317
+ children: "Invested On"
318
+ }), /* @__PURE__ */ w("p", {
319
+ className: "font-medium text-text-primary",
320
+ children: ne(F.investmentDate, {
321
+ hour: void 0,
322
+ minute: void 0
323
+ })
324
+ })] })
363
325
  ]
364
- }),
365
- F.status === "active" && !P && /* @__PURE__ */ S("button", {
366
- type: "button",
367
- onClick: () => E("/investor/opportunities"),
368
- className: "mt-6 flex w-full items-center justify-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2.5 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
369
- children: [/* @__PURE__ */ x(u, { className: "h-4 w-4" }), "Invest in this Cart"]
370
- })
371
- ]
326
+ })]
327
+ })
328
+ ]
329
+ }), /* @__PURE__ */ w("div", {
330
+ className: "space-y-6",
331
+ children: /* @__PURE__ */ w("div", {
332
+ className: "lg:sticky lg:top-6",
333
+ children: /* @__PURE__ */ T(E, {
334
+ treatment: "glass",
335
+ glow: !0,
336
+ className: "p-5 sm:p-6",
337
+ children: [
338
+ /* @__PURE__ */ w("h3", {
339
+ className: "mb-4 text-lg font-semibold text-text-primary",
340
+ children: $ ? "Invest" : "Investment Terms"
341
+ }),
342
+ /* @__PURE__ */ T("div", {
343
+ className: "space-y-3",
344
+ children: [
345
+ /* @__PURE__ */ T("div", {
346
+ className: "flex items-center justify-between",
347
+ children: [/* @__PURE__ */ T("span", {
348
+ className: "flex items-center gap-2 text-sm text-text-secondary",
349
+ children: [/* @__PURE__ */ w(x, { className: "h-4 w-4" }), "Expected returns"]
350
+ }), /* @__PURE__ */ T("span", {
351
+ className: "font-semibold text-status-success-text",
352
+ children: [I?.expectedReturns ?? F?.returnsPercentage, "% p.a."]
353
+ })]
354
+ }),
355
+ /* @__PURE__ */ T("div", {
356
+ className: "flex items-center justify-between",
357
+ children: [/* @__PURE__ */ T("span", {
358
+ className: "flex items-center gap-2 text-sm text-text-secondary",
359
+ children: [/* @__PURE__ */ w(ie, { className: "h-4 w-4" }), "Lock-in"]
360
+ }), /* @__PURE__ */ T("span", {
361
+ className: "font-semibold text-text-primary",
362
+ children: [I?.investmentPeriod ?? "—", " months"]
363
+ })]
364
+ }),
365
+ I && /* @__PURE__ */ T("div", {
366
+ className: "flex items-center justify-between",
367
+ children: [/* @__PURE__ */ T("span", {
368
+ className: "flex items-center gap-2 text-sm text-text-secondary",
369
+ children: [/* @__PURE__ */ w(m, { className: "h-4 w-4" }), "Minimum"]
370
+ }), /* @__PURE__ */ w("span", {
371
+ className: "font-semibold text-text-primary",
372
+ children: o(I.minimumInvestment, { minimumFractionDigits: 0 })
373
+ })]
374
+ }),
375
+ I && I.investors.length > 0 && /* @__PURE__ */ T("div", {
376
+ className: "flex items-center justify-between",
377
+ children: [/* @__PURE__ */ T("span", {
378
+ className: "flex items-center gap-2 text-sm text-text-secondary",
379
+ children: [/* @__PURE__ */ w(S, { className: "h-4 w-4" }), "Investors"]
380
+ }), /* @__PURE__ */ w("span", {
381
+ className: "font-semibold text-text-primary",
382
+ children: I.investors.length
383
+ })]
384
+ })
385
+ ]
386
+ }),
387
+ $ && V !== "success" && /* @__PURE__ */ T("div", {
388
+ className: "mt-5 space-y-4 border-t border-border-subtle pt-5",
389
+ children: [
390
+ /* @__PURE__ */ T("div", { children: [
391
+ /* @__PURE__ */ w("label", {
392
+ htmlFor: "invest-amount",
393
+ className: "mb-1.5 block text-sm font-medium text-text-primary",
394
+ children: "Amount"
395
+ }),
396
+ /* @__PURE__ */ T("div", {
397
+ className: "relative",
398
+ children: [/* @__PURE__ */ w(m, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ w("input", {
399
+ id: "invest-amount",
400
+ type: "number",
401
+ inputMode: "numeric",
402
+ value: z,
403
+ onChange: (e) => {
404
+ B(e.target.value), H("idle");
405
+ },
406
+ placeholder: String(U),
407
+ className: "w-full rounded-lg border border-border-subtle bg-bg-surface py-2.5 pl-9 pr-3 text-base font-semibold text-text-primary placeholder:font-normal placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
408
+ })]
409
+ }),
410
+ /* @__PURE__ */ T("p", {
411
+ className: "mt-1.5 text-xs text-text-secondary",
412
+ children: [
413
+ o(U, { minimumFractionDigits: 0 }),
414
+ " –",
415
+ " ",
416
+ o(G, { minimumFractionDigits: 0 })
417
+ ]
418
+ }),
419
+ V === "error" && /* @__PURE__ */ T("p", {
420
+ className: "mt-1 text-xs text-status-error-text",
421
+ children: [
422
+ "Enter an amount between",
423
+ " ",
424
+ o(U, { minimumFractionDigits: 0 }),
425
+ " and",
426
+ " ",
427
+ o(G, { minimumFractionDigits: 0 }),
428
+ "."
429
+ ]
430
+ })
431
+ ] }),
432
+ /* @__PURE__ */ T("div", { children: [
433
+ /* @__PURE__ */ w("p", {
434
+ className: "mb-1 text-sm font-medium text-text-primary",
435
+ children: "Projected returns"
436
+ }),
437
+ /* @__PURE__ */ T("p", {
438
+ className: "mb-2 text-xs text-text-muted",
439
+ children: [
440
+ "Forecast at ",
441
+ I?.expectedReturns,
442
+ "% over ",
443
+ I?.investmentPeriod,
444
+ " ",
445
+ "months"
446
+ ]
447
+ }),
448
+ /* @__PURE__ */ w(s, {
449
+ series: J,
450
+ height: 140,
451
+ valueFormatter: ce,
452
+ title: "Projected value over the lock-in period"
453
+ }),
454
+ q && /* @__PURE__ */ T("div", {
455
+ className: "mt-2 flex items-center justify-between rounded-lg bg-bg-sunken/60 px-3 py-2 text-sm",
456
+ children: [/* @__PURE__ */ w("span", {
457
+ className: "text-text-secondary",
458
+ children: "Projected value"
459
+ }), /* @__PURE__ */ w("span", {
460
+ className: "font-semibold text-status-success-text",
461
+ children: o(K * (1 + (I?.expectedReturns ?? 0) / 100), { minimumFractionDigits: 0 })
462
+ })]
463
+ })
464
+ ] }),
465
+ /* @__PURE__ */ w("button", {
466
+ type: "button",
467
+ onClick: le,
468
+ disabled: !q || R.isPending,
469
+ className: t("flex w-full items-center justify-center gap-2 rounded-lg px-4 py-3 text-sm font-semibold transition-colors", q && !R.isPending ? "bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg-hover" : "cursor-not-allowed bg-bg-sunken text-text-secondary"),
470
+ children: R.isPending ? "Processing…" : "Invest Now"
471
+ })
472
+ ]
473
+ }),
474
+ V === "success" && /* @__PURE__ */ T("div", {
475
+ className: "mt-5 border-t border-border-subtle pt-5 text-center",
476
+ children: [
477
+ /* @__PURE__ */ w(p, { className: "mx-auto mb-2 h-10 w-10 text-status-success-text" }),
478
+ /* @__PURE__ */ w("p", {
479
+ className: "text-sm font-medium text-text-primary",
480
+ children: "Investment successful!"
481
+ }),
482
+ /* @__PURE__ */ w("p", {
483
+ className: "mt-1 text-xs text-text-secondary",
484
+ children: "Redirecting to your portfolio…"
485
+ })
486
+ ]
487
+ }),
488
+ !$ && !F && I && /* @__PURE__ */ T("div", {
489
+ className: "mt-5 flex items-center gap-2 rounded-lg border border-border-subtle bg-bg-sunken/50 p-3 text-sm text-text-secondary",
490
+ children: [
491
+ /* @__PURE__ */ w(b, { className: "h-4 w-4 shrink-0" }),
492
+ "This opportunity is ",
493
+ I.status,
494
+ ". It's no longer accepting investments."
495
+ ]
496
+ })
497
+ ]
498
+ })
372
499
  })
373
500
  })]
374
501
  })
@@ -376,6 +503,6 @@ function E() {
376
503
  });
377
504
  }
378
505
  //#endregion
379
- export { E as InvestmentDetailsPage };
506
+ export { D as InvestmentDetailsPage };
380
507
 
381
508
  //# sourceMappingURL=InvestmentDetailsPage.js.map