@burdenoff/microfe-atheletebridge 2026.625.2 → 2026.628.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/dist/atheletebridge/AthleteBridgeRoot.js +49 -129
  2. package/dist/atheletebridge/AthleteBridgeRoot.js.map +1 -1
  3. package/dist/atheletebridge/AthleteBridgeRoutes.js +65 -184
  4. package/dist/atheletebridge/AthleteBridgeRoutes.js.map +1 -1
  5. package/dist/atheletebridge/components/CursorPager.js +34 -0
  6. package/dist/atheletebridge/components/CursorPager.js.map +1 -0
  7. package/dist/atheletebridge/components/FilterSelect.js +22 -0
  8. package/dist/atheletebridge/components/FilterSelect.js.map +1 -0
  9. package/dist/atheletebridge/components/FixtureCard.js +76 -0
  10. package/dist/atheletebridge/components/FixtureCard.js.map +1 -0
  11. package/dist/atheletebridge/components/LoadingState.js +36 -0
  12. package/dist/atheletebridge/components/LoadingState.js.map +1 -0
  13. package/dist/atheletebridge/components/ProgramCard.js +69 -0
  14. package/dist/atheletebridge/components/ProgramCard.js.map +1 -0
  15. package/dist/atheletebridge/components/SessionCard.js +76 -0
  16. package/dist/atheletebridge/components/SessionCard.js.map +1 -0
  17. package/dist/atheletebridge/components/StatusBadge.js +44 -35
  18. package/dist/atheletebridge/components/StatusBadge.js.map +1 -1
  19. package/dist/atheletebridge/components/TeamCard.js +81 -0
  20. package/dist/atheletebridge/components/TeamCard.js.map +1 -0
  21. package/dist/atheletebridge/components/domain.js +47 -0
  22. package/dist/atheletebridge/components/domain.js.map +1 -0
  23. package/dist/atheletebridge/components/form.js +29 -0
  24. package/dist/atheletebridge/components/form.js.map +1 -0
  25. package/dist/atheletebridge/context/AthleteBridgeContext.js +6 -6
  26. package/dist/atheletebridge/context/AthleteBridgeContext.js.map +1 -1
  27. package/dist/atheletebridge/hooks/useAthleteBridgeApi.js +342 -165
  28. package/dist/atheletebridge/hooks/useAthleteBridgeApi.js.map +1 -1
  29. package/dist/atheletebridge/index.js +1 -1
  30. package/dist/atheletebridge/pages/DashboardPage.js +169 -0
  31. package/dist/atheletebridge/pages/DashboardPage.js.map +1 -0
  32. package/dist/atheletebridge/pages/StandingsPage.js +166 -0
  33. package/dist/atheletebridge/pages/StandingsPage.js.map +1 -0
  34. package/dist/atheletebridge/pages/fixtures/FixtureDetailPage.js +201 -0
  35. package/dist/atheletebridge/pages/fixtures/FixtureDetailPage.js.map +1 -0
  36. package/dist/atheletebridge/pages/fixtures/FixtureFormPage.js +205 -0
  37. package/dist/atheletebridge/pages/fixtures/FixtureFormPage.js.map +1 -0
  38. package/dist/atheletebridge/pages/fixtures/FixturesListPage.js +92 -0
  39. package/dist/atheletebridge/pages/fixtures/FixturesListPage.js.map +1 -0
  40. package/dist/atheletebridge/pages/programs/ProgramDetailPage.js +374 -0
  41. package/dist/atheletebridge/pages/programs/ProgramDetailPage.js.map +1 -0
  42. package/dist/atheletebridge/pages/programs/ProgramFormPage.js +207 -0
  43. package/dist/atheletebridge/pages/programs/ProgramFormPage.js.map +1 -0
  44. package/dist/atheletebridge/pages/programs/ProgramsListPage.js +113 -0
  45. package/dist/atheletebridge/pages/programs/ProgramsListPage.js.map +1 -0
  46. package/dist/atheletebridge/pages/sessions/SessionDetailPage.js +224 -0
  47. package/dist/atheletebridge/pages/sessions/SessionDetailPage.js.map +1 -0
  48. package/dist/atheletebridge/pages/sessions/SessionFormPage.js +206 -0
  49. package/dist/atheletebridge/pages/sessions/SessionFormPage.js.map +1 -0
  50. package/dist/atheletebridge/pages/sessions/SessionsListPage.js +92 -0
  51. package/dist/atheletebridge/pages/sessions/SessionsListPage.js.map +1 -0
  52. package/dist/atheletebridge/pages/teams/TeamDetailPage.js +350 -0
  53. package/dist/atheletebridge/pages/teams/TeamDetailPage.js.map +1 -0
  54. package/dist/atheletebridge/pages/teams/TeamFormPage.js +222 -0
  55. package/dist/atheletebridge/pages/teams/TeamFormPage.js.map +1 -0
  56. package/dist/atheletebridge/pages/teams/TeamsListPage.js +101 -0
  57. package/dist/atheletebridge/pages/teams/TeamsListPage.js.map +1 -0
  58. package/dist/atheletebridge/store/atheletebridgeStore.js +2 -13
  59. package/dist/atheletebridge/store/atheletebridgeStore.js.map +1 -1
  60. package/dist/atheletebridge/utils/datetime.js +10 -0
  61. package/dist/atheletebridge/utils/datetime.js.map +1 -0
  62. package/dist/atheletebridge/utils/formatters.js +1 -4
  63. package/dist/atheletebridge/utils/formatters.js.map +1 -1
  64. package/package.json +1 -1
  65. package/dist/atheletebridge/components/InvestmentCard.js +0 -96
  66. package/dist/atheletebridge/components/InvestmentCard.js.map +0 -1
  67. package/dist/atheletebridge/components/RatingDisplay.js +0 -35
  68. package/dist/atheletebridge/components/RatingDisplay.js.map +0 -1
  69. package/dist/atheletebridge/mocks/data.js +0 -1517
  70. package/dist/atheletebridge/mocks/data.js.map +0 -1
  71. package/dist/atheletebridge/mocks/users.js +0 -34
  72. package/dist/atheletebridge/mocks/users.js.map +0 -1
  73. package/dist/atheletebridge/pages/HomePage.js +0 -936
  74. package/dist/atheletebridge/pages/HomePage.js.map +0 -1
  75. package/dist/atheletebridge/pages/admin/AdminAnalyticsPage.js +0 -653
  76. package/dist/atheletebridge/pages/admin/AdminAnalyticsPage.js.map +0 -1
  77. package/dist/atheletebridge/pages/admin/AdminDashboard.js +0 -671
  78. package/dist/atheletebridge/pages/admin/AdminDashboard.js.map +0 -1
  79. package/dist/atheletebridge/pages/admin/AdminFinancialPage.js +0 -429
  80. package/dist/atheletebridge/pages/admin/AdminFinancialPage.js.map +0 -1
  81. package/dist/atheletebridge/pages/admin/AdminOrdersPage.js +0 -667
  82. package/dist/atheletebridge/pages/admin/AdminOrdersPage.js.map +0 -1
  83. package/dist/atheletebridge/pages/admin/AdminProfilePage.js +0 -261
  84. package/dist/atheletebridge/pages/admin/AdminProfilePage.js.map +0 -1
  85. package/dist/atheletebridge/pages/admin/AdminSettingsPage.js +0 -653
  86. package/dist/atheletebridge/pages/admin/AdminSettingsPage.js.map +0 -1
  87. package/dist/atheletebridge/pages/admin/CartManagementPage.js +0 -876
  88. package/dist/atheletebridge/pages/admin/CartManagementPage.js.map +0 -1
  89. package/dist/atheletebridge/pages/admin/UserManagementPage.js +0 -900
  90. package/dist/atheletebridge/pages/admin/UserManagementPage.js.map +0 -1
  91. package/dist/atheletebridge/pages/cart-owner/AnalyticsDashboard.js +0 -839
  92. package/dist/atheletebridge/pages/cart-owner/AnalyticsDashboard.js.map +0 -1
  93. package/dist/atheletebridge/pages/cart-owner/BusinessSettingsPage.js +0 -704
  94. package/dist/atheletebridge/pages/cart-owner/BusinessSettingsPage.js.map +0 -1
  95. package/dist/atheletebridge/pages/cart-owner/CartOwnerDashboard.js +0 -792
  96. package/dist/atheletebridge/pages/cart-owner/CartOwnerDashboard.js.map +0 -1
  97. package/dist/atheletebridge/pages/cart-owner/CartOwnerProfilePage.js +0 -891
  98. package/dist/atheletebridge/pages/cart-owner/CartOwnerProfilePage.js.map +0 -1
  99. package/dist/atheletebridge/pages/cart-owner/CartServiceConfigPage.js +0 -633
  100. package/dist/atheletebridge/pages/cart-owner/CartServiceConfigPage.js.map +0 -1
  101. package/dist/atheletebridge/pages/cart-owner/InventoryManagementPage.js +0 -913
  102. package/dist/atheletebridge/pages/cart-owner/InventoryManagementPage.js.map +0 -1
  103. package/dist/atheletebridge/pages/cart-owner/OrderManagementPage.js +0 -881
  104. package/dist/atheletebridge/pages/cart-owner/OrderManagementPage.js.map +0 -1
  105. package/dist/atheletebridge/pages/cart-owner/StaffManagementPage.js +0 -841
  106. package/dist/atheletebridge/pages/cart-owner/StaffManagementPage.js.map +0 -1
  107. package/dist/atheletebridge/pages/common/HelpSupportPage.js +0 -1319
  108. package/dist/atheletebridge/pages/common/HelpSupportPage.js.map +0 -1
  109. package/dist/atheletebridge/pages/common/NotificationCenterPage.js +0 -674
  110. package/dist/atheletebridge/pages/common/NotificationCenterPage.js.map +0 -1
  111. package/dist/atheletebridge/pages/common/SettingsPage.js +0 -972
  112. package/dist/atheletebridge/pages/common/SettingsPage.js.map +0 -1
  113. package/dist/atheletebridge/pages/customer/BookingDetailsPage.js +0 -602
  114. package/dist/atheletebridge/pages/customer/BookingDetailsPage.js.map +0 -1
  115. package/dist/atheletebridge/pages/customer/CartDetailPage.js +0 -656
  116. package/dist/atheletebridge/pages/customer/CartDetailPage.js.map +0 -1
  117. package/dist/atheletebridge/pages/customer/CartDiscoveryPage.js +0 -558
  118. package/dist/atheletebridge/pages/customer/CartDiscoveryPage.js.map +0 -1
  119. package/dist/atheletebridge/pages/customer/CheckoutPage.js +0 -536
  120. package/dist/atheletebridge/pages/customer/CheckoutPage.js.map +0 -1
  121. package/dist/atheletebridge/pages/customer/CustomerDashboard.js +0 -539
  122. package/dist/atheletebridge/pages/customer/CustomerDashboard.js.map +0 -1
  123. package/dist/atheletebridge/pages/customer/CustomerProfilePage.js +0 -657
  124. package/dist/atheletebridge/pages/customer/CustomerProfilePage.js.map +0 -1
  125. package/dist/atheletebridge/pages/customer/DirectServiceBookingPage.js +0 -635
  126. package/dist/atheletebridge/pages/customer/DirectServiceBookingPage.js.map +0 -1
  127. package/dist/atheletebridge/pages/customer/FavoritesPage.js +0 -486
  128. package/dist/atheletebridge/pages/customer/FavoritesPage.js.map +0 -1
  129. package/dist/atheletebridge/pages/customer/OrderHistoryPage.js +0 -447
  130. package/dist/atheletebridge/pages/customer/OrderHistoryPage.js.map +0 -1
  131. package/dist/atheletebridge/pages/customer/OrderTrackingPage.js +0 -393
  132. package/dist/atheletebridge/pages/customer/OrderTrackingPage.js.map +0 -1
  133. package/dist/atheletebridge/pages/customer/PaymentMethodsPage.js +0 -494
  134. package/dist/atheletebridge/pages/customer/PaymentMethodsPage.js.map +0 -1
  135. package/dist/atheletebridge/pages/customer/ReviewsPage.js +0 -615
  136. package/dist/atheletebridge/pages/customer/ReviewsPage.js.map +0 -1
  137. package/dist/atheletebridge/pages/customer/SavedAddressesPage.js +0 -451
  138. package/dist/atheletebridge/pages/customer/SavedAddressesPage.js.map +0 -1
  139. package/dist/atheletebridge/pages/investor/InvestmentDetailsPage.js +0 -881
  140. package/dist/atheletebridge/pages/investor/InvestmentDetailsPage.js.map +0 -1
  141. package/dist/atheletebridge/pages/investor/InvestmentOpportunitiesPage.js +0 -945
  142. package/dist/atheletebridge/pages/investor/InvestmentOpportunitiesPage.js.map +0 -1
  143. package/dist/atheletebridge/pages/investor/InvestorAnalyticsPage.js +0 -686
  144. package/dist/atheletebridge/pages/investor/InvestorAnalyticsPage.js.map +0 -1
  145. package/dist/atheletebridge/pages/investor/InvestorDashboard.js +0 -453
  146. package/dist/atheletebridge/pages/investor/InvestorDashboard.js.map +0 -1
  147. package/dist/atheletebridge/pages/investor/InvestorInvestmentsPage.js +0 -405
  148. package/dist/atheletebridge/pages/investor/InvestorInvestmentsPage.js.map +0 -1
  149. package/dist/atheletebridge/pages/investor/InvestorPortfolioPage.js +0 -577
  150. package/dist/atheletebridge/pages/investor/InvestorPortfolioPage.js.map +0 -1
  151. package/dist/atheletebridge/pages/investor/InvestorProfilePage.js +0 -1069
  152. package/dist/atheletebridge/pages/investor/InvestorProfilePage.js.map +0 -1
  153. package/dist/atheletebridge/pages/worker/TaskDetailsPage.js +0 -530
  154. package/dist/atheletebridge/pages/worker/TaskDetailsPage.js.map +0 -1
  155. package/dist/atheletebridge/pages/worker/WorkerDashboard.js +0 -669
  156. package/dist/atheletebridge/pages/worker/WorkerDashboard.js.map +0 -1
  157. package/dist/atheletebridge/pages/worker/WorkerOrdersPage.js +0 -681
  158. package/dist/atheletebridge/pages/worker/WorkerOrdersPage.js.map +0 -1
  159. package/dist/atheletebridge/pages/worker/WorkerProfilePage.js +0 -691
  160. package/dist/atheletebridge/pages/worker/WorkerProfilePage.js.map +0 -1
  161. package/dist/atheletebridge/pages/worker/WorkerSchedulePage.js +0 -588
  162. package/dist/atheletebridge/pages/worker/WorkerSchedulePage.js.map +0 -1
