@burdenoff/microfe-kadaikodi 2026.704.1 → 2026.704.3

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 (77) hide show
  1. package/dist/kadaikodi/hooks/useKadaikodiApi.js +77 -26
  2. package/dist/kadaikodi/hooks/useKadaikodiApi.js.map +1 -1
  3. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js +297 -479
  4. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js.map +1 -1
  5. package/dist/kadaikodi/pages/admin/AdminDashboard.js +114 -400
  6. package/dist/kadaikodi/pages/admin/AdminDashboard.js.map +1 -1
  7. package/dist/kadaikodi/pages/admin/AdminFinancialPage.js +166 -292
  8. package/dist/kadaikodi/pages/admin/AdminFinancialPage.js.map +1 -1
  9. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js +282 -453
  10. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js.map +1 -1
  11. package/dist/kadaikodi/pages/admin/AdminProfilePage.js +115 -242
  12. package/dist/kadaikodi/pages/admin/AdminProfilePage.js.map +1 -1
  13. package/dist/kadaikodi/pages/admin/AdminSettingsPage.js +2 -2
  14. package/dist/kadaikodi/pages/admin/AdminSettingsPage.js.map +1 -1
  15. package/dist/kadaikodi/pages/admin/CartManagementPage.js.map +1 -1
  16. package/dist/kadaikodi/pages/admin/UserManagementPage.js +5 -5
  17. package/dist/kadaikodi/pages/admin/UserManagementPage.js.map +1 -1
  18. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js +503 -627
  19. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
  20. package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js +339 -282
  21. package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
  22. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js +323 -422
  23. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
  24. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js +374 -383
  25. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
  26. package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js +249 -208
  27. package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
  28. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js +1 -1
  29. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js.map +1 -1
  30. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js +1 -1
  31. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js.map +1 -1
  32. package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js +171 -627
  33. package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js.map +1 -1
  34. package/dist/kadaikodi/pages/common/HelpSupportPage.js +331 -415
  35. package/dist/kadaikodi/pages/common/HelpSupportPage.js.map +1 -1
  36. package/dist/kadaikodi/pages/common/NotificationCenterPage.js +18 -670
  37. package/dist/kadaikodi/pages/common/NotificationCenterPage.js.map +1 -1
  38. package/dist/kadaikodi/pages/common/SettingsPage.js.map +1 -1
  39. package/dist/kadaikodi/pages/customer/CheckoutPage.js +4 -2
  40. package/dist/kadaikodi/pages/customer/CheckoutPage.js.map +1 -1
  41. package/dist/kadaikodi/pages/customer/CustomerDashboard.js +191 -369
  42. package/dist/kadaikodi/pages/customer/CustomerDashboard.js.map +1 -1
  43. package/dist/kadaikodi/pages/customer/CustomerProfilePage.js +233 -389
  44. package/dist/kadaikodi/pages/customer/CustomerProfilePage.js.map +1 -1
  45. package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js.map +1 -1
  46. package/dist/kadaikodi/pages/customer/OrderHistoryPage.js.map +1 -1
  47. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js.map +1 -1
  48. package/dist/kadaikodi/pages/customer/PaymentMethodsPage.js +76 -118
  49. package/dist/kadaikodi/pages/customer/PaymentMethodsPage.js.map +1 -1
  50. package/dist/kadaikodi/pages/customer/ReviewsPage.js.map +1 -1
  51. package/dist/kadaikodi/pages/customer/SavedAddressesPage.js +135 -213
  52. package/dist/kadaikodi/pages/customer/SavedAddressesPage.js.map +1 -1
  53. package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js +272 -774
  54. package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js.map +1 -1
  55. package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js +232 -343
  56. package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
  57. package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js +112 -600
  58. package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js.map +1 -1
  59. package/dist/kadaikodi/pages/investor/InvestorDashboard.js +127 -294
  60. package/dist/kadaikodi/pages/investor/InvestorDashboard.js.map +1 -1
  61. package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js +204 -290
  62. package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js.map +1 -1
  63. package/dist/kadaikodi/pages/investor/InvestorPortfolioPage.js +159 -500
  64. package/dist/kadaikodi/pages/investor/InvestorPortfolioPage.js.map +1 -1
  65. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js +399 -487
  66. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js.map +1 -1
  67. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js +13 -13
  68. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js.map +1 -1
  69. package/dist/kadaikodi/pages/worker/WorkerDashboard.js +192 -296
  70. package/dist/kadaikodi/pages/worker/WorkerDashboard.js.map +1 -1
  71. package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js +245 -397
  72. package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js.map +1 -1
  73. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js +85 -117
  74. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js.map +1 -1
  75. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js +177 -395
  76. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js.map +1 -1
  77. package/package.json +1 -1
@@ -2,882 +2,380 @@ 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
4
  import { EmptyState as r } from "../../components/EmptyState.js";
5
- import { formatCurrency as i, formatDate as a } from "../../utils/formatters.js";
6
- import { useEffect as o, useState as s } from "react";
7
- import { Activity as c, AlertCircle as l, ArrowLeft as u, BarChart3 as d, Building2 as f, CheckCircle2 as p, Clock as m, Download as h, FileText as g, IndianRupee as _, Package as v, PieChart as y, Star as b, TrendingUp as x, Users as S, X as C } from "lucide-react";
8
- import { jsx as w, jsxs as T } from "react/jsx-runtime";
9
- import { EmphasisPanel as E, NextSteps as D, PagePurpose as O } from "@burdenoff/fe-libs/ui";
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";
10
12
  //#region src/kadaikodi/pages/investor/InvestmentDetailsPage.tsx