@@ -1,945 +0,0 @@
1
- import { useAthleteBridge as e } from "../../context/AthleteBridgeContext.js";
2
- import { cn as t } from "../../utils/cn.js";
3
- import { PageLayout as n } from "../../components/PageLayout.js";
4
- import { EmptyState as r } from "../../components/EmptyState.js";
5
- import { formatCurrency as i, formatNumber as a } from "../../utils/formatters.js";
6
- import { useCallback as o, useEffect as s, useMemo as c, useState as l } from "react";
7
- import { CheckCircle2 as u, Eye as d, FileText as f, IndianRupee as p, MapPin as m, Search as h, Star as g, X as _ } from "lucide-react";
8
- import { jsx as v, jsxs as y } from "react/jsx-runtime";
9
- import { EmphasisPanel as b, PagePurpose as x } from "@burdenoff/fe-libs/ui";
10
- //#region src/atheletebridge/pages/investor/InvestmentOpportunitiesPage.tsx
11
- var S = [
12
- {
13
- id: "opp-001",
14
- cartId: "cart-005",
15
- cartName: "Organic Salad Bar",
16
- cartOwner: "Sarah Johnson",
17
- description: "Premium organic salad bar serving health-conscious customers in tech parks. Looking to expand to 3 new locations.",
18
- targetAmount: 5e5,
19
- raisedAmount: 325e3,
20
- minimumInvestment: 25e3,
21
- maximumInvestment: 1e5,
22
- investorCount: 8,
23
- daysLeft: 15,
24
- expectedReturns: 22,
25
- paybackPeriod: 36,
26
- riskLevel: "low",
27
- category: "Healthy Food",
28
- location: "Whitefield, Bangalore",
29
- image: "https://images.unsplash.com/photo-1512621776951-a57141f2eefd?w=400",
30
- businessMetrics: {
31
- monthlyRevenue: 28e4,
32
- monthlyOrders: 1800,
33
- averageOrderValue: 156,
34
- rating: 4.9,
35
- reviewCount: 342,
36
- operatingSince: "2022-03-15"
37
- },
38
- financials: {
39
- grossMargin: 65,
40
- netMargin: 28,
41
- monthlyExpenses: 78e3,
42
- breakEvenAchieved: !0
43
- },
44
- investmentTerms: {
45
- equityOffered: 25,
46
- dividendFrequency: "monthly",
47
- lockInPeriod: 24,
48
- exitOptions: [
49
- "Buyback",
50
- "Secondary Sale",
51
- "IPO"
52
- ]
53
- },
54
- documents: [
55
- {
56
- name: "Business Plan",
57
- type: "PDF",
58
- uploadedOn: "2024-06-01"
59
- },
60
- {
61
- name: "Financial Statements",
62
- type: "PDF",
63
- uploadedOn: "2024-06-01"
64
- },
65
- {
66
- name: "Legal Documents",
67
- type: "PDF",
68
- uploadedOn: "2024-06-01"
69
- }
70
- ],
71
- status: "active"
72
- },
73
- {
74
- id: "opp-002",
75
- cartId: "cart-006",
76
- cartName: "Midnight Munchies",
77
- cartOwner: "Ravi Mehta",
78
- description: "Late-night food delivery cart specializing in comfort food for night shift workers and students. Operating near IT corridors.",
79
- targetAmount: 3e5,
80
- raisedAmount: 18e4,
81
- minimumInvestment: 15e3,
82
- maximumInvestment: 75e3,
83
- investorCount: 12,
84
- daysLeft: 22,
85
- expectedReturns: 18,
86
- paybackPeriod: 30,
87
- riskLevel: "medium",
88
- category: "Fast Food",
89
- location: "Electronic City, Bangalore",
90
- image: "https://images.unsplash.com/photo-1565299624946-b28f40a0ae38?w=400",
91
- businessMetrics: {
92
- monthlyRevenue: 195e3,
93
- monthlyOrders: 1200,
94
- averageOrderValue: 163,
95
- rating: 4.7,
96
- reviewCount: 256,
97
- operatingSince: "2023-01-10"
98
- },
99
- financials: {
100
- grossMargin: 58,
101
- netMargin: 22,
102
- monthlyExpenses: 65e3,
103
- breakEvenAchieved: !0
104
- },
105
- investmentTerms: {
106
- equityOffered: 20,
107
- dividendFrequency: "quarterly",
108
- lockInPeriod: 18,
109
- exitOptions: ["Buyback", "Secondary Sale"]
110
- },
111
- documents: [{
112
- name: "Business Plan",
113
- type: "PDF",
114
- uploadedOn: "2024-06-05"
115
- }, {
116
- name: "Market Analysis",
117
- type: "PDF",
118
- uploadedOn: "2024-06-05"
119
- }],
120
- status: "active"
121
- },
122
- {
123
- id: "opp-003",
124
- cartId: "cart-007",
125
- cartName: "Fusion Street Tacos",
126
- cartOwner: "Maria Rodriguez",
127
- description: "Innovative fusion taco cart combining Mexican and Indian flavors. Winner of Street Food Awards 2023.",
128
- targetAmount: 4e5,
129
- raisedAmount: 4e5,
130
- minimumInvestment: 2e4,
131
- maximumInvestment: 8e4,
132
- investorCount: 15,
133
- daysLeft: 0,
134
- expectedReturns: 25,
135
- paybackPeriod: 24,
136
- riskLevel: "low",
137
- category: "Fusion Food",
138
- location: "Indiranagar, Bangalore",
139
- image: "https://images.unsplash.com/photo-1551504734-5ee1c4a1479b?w=400",
140
- businessMetrics: {
141
- monthlyRevenue: 32e4,
142
- monthlyOrders: 2100,
143
- averageOrderValue: 152,
144
- rating: 4.8,
145
- reviewCount: 512,
146
- operatingSince: "2021-08-20"
147
- },
148
- financials: {
149
- grossMargin: 68,
150
- netMargin: 32,
151
- monthlyExpenses: 85e3,
152
- breakEvenAchieved: !0
153
- },
154
- investmentTerms: {
155
- equityOffered: 30,
156
- dividendFrequency: "monthly",
157
- lockInPeriod: 12,
158
- exitOptions: ["Buyback", "Franchise Conversion"]
159
- },
160
- documents: [{
161
- name: "Business Plan",
162
- type: "PDF",
163
- uploadedOn: "2024-05-20"
164
- }, {
165
- name: "Awards & Recognition",
166
- type: "PDF",
167
- uploadedOn: "2024-05-20"
168
- }],
169
- status: "funded"
170
- },
171
- {
172
- id: "opp-004",
173
- cartId: "cart-008",
174
- cartName: "Bubble Tea Express",
175
- cartOwner: "Chen Wei",
176
- description: "Trendy bubble tea cart with proprietary recipes. Planning expansion through franchise model.",
177
- targetAmount: 6e5,
178
- raisedAmount: 12e4,
179
- minimumInvestment: 3e4,
180
- maximumInvestment: 15e4,
181
- investorCount: 4,
182
- daysLeft: 45,
183
- expectedReturns: 20,
184
- paybackPeriod: 36,
185
- riskLevel: "high",
186
- category: "Beverages",
187
- location: "Koramangala, Bangalore",
188
- image: "https://images.unsplash.com/photo-1558857563-b371033873b8?w=400",
189
- businessMetrics: {
190
- monthlyRevenue: 15e4,
191
- monthlyOrders: 900,
192
- averageOrderValue: 167,
193
- rating: 4.6,
194
- reviewCount: 189,
195
- operatingSince: "2023-11-01"
196
- },
197
- financials: {
198
- grossMargin: 72,
199
- netMargin: 18,
200
- monthlyExpenses: 55e3,
201
- breakEvenAchieved: !1
202
- },
203
- investmentTerms: {
204
- equityOffered: 35,
205
- dividendFrequency: "quarterly",
206
- lockInPeriod: 36,
207
- exitOptions: ["Franchise Sale", "Acquisition"]
208
- },
209
- documents: [{
210
- name: "Franchise Plan",
211
- type: "PDF",
212
- uploadedOn: "2024-06-10"
213
- }, {
214
- name: "Recipe Patents",
215
- type: "PDF",
216
- uploadedOn: "2024-06-10"
217
- }],
218
- status: "active"
219
- }
220
- ], C = {
221
- totalOpportunities: 24,
222
- averageReturns: 21.5,
223
- totalFunded: 156e5,
224
- successRate: 89
225
- };
226
- function w(e) {
227
- switch (e) {
228
- case "low": return "bg-green-500/20 text-green-600 dark:text-green-400";
229
- case "medium": return "bg-yellow-500/20 text-yellow-600 dark:text-yellow-400";
230
- case "high": return "bg-red-500/20 text-red-600 dark:text-red-400";
231
- default: return "bg-secondary text-secondary-foreground";
232
- }
233
- }
234
- function T(e) {
235
- switch (e) {
236
- case "low": return "Low Risk";
237
- case "medium": return "Medium Risk";
238
- case "high": return "High Risk";
239
- default: return e;
240
- }
241
- }
242
- function E(e, t) {
243
- return t > 0 ? Math.min(e / t * 100, 100) : 0;
244
- }
245
- function D() {
246
- let { navigateTo: D } = e(), [O, k] = l(!0), [A, j] = l(null), [M, N] = l(!1), [P, F] = l(""), [I, L] = l("idle"), [R, z] = l({
247
- searchQuery: "",
248
- category: "",
249
- riskLevel: "",
250
- minimumAmount: "",
251
- location: "",
252
- sortBy: "featured"
253
- });
254
- s(() => {
255
- let e = setTimeout(() => k(!1), 600);
256
- return () => clearTimeout(e);
257
- }, []);
258
- let B = o((e, t) => {
259
- z((n) => ({
260
- ...n,
261
- [e]: t
262
- }));
263
- }, []), V = c(() => {
264
- let e = [...S];
265
- if (R.searchQuery.trim()) {
266
- let t = R.searchQuery.toLowerCase();
267
- e = e.filter((e) => e.cartName.toLowerCase().includes(t) || e.description.toLowerCase().includes(t) || e.category.toLowerCase().includes(t));
268
- }
269
- if (R.category && (e = e.filter((e) => e.category === R.category)), R.riskLevel && (e = e.filter((e) => e.riskLevel === R.riskLevel)), R.location && (e = e.filter((e) => e.location.includes(R.location))), R.minimumAmount) {
270
- let t = parseInt(R.minimumAmount, 10);
271
- e = e.filter((e) => e.minimumInvestment <= t);
272
- }
273
- switch (R.sortBy) {
274
- case "returns":
275
- e.sort((e, t) => t.expectedReturns - e.expectedReturns);
276
- break;
277
- case "funding":
278
- e.sort((e, t) => t.raisedAmount / t.targetAmount - e.raisedAmount / e.targetAmount);
279
- break;
280
- case "closing":
281
- e.sort((e, t) => e.daysLeft - t.daysLeft);
282
- break;
283
- case "minimum":
284
- e.sort((e, t) => e.minimumInvestment - t.minimumInvestment);
285
- break;
286
- default: break;
287
- }
288
- return e;
289
- }, [R]), H = o(() => {
290
- if (!A || !P) return;
291
- let e = parseInt(P, 10);
292
- if (!isNaN(e)) {
293
- if (e < A.minimumInvestment) {
294
- L("error");
295
- return;
296
- }
297
- if (e > A.maximumInvestment) {
298
- L("error");
299
- return;
300
- }
301
- L("success"), setTimeout(() => {
302
- N(!1), F(""), L("idle"), D("/investor/portfolio");
303
- }, 1500);
304
- }
305
- }, [
306
- A,
307
- P,
308
- D
309
- ]), U = o((e) => {
310
- j(e), F(""), L("idle"), N(!0);
311
- }, []);
312
- return O ? /* @__PURE__ */ v(n, {
313
- title: "Investment Opportunities",
314
- description: "Loading opportunities...",
315
- children: /* @__PURE__ */ v("div", {
316
- className: "flex items-center justify-center py-20",
317
- children: /* @__PURE__ */ y("div", {
318
- className: "text-center",
319
- children: [/* @__PURE__ */ v("div", { className: "mx-auto mb-4 h-12 w-12 animate-spin rounded-full border-b-2 border-primary" }), /* @__PURE__ */ v("p", {
320
- className: "text-sm text-text-secondary",
321
- children: "Loading opportunities..."
322
- })]
323
- })
324
- })
325
- }) : /* @__PURE__ */ y(n, {
326
- title: "Investment Opportunities",
327
- description: "Discover and invest in growing local businesses",
328
- actions: /* @__PURE__ */ y("span", {
329
- className: "text-sm text-text-secondary",
330
- children: [V.length, " opportunities"]
331
- }),
332
- children: [
333
- /* @__PURE__ */ v(x, {
334
- className: "mb-6",
335
- children: "Find businesses worth backing. Browse vetted carts raising funds, compare expected returns, risk levels and funding progress, then filter and search to match your strategy. Tap any opportunity to dig into the details before you invest."
336
- }),
337
- /* @__PURE__ */ v(b, { children: /* @__PURE__ */ y("div", {
338
- className: "grid grid-cols-2 gap-3 sm:gap-4 lg:grid-cols-4",
339
- children: [
340
- /* @__PURE__ */ y("div", {
341
- className: "rounded-lg border border-border-subtle bg-bg-surface p-3 sm:p-4",
342
- children: [/* @__PURE__ */ v("p", {
343
- className: "text-xs text-text-secondary",
344
- children: "Active Opportunities"
345
- }), /* @__PURE__ */ v("p", {
346
- className: "text-lg font-bold text-text-primary sm:text-2xl",
347
- children: C.totalOpportunities
348
- })]
349
- }),
350
- /* @__PURE__ */ y("div", {
351
- className: "rounded-lg border border-border-subtle bg-bg-surface p-3 sm:p-4",
352
- children: [/* @__PURE__ */ v("p", {
353
- className: "text-xs text-text-secondary",
354
- children: "Average Returns"
355
- }), /* @__PURE__ */ y("p", {
356
- className: "text-lg font-bold text-green-600 dark:text-green-400 sm:text-2xl",
357
- children: [C.averageReturns, "%"]
358
- })]
359
- }),
360
- /* @__PURE__ */ y("div", {
361
- className: "rounded-lg border border-border-subtle bg-bg-surface p-3 sm:p-4",
362
- children: [/* @__PURE__ */ v("p", {
363
- className: "text-xs text-text-secondary",
364
- children: "Total Funded"
365
- }), /* @__PURE__ */ v("p", {
366
- className: "text-lg font-bold text-text-primary sm:text-2xl",
367
- children: i(C.totalFunded, {
368
- minimumFractionDigits: 0,
369
- notation: "compact"
370
- })
371
- })]
372
- }),
373
- /* @__PURE__ */ y("div", {
374
- className: "rounded-lg border border-border-subtle bg-bg-surface p-3 sm:p-4",
375
- children: [/* @__PURE__ */ v("p", {
376
- className: "text-xs text-text-secondary",
377
- children: "Success Rate"
378
- }), /* @__PURE__ */ y("p", {
379
- className: "text-lg font-bold text-text-primary sm:text-2xl",
380
- children: [C.successRate, "%"]
381
- })]
382
- })
383
- ]
384
- }) }),
385
- /* @__PURE__ */ v("div", {
386
- className: "mt-6 rounded-lg border border-border-subtle bg-bg-surface p-4 sm:p-6",
387
- children: /* @__PURE__ */ y("div", {
388
- className: "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-6",
389
- children: [
390
- /* @__PURE__ */ y("div", {
391
- className: "relative sm:col-span-2 lg:col-span-1",
392
- children: [/* @__PURE__ */ v(h, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ v("input", {
393
- type: "text",
394
- placeholder: "Search opportunities...",
395
- value: R.searchQuery,
396
- onChange: (e) => B("searchQuery", e.target.value),
397
- className: "w-full rounded-lg border border-border-subtle bg-bg-surface py-2 pl-10 pr-4 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
398
- })]
399
- }),
400
- /* @__PURE__ */ y("select", {
401
- value: R.category,
402
- onChange: (e) => B("category", e.target.value),
403
- className: "rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
404
- children: [
405
- /* @__PURE__ */ v("option", {
406
- value: "",
407
- children: "All Categories"
408
- }),
409
- /* @__PURE__ */ v("option", {
410
- value: "Healthy Food",
411
- children: "Healthy Food"
412
- }),
413
- /* @__PURE__ */ v("option", {
414
- value: "Fast Food",
415
- children: "Fast Food"
416
- }),
417
- /* @__PURE__ */ v("option", {
418
- value: "Fusion Food",
419
- children: "Fusion Food"
420
- }),
421
- /* @__PURE__ */ v("option", {
422
- value: "Beverages",
423
- children: "Beverages"
424
- }),
425
- /* @__PURE__ */ v("option", {
426
- value: "Street Food",
427
- children: "Street Food"
428
- })
429
- ]
430
- }),
431
- /* @__PURE__ */ y("select", {
432
- value: R.riskLevel,
433
- onChange: (e) => B("riskLevel", e.target.value),
434
- className: "rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
435
- children: [
436
- /* @__PURE__ */ v("option", {
437
- value: "",
438
- children: "All Risk Levels"
439
- }),
440
- /* @__PURE__ */ v("option", {
441
- value: "low",
442
- children: "Low Risk"
443
- }),
444
- /* @__PURE__ */ v("option", {
445
- value: "medium",
446
- children: "Medium Risk"
447
- }),
448
- /* @__PURE__ */ v("option", {
449
- value: "high",
450
- children: "High Risk"
451
- })
452
- ]
453
- }),
454
- /* @__PURE__ */ y("select", {
455
- value: R.minimumAmount,
456
- onChange: (e) => B("minimumAmount", e.target.value),
457
- className: "rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
458
- children: [
459
- /* @__PURE__ */ v("option", {
460
- value: "",
461
- children: "Any Amount"
462
- }),
463
- /* @__PURE__ */ v("option", {
464
- value: "15000",
465
- children: "Under ₹15,000"
466
- }),
467
- /* @__PURE__ */ v("option", {
468
- value: "25000",
469
- children: "Under ₹25,000"
470
- }),
471
- /* @__PURE__ */ v("option", {
472
- value: "50000",
473
- children: "Under ₹50,000"
474
- }),
475
- /* @__PURE__ */ v("option", {
476
- value: "100000",
477
- children: "Under ₹1,00,000"
478
- })
479
- ]
480
- }),
481
- /* @__PURE__ */ y("select", {
482
- value: R.location,
483
- onChange: (e) => B("location", e.target.value),
484
- className: "rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
485
- children: [
486
- /* @__PURE__ */ v("option", {
487
- value: "",
488
- children: "All Locations"
489
- }),
490
- /* @__PURE__ */ v("option", {
491
- value: "Whitefield",
492
- children: "Whitefield"
493
- }),
494
- /* @__PURE__ */ v("option", {
495
- value: "Koramangala",
496
- children: "Koramangala"
497
- }),
498
- /* @__PURE__ */ v("option", {
499
- value: "Indiranagar",
500
- children: "Indiranagar"
501
- }),
502
- /* @__PURE__ */ v("option", {
503
- value: "Electronic City",
504
- children: "Electronic City"
505
- })
506
- ]
507
- }),
508
- /* @__PURE__ */ y("select", {
509
- value: R.sortBy,
510
- onChange: (e) => B("sortBy", e.target.value),
511
- className: "rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
512
- children: [
513
- /* @__PURE__ */ v("option", {
514
- value: "featured",
515
- children: "Featured"
516
- }),
517
- /* @__PURE__ */ v("option", {
518
- value: "returns",
519
- children: "Highest Returns"
520
- }),
521
- /* @__PURE__ */ v("option", {
522
- value: "funding",
523
- children: "Most Funded"
524
- }),
525
- /* @__PURE__ */ v("option", {
526
- value: "closing",
527
- children: "Closing Soon"
528
- }),
529
- /* @__PURE__ */ v("option", {
530
- value: "minimum",
531
- children: "Lowest Minimum"
532
- })
533
- ]
534
- })
535
- ]
536
- })
537
- }),
538
- V.length === 0 ? /* @__PURE__ */ v("div", {
539
- className: "mt-6",
540
- children: /* @__PURE__ */ v(r, {
541
- illustration: "empty-search",
542
- icon: /* @__PURE__ */ v(h, { className: "h-10 w-10" }),
543
- title: "No opportunities found",
544
- description: "Try adjusting your filters to find more opportunities",
545
- action: /* @__PURE__ */ v("button", {
546
- type: "button",
547
- onClick: () => z({
548
- searchQuery: "",
549
- category: "",
550
- riskLevel: "",
551
- minimumAmount: "",
552
- location: "",
553
- sortBy: "featured"
554
- }),
555
- 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",
556
- children: "Clear Filters"
557
- })
558
- })
559
- }) : /* @__PURE__ */ v("div", {
560
- className: "mt-6 grid grid-cols-1 gap-4 lg:grid-cols-2",
561
- children: V.map((e) => {
562
- let n = E(e.raisedAmount, e.targetAmount);
563
- return /* @__PURE__ */ y("div", {
564
- className: "rounded-lg border border-border-subtle bg-bg-surface shadow-sm hover:shadow-md transition-shadow",
565
- children: [/* @__PURE__ */ y("div", {
566
- className: "relative",
567
- children: [
568
- /* @__PURE__ */ v("div", {
569
- className: "h-40 w-full overflow-hidden rounded-t-lg bg-bg-sunken sm:h-48",
570
- children: /* @__PURE__ */ v("img", {
571
- src: e.image,
572
- alt: e.cartName,
573
- className: "h-full w-full object-cover",
574
- loading: "lazy"
575
- })
576
- }),
577
- e.status === "funded" && /* @__PURE__ */ v("div", {
578
- className: "absolute right-2 top-2 rounded-full bg-green-500 px-2 py-1 text-xs font-medium text-white sm:right-4 sm:top-4 sm:px-3",
579
- children: "Fully Funded"
580
- }),
581
- e.daysLeft > 0 && e.daysLeft <= 7 && /* @__PURE__ */ y("div", {
582
- className: "absolute left-2 top-2 rounded-full bg-red-500 px-2 py-1 text-xs font-medium text-white sm:left-4 sm:top-4 sm:px-3",
583
- children: [e.daysLeft, " days left"]
584
- })
585
- ]
586
- }), /* @__PURE__ */ y("div", {
587
- className: "p-4 sm:p-6",
588
- children: [
589
- /* @__PURE__ */ y("div", {
590
- className: "mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",
591
- children: [/* @__PURE__ */ y("div", {
592
- className: "flex-1",
593
- children: [
594
- /* @__PURE__ */ v("h3", {
595
- className: "text-base font-semibold text-text-primary sm:text-xl",
596
- children: e.cartName
597
- }),
598
- /* @__PURE__ */ y("p", {
599
- className: "text-xs text-text-secondary sm:text-sm",
600
- children: ["by ", e.cartOwner]
601
- }),
602
- /* @__PURE__ */ y("div", {
603
- className: "mt-2 flex flex-wrap items-center gap-2",
604
- children: [/* @__PURE__ */ v("span", {
605
- className: "text-xs text-text-secondary sm:text-sm",
606
- children: e.category
607
- }), /* @__PURE__ */ v("span", {
608
- className: t("rounded-full px-2 py-0.5 text-xs font-medium", w(e.riskLevel)),
609
- children: T(e.riskLevel)
610
- })]
611
- })
612
- ]
613
- }), /* @__PURE__ */ y("div", {
614
- className: "text-left sm:text-right",
615
- children: [/* @__PURE__ */ y("p", {
616
- className: "text-xl font-bold text-green-600 dark:text-green-400 sm:text-2xl",
617
- children: [e.expectedReturns, "%"]
618
- }), /* @__PURE__ */ v("p", {
619
- className: "text-xs text-text-secondary",
620
- children: "Expected Returns"
621
- })]
622
- })]
623
- }),
624
- /* @__PURE__ */ v("p", {
625
- className: "mb-4 text-sm leading-relaxed text-text-secondary line-clamp-2",
626
- children: e.description
627
- }),
628
- /* @__PURE__ */ y("div", {
629
- className: "mb-4",
630
- children: [
631
- /* @__PURE__ */ y("div", {
632
- className: "mb-1 flex justify-between text-xs sm:text-sm",
633
- children: [/* @__PURE__ */ y("span", {
634
- className: "font-medium text-text-primary",
635
- children: [
636
- i(e.raisedAmount, { minimumFractionDigits: 0 }),
637
- " ",
638
- "raised"
639
- ]
640
- }), /* @__PURE__ */ y("span", {
641
- className: "text-text-secondary",
642
- children: ["of ", i(e.targetAmount, { minimumFractionDigits: 0 })]
643
- })]
644
- }),
645
- /* @__PURE__ */ v("div", {
646
- className: "h-2 w-full overflow-hidden rounded-full bg-bg-sunken",
647
- children: /* @__PURE__ */ v("div", {
648
- className: "h-full rounded-full bg-action-primary-bg transition-all duration-300",
649
- style: { width: `${n}%` }
650
- })
651
- }),
652
- /* @__PURE__ */ y("div", {
653
- className: "mt-1 flex justify-between text-xs text-text-secondary",
654
- children: [/* @__PURE__ */ y("span", { children: [e.investorCount, " investors"] }), /* @__PURE__ */ y("span", { children: [n.toFixed(0), "% funded"] })]
655
- })
656
- ]
657
- }),
658
- /* @__PURE__ */ y("div", {
659
- className: "mb-4 grid grid-cols-3 gap-2 text-center sm:gap-4",
660
- children: [
661
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
662
- className: "text-sm font-bold text-text-primary sm:text-lg",
663
- children: i(e.minimumInvestment, { minimumFractionDigits: 0 })
664
- }), /* @__PURE__ */ v("p", {
665
- className: "text-xs text-text-secondary",
666
- children: "Min Investment"
667
- })] }),
668
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ y("p", {
669
- className: "text-sm font-bold text-text-primary sm:text-lg",
670
- children: [e.paybackPeriod, " mo"]
671
- }), /* @__PURE__ */ v("p", {
672
- className: "text-xs text-text-secondary",
673
- children: "Payback Period"
674
- })] }),
675
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ y("div", {
676
- className: "flex items-center justify-center gap-1",
677
- children: [/* @__PURE__ */ v(g, { className: "h-3.5 w-3.5 fill-yellow-400 text-yellow-400" }), /* @__PURE__ */ v("p", {
678
- className: "text-sm font-bold text-text-primary sm:text-lg",
679
- children: e.businessMetrics.rating
680
- })]
681
- }), /* @__PURE__ */ v("p", {
682
- className: "text-xs text-text-secondary",
683
- children: "Rating"
684
- })] })
685
- ]
686
- }),
687
- /* @__PURE__ */ y("div", {
688
- className: "mb-4 border-t border-border-subtle pt-3 sm:pt-4",
689
- children: [/* @__PURE__ */ v("p", {
690
- className: "mb-2 text-xs font-medium text-text-secondary sm:text-sm",
691
- children: "Business Performance"
692
- }), /* @__PURE__ */ y("div", {
693
- className: "grid grid-cols-1 gap-2 text-xs sm:grid-cols-2 sm:text-sm",
694
- children: [
695
- /* @__PURE__ */ y("div", {
696
- className: "flex justify-between",
697
- children: [/* @__PURE__ */ v("span", {
698
- className: "text-text-secondary",
699
- children: "Monthly Revenue:"
700
- }), /* @__PURE__ */ v("span", {
701
- className: "font-medium text-text-primary",
702
- children: i(e.businessMetrics.monthlyRevenue, { minimumFractionDigits: 0 })
703
- })]
704
- }),
705
- /* @__PURE__ */ y("div", {
706
- className: "flex justify-between",
707
- children: [/* @__PURE__ */ v("span", {
708
- className: "text-text-secondary",
709
- children: "Gross Margin:"
710
- }), /* @__PURE__ */ y("span", {
711
- className: "font-medium text-text-primary",
712
- children: [e.financials.grossMargin, "%"]
713
- })]
714
- }),
715
- /* @__PURE__ */ y("div", {
716
- className: "flex justify-between",
717
- children: [/* @__PURE__ */ v("span", {
718
- className: "text-text-secondary",
719
- children: "Monthly Orders:"
720
- }), /* @__PURE__ */ v("span", {
721
- className: "font-medium text-text-primary",
722
- children: a(e.businessMetrics.monthlyOrders)
723
- })]
724
- }),
725
- /* @__PURE__ */ y("div", {
726
- className: "flex justify-between",
727
- children: [/* @__PURE__ */ v("span", {
728
- className: "text-text-secondary",
729
- children: "Net Margin:"
730
- }), /* @__PURE__ */ y("span", {
731
- className: "font-medium text-text-primary",
732
- children: [e.financials.netMargin, "%"]
733
- })]
734
- })
735
- ]
736
- })]
737
- }),
738
- /* @__PURE__ */ v("div", {
739
- className: "mb-4 border-t border-border-subtle pt-3",
740
- children: /* @__PURE__ */ y("div", {
741
- className: "flex items-center gap-1.5 text-xs text-text-secondary",
742
- children: [/* @__PURE__ */ v(f, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ y("span", { children: [e.documents.length, " documents available"] })]
743
- })
744
- }),
745
- /* @__PURE__ */ y("div", {
746
- className: "mb-4 flex items-center gap-1.5 text-xs text-text-secondary",
747
- children: [/* @__PURE__ */ v(m, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ v("span", { children: e.location })]
748
- }),
749
- /* @__PURE__ */ y("div", {
750
- className: "flex flex-col gap-2 sm:flex-row sm:gap-3",
751
- children: [/* @__PURE__ */ v("button", {
752
- type: "button",
753
- onClick: () => U(e),
754
- disabled: e.status === "funded",
755
- className: t("flex-1 rounded-lg px-4 py-2.5 text-sm font-medium transition-colors", e.status === "funded" ? "cursor-not-allowed bg-bg-sunken text-text-secondary" : "bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90"),
756
- children: e.status === "funded" ? "Fully Funded" : "Invest Now"
757
- }), /* @__PURE__ */ y("button", {
758
- type: "button",
759
- onClick: () => D(`/investor/opportunities/${e.id}`),
760
- className: "flex flex-1 items-center justify-center gap-2 rounded-lg border border-border-subtle px-4 py-2.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
761
- children: [/* @__PURE__ */ v(d, { className: "h-4 w-4" }), "View Details"]
762
- })]
763
- })
764
- ]
765
- })]
766
- }, e.id);
767
- })
768
- }),
769
- M && A && /* @__PURE__ */ v("div", {
770
- className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
771
- children: /* @__PURE__ */ y("div", {
772
- className: "relative max-h-[90vh] w-full max-w-md overflow-y-auto rounded-lg border border-border-subtle bg-bg-surface p-4 sm:p-6",
773
- children: [
774
- /* @__PURE__ */ v("button", {
775
- type: "button",
776
- onClick: () => {
777
- N(!1), F(""), L("idle");
778
- },
779
- className: "absolute right-3 top-3 rounded-lg p-1 text-text-secondary hover:bg-accent transition-colors",
780
- children: /* @__PURE__ */ v(_, { className: "h-5 w-5" })
781
- }),
782
- /* @__PURE__ */ y("h3", {
783
- className: "mb-4 text-base font-semibold text-text-primary sm:text-lg",
784
- children: ["Invest in ", A.cartName]
785
- }),
786
- I === "success" ? /* @__PURE__ */ y("div", {
787
- className: "py-8 text-center",
788
- children: [
789
- /* @__PURE__ */ v(u, { className: "mx-auto mb-3 h-12 w-12 text-green-600 dark:text-green-400" }),
790
- /* @__PURE__ */ v("p", {
791
- className: "text-sm font-medium text-text-primary",
792
- children: "Investment successful!"
793
- }),
794
- /* @__PURE__ */ v("p", {
795
- className: "mt-1 text-xs text-text-secondary",
796
- children: "Redirecting to your portfolio..."
797
- })
798
- ]
799
- }) : /* @__PURE__ */ y("div", {
800
- className: "space-y-4",
801
- children: [
802
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
803
- className: "mb-1 text-xs text-text-secondary sm:text-sm",
804
- children: "Investment Range"
805
- }), /* @__PURE__ */ y("p", {
806
- className: "text-sm font-medium text-text-primary sm:text-base",
807
- children: [
808
- i(A.minimumInvestment, { minimumFractionDigits: 0 }),
809
- " ",
810
- "-",
811
- " ",
812
- i(A.maximumInvestment, { minimumFractionDigits: 0 })
813
- ]
814
- })] }),
815
- /* @__PURE__ */ y("div", { children: [
816
- /* @__PURE__ */ v("label", {
817
- className: "mb-1 block text-xs font-medium text-text-primary sm:text-sm",
818
- children: "Investment Amount"
819
- }),
820
- /* @__PURE__ */ y("div", {
821
- className: "relative",
822
- children: [/* @__PURE__ */ v(p, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ v("input", {
823
- type: "number",
824
- value: P,
825
- onChange: (e) => {
826
- F(e.target.value), L("idle");
827
- },
828
- placeholder: "Enter amount",
829
- className: "w-full rounded-lg border border-border-subtle bg-bg-surface py-2 pl-10 pr-4 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
830
- })]
831
- }),
832
- I === "error" && /* @__PURE__ */ y("p", {
833
- className: "mt-1 text-xs text-red-600 dark:text-red-400",
834
- children: [
835
- "Amount must be between",
836
- " ",
837
- i(A.minimumInvestment, { minimumFractionDigits: 0 }),
838
- " ",
839
- "and",
840
- " ",
841
- i(A.maximumInvestment, { minimumFractionDigits: 0 })
842
- ]
843
- })
844
- ] }),
845
- P && !isNaN(parseInt(P, 10)) && parseInt(P, 10) > 0 && /* @__PURE__ */ y("div", {
846
- className: "rounded-lg border border-border-subtle bg-bg-sunken/50 p-3 sm:p-4",
847
- children: [/* @__PURE__ */ v("p", {
848
- className: "mb-2 text-xs text-text-secondary sm:text-sm",
849
- children: "Expected Returns"
850
- }), /* @__PURE__ */ y("div", {
851
- className: "space-y-1.5",
852
- children: [
853
- /* @__PURE__ */ y("div", {
854
- className: "flex justify-between",
855
- children: [/* @__PURE__ */ v("span", {
856
- className: "text-xs text-text-primary sm:text-sm",
857
- children: "Investment:"
858
- }), /* @__PURE__ */ v("span", {
859
- className: "text-xs font-medium text-text-primary sm:text-sm",
860
- children: i(parseInt(P, 10), { minimumFractionDigits: 0 })
861
- })]
862
- }),
863
- /* @__PURE__ */ y("div", {
864
- className: "flex justify-between",
865
- children: [/* @__PURE__ */ y("span", {
866
- className: "text-xs text-text-primary sm:text-sm",
867
- children: [
868
- "Expected Return (",
869
- A.expectedReturns,
870
- "%):"
871
- ]
872
- }), /* @__PURE__ */ y("span", {
873
- className: "text-xs font-medium text-green-600 dark:text-green-400 sm:text-sm",
874
- children: ["+", i(parseInt(P, 10) * A.expectedReturns / 100, { minimumFractionDigits: 0 })]
875
- })]
876
- }),
877
- /* @__PURE__ */ y("div", {
878
- className: "flex justify-between border-t border-border-subtle pt-2",
879
- children: [/* @__PURE__ */ v("span", {
880
- className: "text-xs font-medium text-text-primary sm:text-sm",
881
- children: "Total Value:"
882
- }), /* @__PURE__ */ v("span", {
883
- className: "text-xs font-bold text-text-primary sm:text-sm",
884
- children: i(parseInt(P, 10) * (1 + A.expectedReturns / 100), { minimumFractionDigits: 0 })
885
- })]
886
- })
887
- ]
888
- })]
889
- }),
890
- /* @__PURE__ */ y("div", {
891
- className: "space-y-1 text-xs text-text-secondary sm:text-sm",
892
- children: [
893
- /* @__PURE__ */ y("p", { children: [
894
- "• Minimum lock-in period:",
895
- " ",
896
- A.investmentTerms.lockInPeriod,
897
- " months"
898
- ] }),
899
- /* @__PURE__ */ y("p", { children: [
900
- "• Dividend frequency:",
901
- " ",
902
- A.investmentTerms.dividendFrequency
903
- ] }),
904
- /* @__PURE__ */ y("p", { children: [
905
- "• Your equity stake:",
906
- " ",
907
- ((parseInt(P, 10) || 0) / A.targetAmount * A.investmentTerms.equityOffered).toFixed(2),
908
- "%"
909
- ] }),
910
- /* @__PURE__ */ y("p", { children: [
911
- "• Exit options:",
912
- " ",
913
- A.investmentTerms.exitOptions.join(", ")
914
- ] })
915
- ]
916
- }),
917
- /* @__PURE__ */ y("div", {
918
- className: "flex flex-col gap-2 pt-2 sm:flex-row sm:gap-3",
919
- children: [/* @__PURE__ */ v("button", {
920
- type: "button",
921
- onClick: () => {
922
- N(!1), F(""), L("idle");
923
- },
924
- className: "flex-1 rounded-lg border border-border-subtle px-4 py-2.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
925
- children: "Cancel"
926
- }), /* @__PURE__ */ v("button", {
927
- type: "button",
928
- onClick: H,
929
- disabled: !P || isNaN(parseInt(P, 10)) || parseInt(P, 10) < A.minimumInvestment,
930
- className: t("flex-1 rounded-lg px-4 py-2.5 text-sm font-medium transition-colors", !P || isNaN(parseInt(P, 10)) || parseInt(P, 10) < A.minimumInvestment ? "cursor-not-allowed bg-bg-sunken text-text-secondary" : "bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90"),
931
- children: "Confirm Investment"
932
- })]
933
- })
934
- ]
935
- })
936
- ]
937
- })
938
- })
939
- ]
940
- });
941
- }
942
- //#endregion
943
- export { D as InvestmentOpportunitiesPage };
944
-
945
- //# sourceMappingURL=InvestmentOpportunitiesPage.js.map