11
- var k = {
12
- id: "INV-001",
13
- cartName: "Dosa Express - Koramangala",
14
- cartOwner: "Suresh Rao",
15
- location: "Koramangala 6th Block, Bangalore",
16
- businessType: "South Indian Cuisine",
17
- establishedDate: "2022-06-15",
18
- investmentAmount: 5e5,
19
- investmentDate: "2023-03-10",
20
- equityPercentage: 15,
21
- valuationAtInvestment: 3333333,
22
- currentValuation: 4333333,
23
- investmentType: "Equity Investment",
24
- monthlyRevenue: 28e4,
25
- monthlyOrders: 1850,
26
- averageOrderValue: 151,
27
- customerRating: 4.6,
28
- activeCustomers: 450,
29
- revenueGrowth: 18.5,
30
- profitMargin: 22,
31
- returnOnInvestment: 30,
32
- paybackPeriod: "2.5 years",
33
- documents: [
34
- {
35
- type: "Investment Agreement",
36
- name: "investment_agreement_dosa_express.pdf",
37
- uploadDate: "2023-03-10",
38
- status: "verified"
39
- },
40
- {
41
- type: "Financial Statement",
42
- name: "financial_statement_q4_2023.pdf",
43
- uploadDate: "2024-01-05",
44
- status: "verified"
45
- },
46
- {
47
- type: "Tax Returns",
48
- name: "tax_returns_2023.pdf",
49
- uploadDate: "2024-01-10",
50
- status: "pending"
51
- },
52
- {
53
- type: "Business License",
54
- name: "fssai_license.pdf",
55
- uploadDate: "2023-03-08",
56
- status: "verified"
57
- }
58
- ],
59
- recentUpdates: [
60
- {
61
- date: "2024-01-12",
62
- type: "Performance",
63
- description: "Monthly revenue exceeded target by 15%"
64
- },
65
- {
66
- date: "2024-01-08",
67
- type: "Operations",
68
- description: "Expanded menu with 5 new items"
69
- },
70
- {
71
- date: "2024-01-01",
72
- type: "Financial",
73
- description: "Q4 2023 profit distribution completed"
74
- },
75
- {
76
- date: "2023-12-20",
77
- type: "Growth",
78
- description: "Opened second location in BTM Layout"
79
- }
80
- ]
81
- };
82
- function A(e) {
13
+ function T(e) {
83
14
  switch (e) {
84
- case "verified": return {
85
- color: "text-status-success-text",
86
- Icon: p,
87
- label: "Verified"
15
+ case "low": return {
16
+ label: "Low Risk",
17
+ color: "text-status-success-text"
88
18
  };
89
- case "pending": return {
90
- color: "text-status-warning-text",
91
- Icon: m,
92
- label: "Pending"
19
+ case "medium": return {
20
+ label: "Medium Risk",
21
+ color: "text-status-warning-text"
93
22
  };
94
- case "rejected": return {
95
- color: "text-status-error-text",
96
- Icon: l,
97
- label: "Rejected"
23
+ case "high": return {
24
+ label: "High Risk",
25
+ color: "text-status-error-text"
98
26
  };
99
27
  default: return {
100
- color: "text-text-secondary",
101
- Icon: l,
102
- label: e
28
+ label: e,
29
+ color: "text-text-secondary"
103
30
  };
104
31
  }
105
32
  }
106
- function j() {
107
- let { navigateTo: l } = e(), [p, m] = s("overview"), [j, M] = s(!0), [N, P] = s(!1), [F, I] = s(null);
108
- o(() => {
109
- let e = setTimeout(() => {
110
- I(k), M(!1);
111
- }, 600);
112
- return () => clearTimeout(e);
113
- }, []);
114
- let L = [
115
- {
116
- id: "overview",
117
- label: "Overview",
118
- Icon: d
119
- },
120
- {
121
- id: "financials",
122
- label: "Financials",
123
- Icon: _
124
- },
125
- {
126
- id: "documents",
127
- label: "Documents",
128
- Icon: g
129
- },
130
- {
131
- id: "updates",
132
- label: "Updates",
133
- Icon: c
134
- }
135
- ];
136
- if (j) return /* @__PURE__ */ w(n, {
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, [
35
+ k,
36
+ O,
37
+ P
38
+ ]);
39
+ if (N) return /* @__PURE__ */ x(n, {
137
40
  title: "Investment Details",
138
41
  description: "Loading...",
139
- children: /* @__PURE__ */ w("div", {
42
+ children: /* @__PURE__ */ x("div", {
140
43
  className: "flex items-center justify-center py-20",
141
- children: /* @__PURE__ */ T("div", {
44
+ children: /* @__PURE__ */ S("div", {
142
45
  className: "text-center",
143
- children: [/* @__PURE__ */ w("div", { className: "mx-auto mb-4 h-12 w-12 animate-spin rounded-full border-b-2 border-primary" }), /* @__PURE__ */ w("p", {
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", {
144
47
  className: "text-sm text-text-secondary",
145
48
  children: "Loading investment details..."
146
49
  })]
147
50
  })
148
51
  })
149
52
  });
150
- if (!F) return /* @__PURE__ */ w(n, {
53
+ if (!F && !P) return /* @__PURE__ */ x(n, {
151
54
  title: "Investment Not Found",
152
- children: /* @__PURE__ */ w(r, {
55
+ children: /* @__PURE__ */ x(r, {
153
56
  illustration: "empty-generic",
154
57
  title: "Investment not found",
155
58
  description: "We couldn't find this investment. It may have been closed or the link is out of date.",
156
- action: /* @__PURE__ */ w("button", {
59
+ action: /* @__PURE__ */ x("button", {
157
60
  type: "button",
158
- onClick: () => l("/investor/portfolio"),
61
+ onClick: () => E("/investor/portfolio"),
159
62
  className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
160
63
  children: "Back to Portfolio"
161
64
  })
162
65
  })
163
66
  });
164
- let R = F.currentValuation * (F.equityPercentage / 100) - F.investmentAmount, z = R / F.investmentAmount * 100;
165
- return /* @__PURE__ */ T(n, {
166
- title: F.cartName,
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,
167
70
  description: "Investment Details & Performance",
168
- actions: /* @__PURE__ */ T("div", {
169
- className: "flex items-center gap-2",
71
+ actions: /* @__PURE__ */ S("button", {
72
+ type: "button",
73
+ onClick: () => E("/investor/portfolio"),
74
+ 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",
170
75
  children: [
171
- /* @__PURE__ */ T("button", {
172
- type: "button",
173
- onClick: () => l("/investor/portfolio"),
174
- 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",
175
- children: [
176
- /* @__PURE__ */ w(u, { className: "h-4 w-4" }),
177
- /* @__PURE__ */ w("span", {
178
- className: "hidden sm:inline",
179
- children: "Back to Portfolio"
180
- }),
181
- /* @__PURE__ */ w("span", {
182
- className: "sm:hidden",
183
- children: "Back"
184
- })
185
- ]
76
+ /* @__PURE__ */ x(l, { className: "h-4 w-4" }),
77
+ /* @__PURE__ */ x("span", {
78
+ className: "hidden sm:inline",
79
+ children: "Back to Portfolio"
186
80
  }),
187
- /* @__PURE__ */ T("button", {
188
- type: "button",
189
- onClick: () => alert("Report export initiated"),
190
- 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",
191
- children: [
192
- /* @__PURE__ */ w(h, { className: "h-4 w-4" }),
193
- /* @__PURE__ */ w("span", {
194
- className: "hidden sm:inline",
195
- children: "Export Report"
196
- }),
197
- /* @__PURE__ */ w("span", {
198
- className: "sm:hidden",
199
- children: "Export"
200
- })
201
- ]
202
- }),
203
- /* @__PURE__ */ T("button", {
204
- type: "button",
205
- onClick: () => P(!0),
206
- 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",
207
- children: [/* @__PURE__ */ w("span", {
208
- className: "hidden sm:inline",
209
- children: "Manage Investment"
210
- }), /* @__PURE__ */ w("span", {
211
- className: "sm:hidden",
212
- children: "Manage"
213
- })]
81
+ /* @__PURE__ */ x("span", {
82
+ className: "sm:hidden",
83
+ children: "Back"
214
84
  })
215
85
  ]
216
86
  }),
217
87
  children: [
218
- /* @__PURE__ */ w(O, {
88
+ /* @__PURE__ */ x(w, {
219
89
  className: "mb-6",
220
- children: "A deep dive into one of your investments. Use this page to see exactly how this cart is performing for you — your stake, current value and returns — and to dig into its financials, review documents, and follow the latest updates from the owner. When you want to add to or exit this position, use Manage Investment."
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."
221
91
  }),
222
- /* @__PURE__ */ w(D, {
223
- storageKey: "kadaikodi-investment-details",
224
- className: "mb-6",
225
- steps: [
226
- {
227
- id: "financials",
228
- label: "Review the financials",
229
- description: "See revenue, costs and how your returns are calculated.",
230
- onClick: () => m("financials")
231
- },
232
- {
233
- id: "updates",
234
- label: "Catch up on owner updates",
235
- description: "Read the latest progress notes from the cart.",
236
- onClick: () => m("updates")
237
- },
238
- {
239
- id: "manage",
240
- label: "Manage this investment",
241
- description: "Top up your stake or start an exit.",
242
- onClick: () => P(!0)
243
- }
244
- ]
245
- }),
246
- /* @__PURE__ */ w(E, { children: /* @__PURE__ */ T("div", {
92
+ /* @__PURE__ */ x(C, { children: P ? /* @__PURE__ */ S("div", {
247
93
  className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
248
94
  children: [
249
- /* @__PURE__ */ T("div", {
95
+ /* @__PURE__ */ S("div", {
250
96
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4 text-center",
251
97
  children: [
252
- /* @__PURE__ */ w(_, { className: "mx-auto mb-2 h-6 w-6 text-primary sm:h-8 sm:w-8" }),
253
- /* @__PURE__ */ w("div", {
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", {
254
100
  className: "text-lg font-bold text-text-primary sm:text-2xl",
255
- children: i(F.investmentAmount, { minimumFractionDigits: 0 })
101
+ children: o(P.investedAmount, { minimumFractionDigits: 0 })
256
102
  }),
257
- /* @__PURE__ */ w("div", {
103
+ /* @__PURE__ */ x("div", {
258
104
  className: "text-xs text-text-secondary sm:text-sm",
259
105
  children: "Your Investment"
260
106
  })
261
107
  ]
262
108
  }),
263
- /* @__PURE__ */ T("div", {
109
+ /* @__PURE__ */ S("div", {
264
110
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4 text-center",
265
111
  children: [
266
- /* @__PURE__ */ w(x, { className: "mx-auto mb-2 h-6 w-6 text-status-success-text sm:h-8 sm:w-8" }),
267
- /* @__PURE__ */ T("div", {
268
- className: "text-lg font-bold text-status-success-text sm:text-2xl",
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"),
269
115
  children: [
270
- z > 0 ? "+" : "",
271
- z.toFixed(1),
116
+ V >= 0 ? "+" : "",
117
+ V.toFixed(1),
272
118
  "%"
273
119
  ]
274
120
  }),
275
- /* @__PURE__ */ w("div", {
121
+ /* @__PURE__ */ x("div", {
276
122
  className: "text-xs text-text-secondary sm:text-sm",
277
123
  children: "Returns"
278
124
  })
279
125
  ]
280
126
  }),
281
- /* @__PURE__ */ T("div", {
127
+ /* @__PURE__ */ S("div", {
282
128
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4 text-center",
283
129
  children: [
284
- /* @__PURE__ */ w(y, { className: "mx-auto mb-2 h-6 w-6 text-text-primary sm:h-8 sm:w-8" }),
285
- /* @__PURE__ */ T("div", {
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", {
286
132
  className: "text-lg font-bold text-text-primary sm:text-2xl",
287
- children: [F.equityPercentage, "%"]
133
+ children: o(P.currentValue, { minimumFractionDigits: 0 })
288
134
  }),
289
- /* @__PURE__ */ w("div", {
135
+ /* @__PURE__ */ x("div", {
290
136
  className: "text-xs text-text-secondary sm:text-sm",
291
- children: "Equity Stake"
137
+ children: "Current Value"
292
138
  })
293
139
  ]
294
140
  }),
295
- /* @__PURE__ */ T("div", {
141
+ /* @__PURE__ */ S("div", {
296
142
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4 text-center",
297
143
  children: [
298
- /* @__PURE__ */ w(f, { className: "mx-auto mb-2 h-6 w-6 text-text-primary sm:h-8 sm:w-8" }),
299
- /* @__PURE__ */ w("div", {
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", {
300
146
  className: "text-lg font-bold text-text-primary sm:text-2xl",
301
- children: i(F.currentValuation * (F.equityPercentage / 100), { minimumFractionDigits: 0 })
147
+ children: [P.returnsPercentage, "%"]
302
148
  }),
303
- /* @__PURE__ */ w("div", {
149
+ /* @__PURE__ */ x("div", {
304
150
  className: "text-xs text-text-secondary sm:text-sm",
305
- children: "Current Value"
151
+ children: "Expected Return"
306
152
  })
307
153
  ]
308
154
  })
309
155
  ]
310
- }) }),
311
- /* @__PURE__ */ w("div", {
312
- className: "mt-6 flex gap-2 overflow-x-auto pb-2",
313
- children: L.map((e) => /* @__PURE__ */ T("button", {
314
- type: "button",
315
- onClick: () => m(e.id),
316
- className: t("flex items-center gap-2 whitespace-nowrap rounded-lg px-3 py-2 text-sm font-medium transition-colors sm:px-4 sm:py-3", p === e.id ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-surface text-text-primary hover:bg-bg-sunken"),
317
- children: [
318
- /* @__PURE__ */ w(e.Icon, { className: "h-4 w-4 flex-shrink-0" }),
319
- /* @__PURE__ */ w("span", {
320
- className: "hidden sm:inline",
321
- children: e.label
322
- }),
323
- /* @__PURE__ */ w("span", {
324
- className: "sm:hidden",
325
- children: e.label.split(" ")[0]
326
- })
327
- ]
328
- }, e.id))
329
- }),
330
- /* @__PURE__ */ T("div", {
331
- className: "mt-6",
156
+ }) : F && /* @__PURE__ */ S("div", {
157
+ className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
332
158
  children: [
333
- p === "overview" && /* @__PURE__ */ T("div", {
334
- className: "grid gap-6 lg:grid-cols-3",
335
- children: [/* @__PURE__ */ T("div", {
336
- className: "space-y-6 lg:col-span-2",
337
- children: [/* @__PURE__ */ T("div", {
338
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 sm:p-6",
339
- children: [/* @__PURE__ */ w("h2", {
340
- className: "mb-4 text-lg font-semibold text-text-primary sm:mb-6",
341
- children: "Business Information"
342
- }), /* @__PURE__ */ T("div", {
343
- className: "grid gap-4 sm:grid-cols-2 sm:gap-6",
344
- children: [
345
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
346
- className: "text-sm text-text-secondary",
347
- children: "Owner"
348
- }), /* @__PURE__ */ w("p", {
349
- className: "font-medium text-text-primary",
350
- children: F.cartOwner
351
- })] }),
352
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
353
- className: "text-sm text-text-secondary",
354
- children: "Business Type"
355
- }), /* @__PURE__ */ w("p", {
356
- className: "font-medium text-text-primary",
357
- children: F.businessType
358
- })] }),
359
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
360
- className: "text-sm text-text-secondary",
361
- children: "Location"
362
- }), /* @__PURE__ */ w("p", {
363
- className: "font-medium text-text-primary",
364
- children: F.location
365
- })] }),
366
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
367
- className: "text-sm text-text-secondary",
368
- children: "Established"
369
- }), /* @__PURE__ */ w("p", {
370
- className: "font-medium text-text-primary",
371
- children: a(F.establishedDate, {
372
- hour: void 0,
373
- minute: void 0
374
- })
375
- })] })
376
- ]
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
+ ]
172
+ }),
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
+ ]
186
+ }),
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
+ ]
200
+ }),
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
+ ]
214
+ })
215
+ ]
216
+ }) }),
217
+ /* @__PURE__ */ S("div", {
218
+ className: "mt-6 grid gap-6 lg:grid-cols-3",
219
+ children: [/* @__PURE__ */ S("div", {
220
+ 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 })]
377
245
  })]
378
- }), /* @__PURE__ */ T("div", {
379
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 sm:p-6",
380
- children: [
381
- /* @__PURE__ */ w("h2", {
382
- className: "mb-4 text-lg font-semibold text-text-primary sm:mb-6",
383
- children: "Performance Metrics"
384
- }),
385
- /* @__PURE__ */ T("div", {
386
- className: "grid grid-cols-1 gap-4 text-center sm:grid-cols-3 sm:gap-6",
387
- children: [
388
- /* @__PURE__ */ T("div", { children: [
389
- /* @__PURE__ */ w(v, { className: "mx-auto mb-2 h-6 w-6 text-primary sm:h-8 sm:w-8" }),
390
- /* @__PURE__ */ w("div", {
391
- className: "text-xl font-bold text-text-primary sm:text-2xl",
392
- children: F.monthlyOrders
393
- }),
394
- /* @__PURE__ */ w("div", {
395
- className: "text-xs text-text-secondary sm:text-sm",
396
- children: "Monthly Orders"
397
- })
398
- ] }),
399
- /* @__PURE__ */ T("div", { children: [
400
- /* @__PURE__ */ w(_, { className: "mx-auto mb-2 h-6 w-6 text-status-success-text sm:h-8 sm:w-8" }),
401
- /* @__PURE__ */ w("div", {
402
- className: "text-xl font-bold text-text-primary sm:text-2xl",
403
- children: i(F.monthlyRevenue, { minimumFractionDigits: 0 })
404
- }),
405
- /* @__PURE__ */ w("div", {
406
- className: "text-xs text-text-secondary sm:text-sm",
407
- children: "Monthly Revenue"
408
- })
409
- ] }),
410
- /* @__PURE__ */ T("div", { children: [
411
- /* @__PURE__ */ w(S, { className: "mx-auto mb-2 h-6 w-6 text-text-primary sm:h-8 sm:w-8" }),
412
- /* @__PURE__ */ w("div", {
413
- className: "text-xl font-bold text-text-primary sm:text-2xl",
414
- children: F.activeCustomers
415
- }),
416
- /* @__PURE__ */ w("div", {
417
- className: "text-xs text-text-secondary sm:text-sm",
418
- children: "Active Customers"
419
- })
420
- ] })
421
- ]
422
- }),
423
- /* @__PURE__ */ T("div", {
424
- className: "mt-4 flex flex-col items-start justify-between gap-4 border-t border-border-subtle pt-4 sm:mt-6 sm:flex-row sm:items-center sm:pt-6",
425
- children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
426
- className: "text-sm text-text-secondary",
427
- children: "Customer Rating"
428
- }), /* @__PURE__ */ T("div", {
429
- className: "mt-1 flex items-center gap-1",
430
- children: [Array.from({ length: 5 }, (e, n) => /* @__PURE__ */ w(b, { className: t("h-4 w-4", n < Math.floor(F.customerRating) ? "fill-status-warning-text text-status-warning-text" : "fill-none text-text-secondary/40") }, n)), /* @__PURE__ */ w("span", {
431
- className: "ml-1 text-sm font-medium text-text-primary",
432
- children: F.customerRating
433
- })]
434
- })] }), /* @__PURE__ */ T("div", {
435
- className: "text-left sm:text-right",
436
- children: [/* @__PURE__ */ w("p", {
437
- className: "text-sm text-text-secondary",
438
- children: "Avg Order Value"
439
- }), /* @__PURE__ */ w("p", {
440
- className: "text-lg font-semibold text-text-primary",
441
- children: i(F.averageOrderValue, { minimumFractionDigits: 0 })
442
- })]
443
- })]
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",
266
+ 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
444
296
  })
445
- ]
446
- })]
447
- }), /* @__PURE__ */ T("div", {
448
- className: "space-y-6",
449
- children: [/* @__PURE__ */ T("div", {
450
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 sm:p-6",
451
- children: [/* @__PURE__ */ w("h2", {
452
- className: "mb-4 text-lg font-semibold text-text-primary sm:mb-6",
453
- children: "Investment Summary"
454
- }), /* @__PURE__ */ T("div", {
455
- className: "space-y-4",
456
- children: [
457
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
458
- className: "text-sm text-text-secondary",
459
- children: "Investment Date"
460
- }), /* @__PURE__ */ w("p", {
461
- className: "font-medium text-text-primary",
462
- children: a(F.investmentDate, {
463
- hour: void 0,
464
- minute: void 0
465
- })
466
- })] }),
467
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
468
- className: "text-sm text-text-secondary",
469
- children: "Investment Type"
470
- }), /* @__PURE__ */ w("p", {
471
- className: "font-medium text-text-primary",
472
- children: F.investmentType
473
- })] }),
474
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
475
- className: "text-sm text-text-secondary",
476
- children: "Initial Valuation"
477
- }), /* @__PURE__ */ w("p", {
478
- className: "font-medium text-text-primary",
479
- children: i(F.valuationAtInvestment, { minimumFractionDigits: 0 })
480
- })] }),
481
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
482
- className: "text-sm text-text-secondary",
483
- children: "Current Valuation"
484
- }), /* @__PURE__ */ w("p", {
485
- className: "text-lg font-medium text-text-primary",
486
- children: i(F.currentValuation, { minimumFractionDigits: 0 })
487
- })] }),
488
- /* @__PURE__ */ w("div", {
489
- className: "border-t border-border-subtle pt-4",
490
- children: /* @__PURE__ */ T("div", {
491
- className: "flex items-center justify-between",
492
- children: [/* @__PURE__ */ w("span", {
493
- className: "text-sm text-text-secondary",
494
- children: "Your Returns"
495
- }), /* @__PURE__ */ T("span", {
496
- className: t("text-lg font-semibold", R > 0 ? "text-status-success-text" : "text-status-error-text"),
497
- children: [R > 0 ? "+" : "", i(R, { minimumFractionDigits: 0 })]
498
- })]
499
- })
500
- })
501
- ]
502
- })]
503
- }), /* @__PURE__ */ T("div", {
504
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 sm:p-6",
505
- children: [/* @__PURE__ */ w("h2", {
506
- className: "mb-4 text-lg font-semibold text-text-primary sm:mb-6",
507
- children: "Growth Indicators"
508
- }), /* @__PURE__ */ T("div", {
509
- className: "space-y-4",
510
- children: [
511
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("div", {
512
- className: "mb-2 flex items-center justify-between",
513
- children: [/* @__PURE__ */ w("span", {
514
- className: "text-sm text-text-secondary",
515
- children: "Revenue Growth"
516
- }), /* @__PURE__ */ T("span", {
517
- className: "text-sm font-medium text-status-success-text",
518
- children: [
519
- "+",
520
- F.revenueGrowth,
521
- "%"
522
- ]
523
- })]
524
- }), /* @__PURE__ */ w("div", {
525
- className: "h-2 w-full overflow-hidden rounded-full bg-bg-sunken",
526
- children: /* @__PURE__ */ w("div", {
527
- className: "h-full rounded-full bg-status-success-text",
528
- style: { width: `${Math.min(F.revenueGrowth, 100)}%` }
529
- })
530
- })] }),
531
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("div", {
532
- className: "mb-2 flex items-center justify-between",
533
- children: [/* @__PURE__ */ w("span", {
534
- className: "text-sm text-text-secondary",
535
- children: "Profit Margin"
536
- }), /* @__PURE__ */ T("span", {
537
- className: "text-sm font-medium text-text-primary",
538
- children: [F.profitMargin, "%"]
539
- })]
540
- }), /* @__PURE__ */ w("div", {
541
- className: "h-2 w-full overflow-hidden rounded-full bg-bg-sunken",
542
- children: /* @__PURE__ */ w("div", {
543
- className: "h-full rounded-full bg-action-primary-bg",
544
- style: { width: `${F.profitMargin}%` }
545
- })
546
- })] }),
547
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("div", {
548
- className: "mb-2 flex items-center justify-between",
549
- children: [/* @__PURE__ */ w("span", {
550
- className: "text-sm text-text-secondary",
551
- children: "ROI"
552
- }), /* @__PURE__ */ T("span", {
553
- className: "text-sm font-medium text-status-success-text",
554
- children: [
555
- "+",
556
- F.returnOnInvestment,
557
- "%"
558
- ]
559
- })]
560
- }), /* @__PURE__ */ w("div", {
561
- className: "h-2 w-full overflow-hidden rounded-full bg-bg-sunken",
562
- children: /* @__PURE__ */ w("div", {
563
- className: "h-full rounded-full bg-status-success-text",
564
- style: { width: `${Math.min(F.returnOnInvestment, 100)}%` }
565
- })
566
- })] }),
567
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
568
- className: "text-sm text-text-secondary",
569
- children: "Expected Payback"
570
- }), /* @__PURE__ */ w("p", {
571
- className: "font-medium text-text-primary",
572
- children: F.paybackPeriod
573
- })] })
574
- ]
575
- })]
576
- })]
297
+ })] })
298
+ ]
577
299
  })]
578
- }),
579
- p === "financials" && /* @__PURE__ */ T("div", {
300
+ })]
301
+ }), /* @__PURE__ */ x("div", {
302
+ className: "space-y-6",
303
+ children: F && /* @__PURE__ */ S("div", {
580
304
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4 sm:p-6",
581
305
  children: [
582
- /* @__PURE__ */ w("h2", {
583
- className: "mb-4 text-lg font-semibold text-text-primary sm:mb-6",
584
- children: "Financial Performance"
306
+ /* @__PURE__ */ x("h2", {
307
+ className: "mb-4 text-lg font-semibold text-text-primary",
308
+ children: "Investment Terms"
585
309
  }),
586
- /* @__PURE__ */ T("div", {
587
- className: "mb-6 grid grid-cols-2 gap-4 lg:grid-cols-4",
310
+ /* @__PURE__ */ S("div", {
311
+ className: "space-y-4",
588
312
  children: [
589
- /* @__PURE__ */ T("div", {
590
- className: "rounded-lg bg-bg-sunken/50 p-3",
591
- children: [/* @__PURE__ */ w("p", {
592
- className: "text-xs text-text-secondary",
593
- children: "Monthly Revenue"
594
- }), /* @__PURE__ */ w("p", {
595
- className: "mt-1 text-lg font-bold text-text-primary",
596
- children: i(F.monthlyRevenue, { minimumFractionDigits: 0 })
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"]
597
331
  })]
598
332
  }),
599
- /* @__PURE__ */ T("div", {
600
- className: "rounded-lg bg-bg-sunken/50 p-3",
601
- children: [/* @__PURE__ */ w("p", {
602
- className: "text-xs text-text-secondary",
603
- children: "Revenue Growth"
604
- }), /* @__PURE__ */ T("p", {
605
- className: "mt-1 text-lg font-bold text-status-success-text",
606
- children: [
607
- "+",
608
- F.revenueGrowth,
609
- "%"
610
- ]
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 })
611
341
  })]
612
342
  }),
613
- /* @__PURE__ */ T("div", {
614
- className: "rounded-lg bg-bg-sunken/50 p-3",
615
- children: [/* @__PURE__ */ w("p", {
616
- className: "text-xs text-text-secondary",
617
- children: "Profit Margin"
618
- }), /* @__PURE__ */ T("p", {
619
- className: "mt-1 text-lg font-bold text-text-primary",
620
- children: [F.profitMargin, "%"]
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
621
351
  })]
622
352
  }),
623
- /* @__PURE__ */ T("div", {
624
- className: "rounded-lg bg-bg-sunken/50 p-3",
625
- children: [/* @__PURE__ */ w("p", {
626
- className: "text-xs text-text-secondary",
627
- children: "Avg Order Value"
628
- }), /* @__PURE__ */ w("p", {
629
- className: "mt-1 text-lg font-bold text-text-primary",
630
- children: i(F.averageOrderValue, { minimumFractionDigits: 0 })
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
631
361
  })]
632
362
  })
633
363
  ]
634
364
  }),
635
- /* @__PURE__ */ w("div", {
636
- className: "overflow-hidden rounded-lg border border-border-subtle",
637
- children: /* @__PURE__ */ T("table", {
638
- className: "w-full",
639
- children: [/* @__PURE__ */ w("thead", { children: /* @__PURE__ */ T("tr", {
640
- className: "bg-bg-sunken/50",
641
- children: [
642
- /* @__PURE__ */ w("th", {
643
- className: "px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-text-secondary",
644
- children: "Metric"
645
- }),
646
- /* @__PURE__ */ w("th", {
647
- className: "px-4 py-3 text-right text-xs font-medium uppercase tracking-wider text-text-secondary",
648
- children: "Value"
649
- }),
650
- /* @__PURE__ */ w("th", {
651
- className: "px-4 py-3 text-right text-xs font-medium uppercase tracking-wider text-text-secondary",
652
- children: "Trend"
653
- })
654
- ]
655
- }) }), /* @__PURE__ */ w("tbody", {
656
- className: "divide-y divide-border",
657
- children: [
658
- {
659
- metric: "Monthly Revenue",
660
- value: i(F.monthlyRevenue, { minimumFractionDigits: 0 }),
661
- trend: "+18.5%"
662
- },
663
- {
664
- metric: "Monthly Orders",
665
- value: String(F.monthlyOrders),
666
- trend: "+12%"
667
- },
668
- {
669
- metric: "Average Order Value",
670
- value: i(F.averageOrderValue, { minimumFractionDigits: 0 }),
671
- trend: "+5.8%"
672
- },
673
- {
674
- metric: "Active Customers",
675
- value: String(F.activeCustomers),
676
- trend: "+22%"
677
- },
678
- {
679
- metric: "Profit Margin",
680
- value: `${F.profitMargin}%`,
681
- trend: "+2.1%"
682
- },
683
- {
684
- metric: "Return on Investment",
685
- value: `${F.returnOnInvestment}%`,
686
- trend: "+8.5%"
687
- }
688
- ].map((e) => /* @__PURE__ */ T("tr", {
689
- className: "hover:bg-accent/50 transition-colors",
690
- children: [
691
- /* @__PURE__ */ w("td", {
692
- className: "px-4 py-3 text-sm font-medium text-text-primary",
693
- children: e.metric
694
- }),
695
- /* @__PURE__ */ w("td", {
696
- className: "px-4 py-3 text-right text-sm text-text-primary",
697
- children: e.value
698
- }),
699
- /* @__PURE__ */ w("td", {
700
- className: "px-4 py-3 text-right text-sm font-medium text-status-success-text",
701
- children: e.trend
702
- })
703
- ]
704
- }, e.metric))
705
- })]
706
- })
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"]
707
370
  })
708
371
  ]
709
- }),
710
- p === "documents" && /* @__PURE__ */ T("div", {
711
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 sm:p-6",
712
- children: [/* @__PURE__ */ w("h2", {
713
- className: "mb-4 text-lg font-semibold text-text-primary sm:mb-6",
714
- children: "Investment Documents"
715
- }), /* @__PURE__ */ w("div", {
716
- className: "space-y-4",
717
- children: F.documents.map((e, n) => {
718
- let r = A(e.status), i = r.Icon;
719
- return /* @__PURE__ */ T("div", {
720
- className: "flex flex-col gap-4 rounded-lg bg-bg-sunken/50 p-4 sm:flex-row sm:items-center sm:justify-between",
721
- children: [/* @__PURE__ */ T("div", {
722
- className: "flex items-start gap-3 flex-1 min-w-0 sm:items-center sm:gap-4",
723
- children: [/* @__PURE__ */ w(g, { className: "mt-1 h-6 w-6 flex-shrink-0 text-primary sm:mt-0 sm:h-8 sm:w-8" }), /* @__PURE__ */ T("div", {
724
- className: "min-w-0 flex-1",
725
- children: [
726
- /* @__PURE__ */ w("h4", {
727
- className: "text-sm font-medium text-text-primary sm:text-base",
728
- children: e.type
729
- }),
730
- /* @__PURE__ */ w("p", {
731
- className: "truncate text-xs text-text-secondary sm:text-sm",
732
- children: e.name
733
- }),
734
- /* @__PURE__ */ T("p", {
735
- className: "text-xs text-text-secondary",
736
- children: [
737
- "Uploaded",
738
- " ",
739
- a(e.uploadDate, {
740
- hour: void 0,
741
- minute: void 0
742
- })
743
- ]
744
- })
745
- ]
746
- })]
747
- }), /* @__PURE__ */ T("div", {
748
- className: "flex w-full items-center justify-between gap-3 sm:w-auto sm:justify-end",
749
- children: [/* @__PURE__ */ T("span", {
750
- className: t("flex items-center gap-1 text-xs sm:text-sm", r.color),
751
- children: [/* @__PURE__ */ w(i, { className: "h-3 w-3 sm:h-4 sm:w-4" }), /* @__PURE__ */ w("span", {
752
- className: "capitalize",
753
- children: r.label
754
- })]
755
- }), /* @__PURE__ */ T("button", {
756
- type: "button",
757
- onClick: () => alert(`Downloading ${e.name}`),
758
- className: "flex items-center gap-1 rounded-lg border border-border-subtle px-3 py-1.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
759
- children: [/* @__PURE__ */ w(h, { className: "h-3 w-3 sm:h-4 sm:w-4" }), /* @__PURE__ */ w("span", {
760
- className: "hidden sm:inline",
761
- children: "Download"
762
- })]
763
- })]
764
- })]
765
- }, n);
766
- })
767
- })]
768
- }),
769
- p === "updates" && /* @__PURE__ */ T("div", {
770
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 sm:p-6",
771
- children: [/* @__PURE__ */ w("h2", {
772
- className: "mb-4 text-lg font-semibold text-text-primary sm:mb-6",
773
- children: "Recent Updates"
774
- }), /* @__PURE__ */ w("div", {
775
- className: "space-y-4",
776
- children: F.recentUpdates.map((e, t) => /* @__PURE__ */ T("div", {
777
- className: "flex gap-3 rounded-lg bg-bg-sunken/50 p-4 sm:gap-4",
778
- children: [/* @__PURE__ */ w("div", {
779
- className: "flex-shrink-0",
780
- children: /* @__PURE__ */ w(c, { className: "mt-1 h-4 w-4 text-primary sm:h-5 sm:w-5" })
781
- }), /* @__PURE__ */ T("div", {
782
- className: "min-w-0 flex-1",
783
- children: [/* @__PURE__ */ T("div", {
784
- className: "mb-1 flex flex-col gap-1 sm:flex-row sm:items-center sm:justify-between",
785
- children: [/* @__PURE__ */ w("h4", {
786
- className: "text-sm font-medium text-text-primary sm:text-base",
787
- children: e.type
788
- }), /* @__PURE__ */ w("span", {
789
- className: "text-xs text-text-secondary sm:text-sm",
790
- children: a(e.date, {
791
- hour: void 0,
792
- minute: void 0
793
- })
794
- })]
795
- }), /* @__PURE__ */ w("p", {
796
- className: "text-xs text-text-secondary sm:text-sm",
797
- children: e.description
798
- })]
799
- })]
800
- }, t))
801
- })]
802
372
  })
803
- ]
804
- }),
805
- N && /* @__PURE__ */ w("div", {
806
- className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
807
- children: /* @__PURE__ */ T("div", {
808
- className: "relative max-h-[90vh] w-full max-w-md overflow-y-auto rounded-lg border border-border-subtle bg-bg-surface",
809
- children: [
810
- /* @__PURE__ */ T("div", {
811
- className: "border-b border-border-subtle p-4 sm:p-6",
812
- children: [/* @__PURE__ */ w("button", {
813
- type: "button",
814
- onClick: () => P(!1),
815
- className: "absolute right-3 top-3 rounded-lg p-1 text-text-secondary hover:bg-accent transition-colors",
816
- children: /* @__PURE__ */ w(C, { className: "h-5 w-5" })
817
- }), /* @__PURE__ */ w("h2", {
818
- className: "text-lg font-semibold text-text-primary sm:text-xl",
819
- children: "Manage Investment"
820
- })]
821
- }),
822
- /* @__PURE__ */ T("div", {
823
- className: "space-y-4 p-4 sm:p-6",
824
- children: [
825
- /* @__PURE__ */ T("p", {
826
- className: "text-sm text-text-secondary sm:text-base",
827
- children: [
828
- "Choose an action for your investment in ",
829
- F.cartName,
830
- ":"
831
- ]
832
- }),
833
- /* @__PURE__ */ T("div", {
834
- className: "space-y-3",
835
- children: [
836
- /* @__PURE__ */ w("button", {
837
- type: "button",
838
- onClick: () => alert("Partial withdrawal request submitted"),
839
- className: "w-full rounded-lg border border-border-subtle px-4 py-2.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
840
- children: "Request Partial Withdrawal"
841
- }),
842
- /* @__PURE__ */ w("button", {
843
- type: "button",
844
- onClick: () => alert("Transfer ownership feature coming soon"),
845
- className: "w-full rounded-lg border border-border-subtle px-4 py-2.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
846
- children: "Transfer Ownership"
847
- }),
848
- /* @__PURE__ */ w("button", {
849
- type: "button",
850
- onClick: () => alert("Exit options will be displayed"),
851
- className: "w-full rounded-lg border border-border-subtle px-4 py-2.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
852
- children: "View Exit Options"
853
- })
854
- ]
855
- }),
856
- /* @__PURE__ */ w("div", {
857
- className: "rounded-lg border border-status-warning-text/30 bg-status-warning-bg-subtle p-3 sm:p-4",
858
- children: /* @__PURE__ */ w("p", {
859
- className: "text-xs text-status-warning-text sm:text-sm",
860
- children: "Any changes to your investment require approval from the business owner and may be subject to terms in your investment agreement."
861
- })
862
- })
863
- ]
864
- }),
865
- /* @__PURE__ */ w("div", {
866
- className: "flex justify-end gap-3 border-t border-border-subtle p-4 sm:p-6",
867
- children: /* @__PURE__ */ w("button", {
868
- type: "button",
869
- onClick: () => P(!1),
870
- className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
871
- children: "Cancel"
872
- })
873
- })
874
- ]
875
- })
373
+ })]
876
374
  })
877
375
  ]
878
376
  });
879
377
  }
880
378
  //#endregion
881
- export { j as InvestmentDetailsPage };
379
+ export { E as InvestmentDetailsPage };
882
380
 
883
381
  //# sourceMappingURL=InvestmentDetailsPage.js.map