@burdenoff/microfe-housingvista 2026.709.2 → 2026.709.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 (83) hide show
  1. package/dist/housingvista/HousingVistaRoutes.d.ts.map +1 -1
  2. package/dist/housingvista/HousingVistaRoutes.js +136 -37
  3. package/dist/housingvista/HousingVistaRoutes.js.map +1 -1
  4. package/dist/housingvista/hooks/useHousingVistaAnalytics.d.ts +1 -1
  5. package/dist/housingvista/hooks/useHousingVistaAnalytics.d.ts.map +1 -1
  6. package/dist/housingvista/hooks/useHousingVistaAnalytics.js +4 -4
  7. package/dist/housingvista/hooks/useHousingVistaAnalytics.js.map +1 -1
  8. package/dist/housingvista/pages/amc/AMCManagementPage.d.ts.map +1 -1
  9. package/dist/housingvista/pages/amc/AMCManagementPage.js +62 -60
  10. package/dist/housingvista/pages/amc/AMCManagementPage.js.map +1 -1
  11. package/dist/housingvista/pages/assets/AssetDetailPage.d.ts.map +1 -1
  12. package/dist/housingvista/pages/assets/AssetDetailPage.js +141 -138
  13. package/dist/housingvista/pages/assets/AssetDetailPage.js.map +1 -1
  14. package/dist/housingvista/pages/assets/AssetManagementPage.d.ts.map +1 -1
  15. package/dist/housingvista/pages/assets/AssetManagementPage.js +193 -191
  16. package/dist/housingvista/pages/assets/AssetManagementPage.js.map +1 -1
  17. package/dist/housingvista/pages/chat/ChatPage.d.ts.map +1 -1
  18. package/dist/housingvista/pages/chat/ChatPage.js +115 -113
  19. package/dist/housingvista/pages/chat/ChatPage.js.map +1 -1
  20. package/dist/housingvista/pages/finance/HomeLoanDetailPage.d.ts.map +1 -1
  21. package/dist/housingvista/pages/finance/HomeLoanDetailPage.js +152 -149
  22. package/dist/housingvista/pages/finance/HomeLoanDetailPage.js.map +1 -1
  23. package/dist/housingvista/pages/finance/HomeLoansPage.d.ts.map +1 -1
  24. package/dist/housingvista/pages/finance/HomeLoansPage.js +141 -139
  25. package/dist/housingvista/pages/finance/HomeLoansPage.js.map +1 -1
  26. package/dist/housingvista/pages/investments/InvestmentDetailPage.d.ts.map +1 -1
  27. package/dist/housingvista/pages/investments/InvestmentDetailPage.js +290 -287
  28. package/dist/housingvista/pages/investments/InvestmentDetailPage.js.map +1 -1
  29. package/dist/housingvista/pages/investments/InvestmentsPage.d.ts.map +1 -1
  30. package/dist/housingvista/pages/investments/InvestmentsPage.js +64 -62
  31. package/dist/housingvista/pages/investments/InvestmentsPage.js.map +1 -1
  32. package/dist/housingvista/pages/legal/LegalPage.d.ts.map +1 -1
  33. package/dist/housingvista/pages/legal/LegalPage.js +95 -93
  34. package/dist/housingvista/pages/legal/LegalPage.js.map +1 -1
  35. package/dist/housingvista/pages/legal/LegalServiceDetailPage.d.ts.map +1 -1
  36. package/dist/housingvista/pages/legal/LegalServiceDetailPage.js +129 -126
  37. package/dist/housingvista/pages/legal/LegalServiceDetailPage.js.map +1 -1
  38. package/dist/housingvista/pages/market/AreaInsightsPage.d.ts.map +1 -1
  39. package/dist/housingvista/pages/market/AreaInsightsPage.js +99 -97
  40. package/dist/housingvista/pages/market/AreaInsightsPage.js.map +1 -1
  41. package/dist/housingvista/pages/market/MarketAnalyticsPage.d.ts.map +1 -1
  42. package/dist/housingvista/pages/market/MarketAnalyticsPage.js +138 -136
  43. package/dist/housingvista/pages/market/MarketAnalyticsPage.js.map +1 -1
  44. package/dist/housingvista/pages/marketplace/MarketplacePage.d.ts.map +1 -1
  45. package/dist/housingvista/pages/marketplace/MarketplacePage.js +99 -97
  46. package/dist/housingvista/pages/marketplace/MarketplacePage.js.map +1 -1
  47. package/dist/housingvista/pages/marketplace/ServiceDetailPage.d.ts.map +1 -1
  48. package/dist/housingvista/pages/marketplace/ServiceDetailPage.js +137 -134
  49. package/dist/housingvista/pages/marketplace/ServiceDetailPage.js.map +1 -1
  50. package/dist/housingvista/pages/offers/OffersPage.d.ts.map +1 -1
  51. package/dist/housingvista/pages/offers/OffersPage.js +94 -92
  52. package/dist/housingvista/pages/offers/OffersPage.js.map +1 -1
  53. package/dist/housingvista/pages/properties/AddPropertyPage.d.ts.map +1 -1
  54. package/dist/housingvista/pages/properties/AddPropertyPage.js +280 -279
  55. package/dist/housingvista/pages/properties/AddPropertyPage.js.map +1 -1
  56. package/dist/housingvista/pages/rental/RentalManagementPage.d.ts.map +1 -1
  57. package/dist/housingvista/pages/rental/RentalManagementPage.js +153 -151
  58. package/dist/housingvista/pages/rental/RentalManagementPage.js.map +1 -1
  59. package/dist/housingvista/pages/settings/ProfilePage.d.ts.map +1 -1
  60. package/dist/housingvista/pages/settings/ProfilePage.js +52 -50
  61. package/dist/housingvista/pages/settings/ProfilePage.js.map +1 -1
  62. package/dist/housingvista/pages/settings/SettingsPage.d.ts.map +1 -1
  63. package/dist/housingvista/pages/settings/SettingsPage.js +54 -52
  64. package/dist/housingvista/pages/settings/SettingsPage.js.map +1 -1
  65. package/dist/housingvista/pages/shortlist/ShortlistPage.d.ts.map +1 -1
  66. package/dist/housingvista/pages/shortlist/ShortlistPage.js +43 -41
  67. package/dist/housingvista/pages/shortlist/ShortlistPage.js.map +1 -1
  68. package/dist/housingvista/pages/transactions/TransactionDetailPage.d.ts.map +1 -1
  69. package/dist/housingvista/pages/transactions/TransactionDetailPage.js +211 -208
  70. package/dist/housingvista/pages/transactions/TransactionDetailPage.js.map +1 -1
  71. package/dist/housingvista/pages/transactions/TransactionsPage.d.ts.map +1 -1
  72. package/dist/housingvista/pages/transactions/TransactionsPage.js +85 -83
  73. package/dist/housingvista/pages/transactions/TransactionsPage.js.map +1 -1
  74. package/dist/housingvista/pages/verification/VerificationDetailPage.d.ts.map +1 -1
  75. package/dist/housingvista/pages/verification/VerificationDetailPage.js +25 -22
  76. package/dist/housingvista/pages/verification/VerificationDetailPage.js.map +1 -1
  77. package/dist/housingvista/pages/verification/VerificationPage.d.ts.map +1 -1
  78. package/dist/housingvista/pages/verification/VerificationPage.js +123 -121
  79. package/dist/housingvista/pages/verification/VerificationPage.js.map +1 -1
  80. package/dist/housingvista/pages/viewings/ViewingsPage.d.ts.map +1 -1
  81. package/dist/housingvista/pages/viewings/ViewingsPage.js +128 -126
  82. package/dist/housingvista/pages/viewings/ViewingsPage.js.map +1 -1
  83. package/package.json +1 -1
@@ -1,27 +1,28 @@
1
1
  import { cn as e, formatCurrency as t, formatDate as n } from "../../utils/helpers.js";
2
2
  import { StatCard as r } from "../../components/StatCard.js";
3
3
  import { StatusBadge as i } from "../../components/StatusBadge.js";
4
- import { EmptyState as a } from "../../components/EmptyState.js";
5
- import { ChartCard as ee } from "../../components/ChartCard.js";
6
- import { Breadcrumbs as te } from "../../components/Breadcrumbs.js";
7
- import { LoadingSkeleton as ne } from "../../components/LoadingSkeleton.js";
8
- import { useDeleteInvestment as re, useInvestment as ie, useUpdateInvestment as ae } from "../../hooks/index.js";
9
- import { notify as o } from "../../lib/toast.js";
4
+ import { EmptyState as ee } from "../../components/EmptyState.js";
5
+ import { ChartCard as te } from "../../components/ChartCard.js";
6
+ import { Breadcrumbs as ne } from "../../components/Breadcrumbs.js";
7
+ import { LoadingSkeleton as re } from "../../components/LoadingSkeleton.js";
8
+ import { useTrackPageView as ie } from "../../hooks/useHousingVistaAnalytics.js";
9
+ import { useDeleteInvestment as ae, useInvestment as oe, useUpdateInvestment as se } from "../../hooks/index.js";
10
+ import { notify as a } from "../../lib/toast.js";
10
11
  import "../../components/index.js";
11
- import { Tooltip as oe } from "../../../node_modules/recharts/es6/component/Tooltip.js";
12
- import { ResponsiveContainer as se } from "../../../node_modules/recharts/es6/component/ResponsiveContainer.js";
13
- import { CartesianGrid as ce } from "../../../node_modules/recharts/es6/cartesian/CartesianGrid.js";
14
- import { Area as le } from "../../../node_modules/recharts/es6/cartesian/Area.js";
15
- import { XAxis as ue } from "../../../node_modules/recharts/es6/cartesian/XAxis.js";
16
- import { YAxis as de } from "../../../node_modules/recharts/es6/cartesian/YAxis.js";
17
- import { AreaChart as fe } from "../../../node_modules/recharts/es6/chart/AreaChart.js";
18
- import { useState as s } from "react";
19
- import { ArrowDownRight as pe, ArrowLeft as c, ArrowUpRight as me, BarChart3 as he, Building as l, Calendar as ge, Clock as _e, DollarSign as ve, MapPin as ye, Percent as be, Target as xe, Trash2 as Se, TrendingUp as Ce, Users as we } from "lucide-react";
20
- import { useNavigate as Te, useParams as Ee } from "react-router-dom";
21
- import { jsx as u, jsxs as d } from "react/jsx-runtime";
22
- import { Button as f, EmphasisPanel as De, NextSteps as Oe, PagePurpose as ke, ResponsiveDialog as p, ResponsiveDialogContent as m, ResponsiveDialogDescription as h, ResponsiveDialogFooter as g, ResponsiveDialogHeader as _, ResponsiveDialogTitle as v } from "@burdenoff/fe-libs/ui";
12
+ import { Tooltip as ce } from "../../../node_modules/recharts/es6/component/Tooltip.js";
13
+ import { ResponsiveContainer as le } from "../../../node_modules/recharts/es6/component/ResponsiveContainer.js";
14
+ import { CartesianGrid as ue } from "../../../node_modules/recharts/es6/cartesian/CartesianGrid.js";
15
+ import { Area as de } from "../../../node_modules/recharts/es6/cartesian/Area.js";
16
+ import { XAxis as fe } from "../../../node_modules/recharts/es6/cartesian/XAxis.js";
17
+ import { YAxis as pe } from "../../../node_modules/recharts/es6/cartesian/YAxis.js";
18
+ import { AreaChart as me } from "../../../node_modules/recharts/es6/chart/AreaChart.js";
19
+ import { useState as o } from "react";
20
+ import { ArrowDownRight as he, ArrowLeft as ge, ArrowUpRight as _e, BarChart3 as ve, Building as s, Calendar as ye, Clock as be, DollarSign as c, MapPin as xe, Percent as Se, Target as Ce, Trash2 as we, TrendingUp as Te, Users as Ee } from "lucide-react";
21
+ import { useNavigate as De, useParams as Oe } from "react-router-dom";
22
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
23
+ import { Button as d, EmphasisPanel as ke, NextSteps as Ae, PagePurpose as je, ResponsiveDialog as Me, ResponsiveDialogContent as f, ResponsiveDialogDescription as p, ResponsiveDialogFooter as m, ResponsiveDialogHeader as h, ResponsiveDialogTitle as Ne } from "@burdenoff/fe-libs/ui";
23
24
  //#region src/housingvista/pages/investments/InvestmentDetailPage.tsx
24
- var y = "h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", Ae = [
25
+ var g = "h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", Pe = [
25
26
  {
26
27
  value: "full_ownership",
27
28
  label: "Full ownership"
@@ -38,7 +39,7 @@ var y = "h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 t
38
39
  value: "fund",
39
40
  label: "Fund"
40
41
  }
41
- ], je = [
42
+ ], Fe = [
42
43
  {
43
44
  value: "draft",
44
45
  label: "Draft"
@@ -63,7 +64,7 @@ var y = "h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 t
63
64
  value: "closed",
64
65
  label: "Closed"
65
66
  }
66
- ], Me = [
67
+ ], Ie = [
67
68
  {
68
69
  value: "low",
69
70
  label: "Low"
@@ -77,39 +78,39 @@ var y = "h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 t
77
78
  label: "High"
78
79
  }
79
80
  ];
80
- function b(e) {
81
+ function _(e) {
81
82
  return typeof e == "object" && e ? e : {};
82
83
  }
83
- function x(e) {
84
+ function v(e) {
84
85
  return typeof e == "number" && Number.isFinite(e) ? e : 0;
85
86
  }
86
- function S(e) {
87
+ function y(e) {
87
88
  return typeof e == "string" ? e : "";
88
89
  }
89
- function C(e) {
90
+ function b(e) {
90
91
  return e instanceof Date ? Number.isNaN(e.getTime()) ? "" : e.toISOString() : typeof e == "string" ? e : "";
91
92
  }
92
- function w(e) {
93
- let t = C(e);
93
+ function x(e) {
94
+ let t = b(e);
94
95
  if (!t) return null;
95
96
  let n = new Date(t).getTime();
96
97
  return Number.isNaN(n) ? null : n;
97
98
  }
98
- function T(e) {
99
- let t = C(e);
99
+ function S(e) {
100
+ let t = b(e);
100
101
  if (!t) return "—";
101
102
  let r = new Date(t).getTime();
102
103
  return Number.isNaN(r) ? "—" : n(t);
103
104
  }
104
- function E(e) {
105
- let t = w(e);
105
+ function Le(e) {
106
+ let t = x(e);
106
107
  return t === null ? "" : new Date(t).toISOString().slice(0, 10);
107
108
  }
108
- function D(e) {
109
- let t = b(e);
110
- return `${S(t.firstName)} ${S(t.lastName)}`.trim() || S(t.name) || S(t.email) || "Investor";
109
+ function Re(e) {
110
+ let t = _(e);
111
+ return `${y(t.firstName)} ${y(t.lastName)}`.trim() || y(t.name) || y(t.email) || "Investor";
111
112
  }
112
- function Ne(e) {
113
+ function ze(e) {
113
114
  switch (e) {
114
115
  case "active": return "success";
115
116
  case "funding": return "warning";
@@ -120,49 +121,51 @@ function Ne(e) {
120
121
  default: return "default";
121
122
  }
122
123
  }
123
- function O(e) {
124
+ function C(e) {
124
125
  return e > 0 ? "text-status-success-text" : e < 0 ? "text-status-error-text" : "text-text-secondary";
125
126
  }
126
- function k() {
127
- let { id: n } = Ee(), C = Te(), { data: k, loading: Pe } = ie(n), { updateInvestment: Fe, loading: A } = ae(), { deleteInvestment: Ie, loading: j } = re(), [M, N] = s("overview"), [Le, P] = s(!1), [Re, F] = s(!1), [I, L] = s(""), [R, z] = s("draft"), [ze, Be] = s("medium"), [Ve, He] = s("full_ownership"), [B, Ue] = s(""), [V, We] = s(""), [H, Ge] = s("");
128
- if (Pe) return /* @__PURE__ */ u("div", {
127
+ function w() {
128
+ let { id: n } = Oe();
129
+ ie("housingvista.investment.viewed", n);
130
+ let b = De(), { data: w, loading: Be } = oe(n), { updateInvestment: Ve, loading: T } = se(), { deleteInvestment: He, loading: E } = ae(), [D, O] = o("overview"), [Ue, k] = o(!1), [We, A] = o(!1), [j, M] = o(""), [N, P] = o("draft"), [F, I] = o("medium"), [L, R] = o("full_ownership"), [z, B] = o(""), [V, H] = o(""), [U, Ge] = o("");
131
+ if (Be) return /* @__PURE__ */ l("div", {
129
132
  className: "flex flex-col gap-6 p-6",
130
- children: /* @__PURE__ */ u(ne, { variant: "detail" })
133
+ children: /* @__PURE__ */ l(re, { variant: "detail" })
131
134
  });
132
- if (!k) return /* @__PURE__ */ u("div", {
135
+ if (!w) return /* @__PURE__ */ l("div", {
133
136
  className: "flex flex-col gap-6 p-6",
134
- children: /* @__PURE__ */ u(a, {
137
+ children: /* @__PURE__ */ l(ee, {
135
138
  illustration: "empty-search",
136
- icon: /* @__PURE__ */ u(l, { className: "h-16 w-16" }),
139
+ icon: /* @__PURE__ */ l(s, { className: "h-16 w-16" }),
137
140
  title: "Investment Not Found",
138
141
  description: "The investment you're looking for doesn't exist or has been removed.",
139
- action: /* @__PURE__ */ d("button", {
140
- onClick: () => C("../investments"),
142
+ action: /* @__PURE__ */ u("button", {
143
+ onClick: () => b("../investments"),
141
144
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg-hover",
142
- children: [/* @__PURE__ */ u(c, { className: "h-4 w-4" }), "Back to Investments"]
145
+ children: [/* @__PURE__ */ l(ge, { className: "h-4 w-4" }), "Back to Investments"]
143
146
  })
144
147
  })
145
148
  });
146
- let U = (Array.isArray(k.investors) ? k.investors : []).map((e) => {
147
- let t = b(e);
149
+ let W = (Array.isArray(w.investors) ? w.investors : []).map((e) => {
150
+ let t = _(e);
148
151
  return {
149
- name: D(t.user),
150
- investmentAmount: x(t.investmentAmount),
151
- shares: x(t.shares),
152
+ name: Re(t.user),
153
+ investmentAmount: v(t.investmentAmount),
154
+ shares: v(t.shares),
152
155
  joinedAt: t.joinedAt
153
156
  };
154
- }), W = (Array.isArray(k.returns) ? k.returns : []).map((e, t) => {
155
- let n = b(e);
157
+ }), G = (Array.isArray(w.returns) ? w.returns : []).map((e, t) => {
158
+ let n = _(e);
156
159
  return {
157
- id: S(n.id) || `return-${t}`,
158
- type: S(n.type) || "return",
159
- amount: x(n.amount),
160
+ id: y(n.id) || `return-${t}`,
161
+ type: y(n.type) || "return",
162
+ amount: v(n.amount),
160
163
  date: n.date,
161
- investorName: D(n.investor)
164
+ investorName: Re(n.investor)
162
165
  };
163
- }), Ke = W.map((e) => ({
164
- ts: w(e.date) ?? 0,
165
- label: T(e.date),
166
+ }), Ke = G.map((e) => ({
167
+ ts: x(e.date) ?? 0,
168
+ label: S(e.date),
166
169
  amount: e.amount
167
170
  })).sort((e, t) => e.ts - t.ts).reduce((e, t) => {
168
171
  let n = e.length > 0 ? e[e.length - 1].cumulative : 0;
@@ -171,80 +174,80 @@ function k() {
171
174
  amount: t.amount,
172
175
  cumulative: n + t.amount
173
176
  }), e;
174
- }, []), G = b(k.property), K = S(G.title) || "Investment", q = b(G.location), J = S(G.type), qe = [S(q.city), S(q.state)].filter(Boolean), Je = S(q.neighborhood), Y = U.reduce((e, t) => e + t.investmentAmount, 0), X = W.reduce((e, t) => e + t.amount, 0), Ye = Y + X, Xe = Y > 0 ? X / Y * 100 : 0, Ze = w(k.startDate), Qe = w(k.maturityDate), $e = Ze !== null && Qe !== null ? Math.max(0, Math.round((Qe - Ze) / (1e3 * 60 * 60 * 24 * 30))) : null, Z = S(k.riskLevel), Q = Z ? Z.charAt(0).toUpperCase() + Z.slice(1) : "Unknown", et = S(k.investmentType).replace("_", " ") || "Investment", tt = [{
177
+ }, []), K = _(w.property), q = y(K.title) || "Investment", J = _(K.location), qe = y(K.type), Je = [y(J.city), y(J.state)].filter(Boolean), Ye = y(J.neighborhood), Y = W.reduce((e, t) => e + t.investmentAmount, 0), X = G.reduce((e, t) => e + t.amount, 0), Xe = Y + X, Ze = Y > 0 ? X / Y * 100 : 0, Qe = x(w.startDate), $e = x(w.maturityDate), et = Qe !== null && $e !== null ? Math.max(0, Math.round(($e - Qe) / (1e3 * 60 * 60 * 24 * 30))) : null, Z = y(w.riskLevel), Q = Z ? Z.charAt(0).toUpperCase() + Z.slice(1) : "Unknown", tt = y(w.investmentType).replace("_", " ") || "Investment", nt = [{
175
178
  id: "overview",
176
179
  label: "Overview",
177
- icon: l
180
+ icon: s
178
181
  }, {
179
182
  id: "returns",
180
183
  label: "Returns History",
181
- icon: he
184
+ icon: ve
182
185
  }], $ = () => {
183
- L(S(k.title) || K), z(S(k.status) || "draft"), Be(S(k.riskLevel) || "medium"), He(S(k.investmentType) || "full_ownership");
184
- let e = x(k.totalValue);
185
- Ue(e > 0 ? String(e) : ""), We(E(k.startDate)), Ge(E(k.maturityDate)), P(!0);
186
+ M(y(w.title) || q), P(y(w.status) || "draft"), I(y(w.riskLevel) || "medium"), R(y(w.investmentType) || "full_ownership");
187
+ let e = v(w.totalValue);
188
+ B(e > 0 ? String(e) : ""), H(Le(w.startDate)), Ge(Le(w.maturityDate)), k(!0);
186
189
  };
187
- return /* @__PURE__ */ d("div", {
190
+ return /* @__PURE__ */ u("div", {
188
191
  className: "flex flex-col gap-6 p-6",
189
192
  children: [
190
- /* @__PURE__ */ u(te, { items: [{
193
+ /* @__PURE__ */ l(ne, { items: [{
191
194
  label: "Investments",
192
195
  href: "../investments"
193
- }, { label: K }] }),
194
- /* @__PURE__ */ d("div", {
196
+ }, { label: q }] }),
197
+ /* @__PURE__ */ u("div", {
195
198
  className: "flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between",
196
- children: [/* @__PURE__ */ d("div", { children: [
197
- /* @__PURE__ */ d("button", {
198
- onClick: () => C("../investments"),
199
+ children: [/* @__PURE__ */ u("div", { children: [
200
+ /* @__PURE__ */ u("button", {
201
+ onClick: () => b("../investments"),
199
202
  className: "mb-2 inline-flex items-center gap-2 rounded-md px-2 py-1 text-sm text-text-secondary transition-colors hover:bg-bg-sunken hover:text-text-primary",
200
- children: [/* @__PURE__ */ u(c, { className: "h-4 w-4" }), "Back to Investments"]
203
+ children: [/* @__PURE__ */ l(ge, { className: "h-4 w-4" }), "Back to Investments"]
201
204
  }),
202
- /* @__PURE__ */ u("h1", {
205
+ /* @__PURE__ */ l("h1", {
203
206
  className: "text-2xl font-semibold text-text-primary",
204
- children: K
207
+ children: q
205
208
  }),
206
- /* @__PURE__ */ d("div", {
209
+ /* @__PURE__ */ u("div", {
207
210
  className: "mt-2 flex flex-wrap items-center gap-2",
208
211
  children: [
209
- /* @__PURE__ */ u(i, {
210
- label: k.status,
211
- variant: Ne(k.status)
212
+ /* @__PURE__ */ l(i, {
213
+ label: w.status,
214
+ variant: ze(w.status)
212
215
  }),
213
- /* @__PURE__ */ u(i, {
214
- label: et,
216
+ /* @__PURE__ */ l(i, {
217
+ label: tt,
215
218
  variant: "muted"
216
219
  }),
217
- /* @__PURE__ */ u(i, {
220
+ /* @__PURE__ */ l(i, {
218
221
  label: `${Q} Risk`,
219
222
  variant: "muted"
220
223
  })
221
224
  ]
222
225
  })
223
- ] }), /* @__PURE__ */ d("div", {
226
+ ] }), /* @__PURE__ */ u("div", {
224
227
  className: "flex gap-3",
225
- children: [/* @__PURE__ */ d("button", {
228
+ children: [/* @__PURE__ */ u("button", {
226
229
  onClick: $,
227
230
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg-hover",
228
- children: [/* @__PURE__ */ u(ve, { className: "h-4 w-4" }), "Manage Investment"]
229
- }), /* @__PURE__ */ d("button", {
230
- onClick: () => F(!0),
231
+ children: [/* @__PURE__ */ l(c, { className: "h-4 w-4" }), "Manage Investment"]
232
+ }), /* @__PURE__ */ u("button", {
233
+ onClick: () => A(!0),
231
234
  className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-status-error-text transition-colors hover:bg-status-error-bg-subtle",
232
- children: [/* @__PURE__ */ u(Se, { className: "h-4 w-4" }), "Delete"]
235
+ children: [/* @__PURE__ */ l(we, { className: "h-4 w-4" }), "Delete"]
233
236
  })]
234
237
  })]
235
238
  }),
236
- /* @__PURE__ */ u(ke, {
239
+ /* @__PURE__ */ l(je, {
237
240
  className: "max-w-3xl",
238
241
  children: "A full breakdown of one investment — how much was put in, what it is worth today, every return paid out, and the co-investors. Use it to judge performance and decide whether to hold, add, or exit."
239
242
  }),
240
- /* @__PURE__ */ u(Oe, {
243
+ /* @__PURE__ */ l(Ae, {
241
244
  storageKey: "housingvista-investment-detail",
242
245
  steps: [
243
246
  {
244
247
  id: "returns",
245
248
  label: "Review returns history",
246
249
  description: "See every distribution paid and the performance trend.",
247
- onClick: () => N("returns")
250
+ onClick: () => O("returns")
248
251
  },
249
252
  {
250
253
  id: "manage",
@@ -256,139 +259,139 @@ function k() {
256
259
  id: "back",
257
260
  label: "Back to all investments",
258
261
  description: "Return to your full investment portfolio.",
259
- onClick: () => C("../investments")
262
+ onClick: () => b("../investments")
260
263
  }
261
264
  ]
262
265
  }),
263
- /* @__PURE__ */ u(De, {
266
+ /* @__PURE__ */ l(ke, {
264
267
  className: "p-4",
265
- children: /* @__PURE__ */ d("div", {
268
+ children: /* @__PURE__ */ u("div", {
266
269
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
267
270
  children: [
268
- /* @__PURE__ */ u(r, {
271
+ /* @__PURE__ */ l(r, {
269
272
  label: "Invested Amount",
270
273
  value: Y,
271
274
  prefix: "$",
272
- icon: /* @__PURE__ */ u(ve, { className: "h-4 w-4" })
275
+ icon: /* @__PURE__ */ l(c, { className: "h-4 w-4" })
273
276
  }),
274
- /* @__PURE__ */ u(r, {
277
+ /* @__PURE__ */ l(r, {
275
278
  label: "Current Value",
276
- value: Ye,
279
+ value: Xe,
277
280
  prefix: "$",
278
- icon: /* @__PURE__ */ u(Ce, { className: "h-4 w-4" })
281
+ icon: /* @__PURE__ */ l(Te, { className: "h-4 w-4" })
279
282
  }),
280
- /* @__PURE__ */ u(r, {
283
+ /* @__PURE__ */ l(r, {
281
284
  label: "Total Returns",
282
285
  value: X,
283
286
  prefix: "$",
284
- icon: /* @__PURE__ */ u(be, { className: "h-4 w-4" })
287
+ icon: /* @__PURE__ */ l(Se, { className: "h-4 w-4" })
285
288
  }),
286
- /* @__PURE__ */ u(r, {
289
+ /* @__PURE__ */ l(r, {
287
290
  label: "Risk Level",
288
291
  value: Q,
289
- icon: /* @__PURE__ */ u(xe, { className: "h-4 w-4" })
292
+ icon: /* @__PURE__ */ l(Ce, { className: "h-4 w-4" })
290
293
  })
291
294
  ]
292
295
  })
293
296
  }),
294
- /* @__PURE__ */ d("div", {
297
+ /* @__PURE__ */ u("div", {
295
298
  className: "rounded-lg border border-border-subtle bg-bg-surface shadow-sm",
296
- children: [/* @__PURE__ */ u("div", {
299
+ children: [/* @__PURE__ */ l("div", {
297
300
  className: "flex gap-0 border-b border-border-subtle",
298
- children: tt.map((t) => {
301
+ children: nt.map((t) => {
299
302
  let n = t.icon;
300
- return /* @__PURE__ */ d("button", {
301
- onClick: () => N(t.id),
302
- className: e("flex items-center gap-2 border-b-2 px-4 py-3 text-sm font-medium transition-colors", M === t.id ? "border-action-primary-border text-text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
303
- children: [/* @__PURE__ */ u(n, { className: "h-4 w-4" }), t.label]
303
+ return /* @__PURE__ */ u("button", {
304
+ onClick: () => O(t.id),
305
+ className: e("flex items-center gap-2 border-b-2 px-4 py-3 text-sm font-medium transition-colors", D === t.id ? "border-action-primary-border text-text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
306
+ children: [/* @__PURE__ */ l(n, { className: "h-4 w-4" }), t.label]
304
307
  }, t.id);
305
308
  })
306
- }), /* @__PURE__ */ d("div", {
309
+ }), /* @__PURE__ */ u("div", {
307
310
  className: "p-6",
308
- children: [M === "overview" && /* @__PURE__ */ d("div", {
311
+ children: [D === "overview" && /* @__PURE__ */ u("div", {
309
312
  className: "space-y-6",
310
313
  children: [
311
- /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("h3", {
314
+ /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("h3", {
312
315
  className: "mb-4 text-lg font-semibold text-text-primary",
313
316
  children: "Investment Details"
314
- }), /* @__PURE__ */ d("div", {
317
+ }), /* @__PURE__ */ u("div", {
315
318
  className: "rounded-lg bg-bg-sunken/50 p-4 space-y-3",
316
319
  children: [
317
- /* @__PURE__ */ d("div", {
320
+ /* @__PURE__ */ u("div", {
318
321
  className: "flex justify-between",
319
- children: [/* @__PURE__ */ u("span", {
322
+ children: [/* @__PURE__ */ l("span", {
320
323
  className: "text-text-secondary",
321
324
  children: "Investment Type"
322
- }), /* @__PURE__ */ u("span", {
325
+ }), /* @__PURE__ */ l("span", {
323
326
  className: "font-medium capitalize text-text-primary",
324
- children: et
327
+ children: tt
325
328
  })]
326
329
  }),
327
- /* @__PURE__ */ d("div", {
330
+ /* @__PURE__ */ u("div", {
328
331
  className: "flex justify-between",
329
- children: [/* @__PURE__ */ u("span", {
332
+ children: [/* @__PURE__ */ l("span", {
330
333
  className: "text-text-secondary",
331
334
  children: "Property"
332
- }), /* @__PURE__ */ u("span", {
335
+ }), /* @__PURE__ */ l("span", {
333
336
  className: "font-medium text-text-primary",
334
- children: K
337
+ children: q
335
338
  })]
336
339
  }),
337
- /* @__PURE__ */ d("div", {
340
+ /* @__PURE__ */ u("div", {
338
341
  className: "flex justify-between",
339
- children: [/* @__PURE__ */ u("span", {
342
+ children: [/* @__PURE__ */ l("span", {
340
343
  className: "text-text-secondary",
341
344
  children: "Total Property Value"
342
- }), /* @__PURE__ */ u("span", {
345
+ }), /* @__PURE__ */ l("span", {
343
346
  className: "font-medium text-text-primary",
344
- children: t(x(k.totalValue))
347
+ children: t(v(w.totalValue))
345
348
  })]
346
349
  }),
347
- /* @__PURE__ */ d("div", {
350
+ /* @__PURE__ */ u("div", {
348
351
  className: "flex justify-between",
349
- children: [/* @__PURE__ */ u("span", {
352
+ children: [/* @__PURE__ */ l("span", {
350
353
  className: "text-text-secondary",
351
354
  children: "Risk Level"
352
- }), /* @__PURE__ */ u("span", {
355
+ }), /* @__PURE__ */ l("span", {
353
356
  className: "font-medium capitalize text-text-primary",
354
357
  children: Q
355
358
  })]
356
359
  }),
357
- /* @__PURE__ */ d("div", {
360
+ /* @__PURE__ */ u("div", {
358
361
  className: "flex justify-between",
359
- children: [/* @__PURE__ */ u("span", {
362
+ children: [/* @__PURE__ */ l("span", {
360
363
  className: "text-text-secondary",
361
364
  children: "Start Date"
362
- }), /* @__PURE__ */ u("span", {
365
+ }), /* @__PURE__ */ l("span", {
363
366
  className: "font-medium text-text-primary",
364
- children: T(k.startDate)
367
+ children: S(w.startDate)
365
368
  })]
366
369
  }),
367
- k.maturityDate && /* @__PURE__ */ d("div", {
370
+ w.maturityDate && /* @__PURE__ */ u("div", {
368
371
  className: "flex justify-between",
369
- children: [/* @__PURE__ */ u("span", {
372
+ children: [/* @__PURE__ */ l("span", {
370
373
  className: "text-text-secondary",
371
374
  children: "Maturity Date"
372
- }), /* @__PURE__ */ u("span", {
375
+ }), /* @__PURE__ */ l("span", {
373
376
  className: "font-medium text-text-primary",
374
- children: T(k.maturityDate)
377
+ children: S(w.maturityDate)
375
378
  })]
376
379
  }),
377
- /* @__PURE__ */ d("div", {
380
+ /* @__PURE__ */ u("div", {
378
381
  className: "flex justify-between border-t border-border-subtle pt-3",
379
- children: [/* @__PURE__ */ u("span", {
382
+ children: [/* @__PURE__ */ l("span", {
380
383
  className: "font-medium text-text-secondary",
381
384
  children: "Total Return"
382
- }), /* @__PURE__ */ u("div", {
383
- className: e("font-bold", O(X)),
384
- children: /* @__PURE__ */ d("div", {
385
+ }), /* @__PURE__ */ l("div", {
386
+ className: e("font-bold", C(X)),
387
+ children: /* @__PURE__ */ u("div", {
385
388
  className: "flex items-center gap-1",
386
389
  children: [
387
- X > 0 && /* @__PURE__ */ u(me, { className: "h-4 w-4" }),
388
- X < 0 && /* @__PURE__ */ u(pe, { className: "h-4 w-4" }),
390
+ X > 0 && /* @__PURE__ */ l(_e, { className: "h-4 w-4" }),
391
+ X < 0 && /* @__PURE__ */ l(he, { className: "h-4 w-4" }),
389
392
  t(X),
390
393
  " (",
391
- Xe.toFixed(1),
394
+ Ze.toFixed(1),
392
395
  "%)"
393
396
  ]
394
397
  })
@@ -396,157 +399,157 @@ function k() {
396
399
  })
397
400
  ]
398
401
  })] }),
399
- /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("h3", {
402
+ /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("h3", {
400
403
  className: "mb-4 text-lg font-semibold text-text-primary",
401
404
  children: "Property Information"
402
- }), /* @__PURE__ */ d("div", {
405
+ }), /* @__PURE__ */ u("div", {
403
406
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
404
407
  children: [
405
- /* @__PURE__ */ d("div", {
408
+ /* @__PURE__ */ u("div", {
406
409
  className: "rounded-lg bg-bg-sunken/50 p-4",
407
- children: [/* @__PURE__ */ d("div", {
410
+ children: [/* @__PURE__ */ u("div", {
408
411
  className: "mb-1 flex items-center gap-2 text-sm text-text-secondary",
409
- children: [/* @__PURE__ */ u(l, { className: "h-4 w-4" }), "Property Type"]
410
- }), /* @__PURE__ */ u("div", {
412
+ children: [/* @__PURE__ */ l(s, { className: "h-4 w-4" }), "Property Type"]
413
+ }), /* @__PURE__ */ l("div", {
411
414
  className: "font-semibold capitalize text-text-primary",
412
- children: J ? J.replace("_", " ") : "Not specified"
415
+ children: qe ? qe.replace("_", " ") : "Not specified"
413
416
  })]
414
417
  }),
415
- /* @__PURE__ */ d("div", {
418
+ /* @__PURE__ */ u("div", {
416
419
  className: "rounded-lg bg-bg-sunken/50 p-4",
417
420
  children: [
418
- /* @__PURE__ */ d("div", {
421
+ /* @__PURE__ */ u("div", {
419
422
  className: "mb-1 flex items-center gap-2 text-sm text-text-secondary",
420
- children: [/* @__PURE__ */ u(ye, { className: "h-4 w-4" }), "Location"]
423
+ children: [/* @__PURE__ */ l(xe, { className: "h-4 w-4" }), "Location"]
421
424
  }),
422
- /* @__PURE__ */ u("div", {
425
+ /* @__PURE__ */ l("div", {
423
426
  className: "font-semibold text-text-primary",
424
- children: qe.length > 0 ? qe.join(", ") : "Location not available"
427
+ children: Je.length > 0 ? Je.join(", ") : "Location not available"
425
428
  }),
426
- Je && /* @__PURE__ */ u("div", {
429
+ Ye && /* @__PURE__ */ l("div", {
427
430
  className: "text-sm text-text-secondary",
428
- children: Je
431
+ children: Ye
429
432
  })
430
433
  ]
431
434
  }),
432
- /* @__PURE__ */ d("div", {
435
+ /* @__PURE__ */ u("div", {
433
436
  className: "rounded-lg bg-bg-sunken/50 p-4",
434
- children: [/* @__PURE__ */ d("div", {
437
+ children: [/* @__PURE__ */ u("div", {
435
438
  className: "mb-1 flex items-center gap-2 text-sm text-text-secondary",
436
- children: [/* @__PURE__ */ u(ge, { className: "h-4 w-4" }), "Start Date"]
437
- }), /* @__PURE__ */ u("div", {
439
+ children: [/* @__PURE__ */ l(ye, { className: "h-4 w-4" }), "Start Date"]
440
+ }), /* @__PURE__ */ l("div", {
438
441
  className: "font-semibold text-text-primary",
439
- children: T(k.startDate)
442
+ children: S(w.startDate)
440
443
  })]
441
444
  }),
442
- /* @__PURE__ */ d("div", {
445
+ /* @__PURE__ */ u("div", {
443
446
  className: "rounded-lg bg-bg-sunken/50 p-4",
444
- children: [/* @__PURE__ */ d("div", {
447
+ children: [/* @__PURE__ */ u("div", {
445
448
  className: "mb-1 flex items-center gap-2 text-sm text-text-secondary",
446
- children: [/* @__PURE__ */ u(_e, { className: "h-4 w-4" }), "Duration"]
447
- }), /* @__PURE__ */ u("div", {
449
+ children: [/* @__PURE__ */ l(be, { className: "h-4 w-4" }), "Duration"]
450
+ }), /* @__PURE__ */ l("div", {
448
451
  className: "font-semibold text-text-primary",
449
- children: $e === null ? "Ongoing" : `${$e} months`
452
+ children: et === null ? "Ongoing" : `${et} months`
450
453
  })]
451
454
  })
452
455
  ]
453
456
  })] }),
454
- U.length > 0 && /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ d("h3", {
457
+ W.length > 0 && /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ u("h3", {
455
458
  className: "mb-4 flex items-center gap-2 text-lg font-semibold text-text-primary",
456
459
  children: [
457
- /* @__PURE__ */ u(we, { className: "h-5 w-5" }),
460
+ /* @__PURE__ */ l(Ee, { className: "h-5 w-5" }),
458
461
  "Investors (",
459
- U.length,
462
+ W.length,
460
463
  ")"
461
464
  ]
462
- }), /* @__PURE__ */ u("div", {
465
+ }), /* @__PURE__ */ l("div", {
463
466
  className: "space-y-2",
464
- children: U.map((e, n) => /* @__PURE__ */ d("div", {
467
+ children: W.map((e, n) => /* @__PURE__ */ u("div", {
465
468
  className: "flex items-center justify-between rounded-lg bg-bg-sunken/50 p-4",
466
- children: [/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("div", {
469
+ children: [/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("div", {
467
470
  className: "font-medium text-text-primary",
468
471
  children: e.name
469
- }), /* @__PURE__ */ d("div", {
472
+ }), /* @__PURE__ */ u("div", {
470
473
  className: "text-sm text-text-secondary",
471
474
  children: ["Invested: ", t(e.investmentAmount)]
472
- })] }), /* @__PURE__ */ d("div", {
475
+ })] }), /* @__PURE__ */ u("div", {
473
476
  className: "text-right",
474
- children: [/* @__PURE__ */ d("div", {
477
+ children: [/* @__PURE__ */ u("div", {
475
478
  className: "font-semibold text-text-primary",
476
479
  children: [e.shares, "% share"]
477
- }), /* @__PURE__ */ d("div", {
480
+ }), /* @__PURE__ */ u("div", {
478
481
  className: "text-sm text-text-secondary",
479
- children: ["Joined: ", T(e.joinedAt)]
482
+ children: ["Joined: ", S(e.joinedAt)]
480
483
  })]
481
484
  })]
482
485
  }, n))
483
486
  })] })
484
487
  ]
485
- }), M === "returns" && /* @__PURE__ */ d("div", {
488
+ }), D === "returns" && /* @__PURE__ */ u("div", {
486
489
  className: "space-y-6",
487
- children: [/* @__PURE__ */ d("div", {
490
+ children: [/* @__PURE__ */ u("div", {
488
491
  className: "flex items-center justify-between",
489
- children: [/* @__PURE__ */ u("h3", {
492
+ children: [/* @__PURE__ */ l("h3", {
490
493
  className: "text-lg font-semibold text-text-primary",
491
494
  children: "Returns History"
492
- }), /* @__PURE__ */ d("div", {
495
+ }), /* @__PURE__ */ u("div", {
493
496
  className: "text-right",
494
- children: [/* @__PURE__ */ u("div", {
497
+ children: [/* @__PURE__ */ l("div", {
495
498
  className: "text-sm text-text-secondary",
496
499
  children: "Total Returns"
497
- }), /* @__PURE__ */ u("div", {
498
- className: e("text-2xl font-bold", O(X)),
500
+ }), /* @__PURE__ */ l("div", {
501
+ className: e("text-2xl font-bold", C(X)),
499
502
  children: t(X)
500
503
  })]
501
504
  })]
502
- }), W.length > 0 ? /* @__PURE__ */ d("div", {
505
+ }), G.length > 0 ? /* @__PURE__ */ u("div", {
503
506
  className: "space-y-6",
504
- children: [/* @__PURE__ */ u(ee, {
507
+ children: [/* @__PURE__ */ l(te, {
505
508
  title: "Performance Over Time",
506
509
  description: "Cumulative returns paid out over time",
507
- children: /* @__PURE__ */ u("div", {
510
+ children: /* @__PURE__ */ l("div", {
508
511
  className: "h-64",
509
- children: /* @__PURE__ */ u(se, {
512
+ children: /* @__PURE__ */ l(le, {
510
513
  width: "100%",
511
514
  height: "100%",
512
- children: /* @__PURE__ */ d(fe, {
515
+ children: /* @__PURE__ */ u(me, {
513
516
  data: Ke,
514
517
  children: [
515
- /* @__PURE__ */ u("defs", { children: /* @__PURE__ */ d("linearGradient", {
518
+ /* @__PURE__ */ l("defs", { children: /* @__PURE__ */ u("linearGradient", {
516
519
  id: "returnsGrad",
517
520
  x1: "0",
518
521
  y1: "0",
519
522
  x2: "0",
520
523
  y2: "1",
521
- children: [/* @__PURE__ */ u("stop", {
524
+ children: [/* @__PURE__ */ l("stop", {
522
525
  offset: "5%",
523
526
  stopColor: "var(--color-chart-1)",
524
527
  stopOpacity: .3
525
- }), /* @__PURE__ */ u("stop", {
528
+ }), /* @__PURE__ */ l("stop", {
526
529
  offset: "95%",
527
530
  stopColor: "var(--color-chart-1)",
528
531
  stopOpacity: 0
529
532
  })]
530
533
  }) }),
531
- /* @__PURE__ */ u(ce, {
534
+ /* @__PURE__ */ l(ue, {
532
535
  strokeDasharray: "3 3",
533
536
  className: "stroke-border"
534
537
  }),
535
- /* @__PURE__ */ u(ue, {
538
+ /* @__PURE__ */ l(fe, {
536
539
  dataKey: "label",
537
540
  tick: { fontSize: 11 },
538
541
  className: "text-text-secondary"
539
542
  }),
540
- /* @__PURE__ */ u(de, {
543
+ /* @__PURE__ */ l(pe, {
541
544
  tick: { fontSize: 11 },
542
545
  tickFormatter: (e) => `$${(e / 1e3).toFixed(0)}K`,
543
546
  className: "text-text-secondary"
544
547
  }),
545
- /* @__PURE__ */ u(oe, {
548
+ /* @__PURE__ */ l(ce, {
546
549
  formatter: (e) => [t(e), "Cumulative returns"],
547
550
  labelClassName: "text-text-primary"
548
551
  }),
549
- /* @__PURE__ */ u(le, {
552
+ /* @__PURE__ */ l(de, {
550
553
  type: "monotone",
551
554
  dataKey: "cumulative",
552
555
  stroke: "var(--color-chart-1)",
@@ -557,29 +560,29 @@ function k() {
557
560
  })
558
561
  })
559
562
  })
560
- }), /* @__PURE__ */ u("div", {
563
+ }), /* @__PURE__ */ l("div", {
561
564
  className: "space-y-3",
562
- children: W.map((e) => /* @__PURE__ */ d("div", {
565
+ children: G.map((e) => /* @__PURE__ */ u("div", {
563
566
  className: "flex items-center justify-between rounded-lg bg-bg-sunken/50 p-4",
564
- children: [/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("div", {
567
+ children: [/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("div", {
565
568
  className: "font-medium capitalize text-text-primary",
566
569
  children: e.type
567
- }), /* @__PURE__ */ u("div", {
570
+ }), /* @__PURE__ */ l("div", {
568
571
  className: "text-sm text-text-secondary",
569
- children: T(e.date)
570
- })] }), /* @__PURE__ */ d("div", {
572
+ children: S(e.date)
573
+ })] }), /* @__PURE__ */ u("div", {
571
574
  className: "text-right",
572
- children: [/* @__PURE__ */ d("div", {
575
+ children: [/* @__PURE__ */ u("div", {
573
576
  className: "font-bold text-status-success-text",
574
577
  children: ["+", t(e.amount)]
575
- }), /* @__PURE__ */ u("div", {
578
+ }), /* @__PURE__ */ l("div", {
576
579
  className: "text-sm text-text-secondary",
577
580
  children: e.investorName
578
581
  })]
579
582
  })]
580
583
  }, e.id))
581
584
  })]
582
- }) : /* @__PURE__ */ u(a, {
585
+ }) : /* @__PURE__ */ l(ee, {
583
586
  illustration: "empty-data",
584
587
  title: "No returns recorded yet",
585
588
  description: "Returns will appear here once distributions are made."
@@ -587,166 +590,166 @@ function k() {
587
590
  })]
588
591
  })]
589
592
  }),
590
- /* @__PURE__ */ u(p, {
591
- open: Le,
592
- onOpenChange: P,
593
- children: /* @__PURE__ */ u(m, {
593
+ /* @__PURE__ */ l(Me, {
594
+ open: Ue,
595
+ onOpenChange: k,
596
+ children: /* @__PURE__ */ l(f, {
594
597
  className: "sm:max-w-md",
595
- children: /* @__PURE__ */ d("form", {
598
+ children: /* @__PURE__ */ u("form", {
596
599
  onSubmit: async (e) => {
597
600
  if (e.preventDefault(), !n) return;
598
- if (!I.trim()) {
599
- o.warning("Enter an investment title");
601
+ if (!j.trim()) {
602
+ a.warning("Enter an investment title");
600
603
  return;
601
604
  }
602
- let t = Number(B);
605
+ let t = Number(z);
603
606
  if (!Number.isFinite(t) || t <= 0) {
604
- o.warning("Enter a valid total value");
607
+ a.warning("Enter a valid total value");
605
608
  return;
606
609
  }
607
610
  try {
608
- await Fe(n, {
609
- title: I.trim(),
610
- status: R,
611
- riskLevel: ze,
612
- investmentType: Ve,
611
+ await Ve(n, {
612
+ title: j.trim(),
613
+ status: N,
614
+ riskLevel: F,
615
+ investmentType: L,
613
616
  totalValue: t,
614
617
  startDate: V ? new Date(V).toISOString() : void 0,
615
- maturityDate: H ? new Date(H).toISOString() : void 0
616
- }), o.success("Investment updated", `${I.trim()} was saved.`), P(!1);
618
+ maturityDate: U ? new Date(U).toISOString() : void 0
619
+ }), a.success("Investment updated", `${j.trim()} was saved.`), k(!1);
617
620
  } catch (e) {
618
- o.error("Could not update investment", e.message);
621
+ a.error("Could not update investment", e.message);
619
622
  }
620
623
  },
621
624
  children: [
622
- /* @__PURE__ */ d(_, { children: [/* @__PURE__ */ u(v, { children: "Manage investment" }), /* @__PURE__ */ u(h, { children: "Update the details of this holding. Changes apply immediately." })] }),
623
- /* @__PURE__ */ d("div", {
625
+ /* @__PURE__ */ u(h, { children: [/* @__PURE__ */ l(Ne, { children: "Manage investment" }), /* @__PURE__ */ l(p, { children: "Update the details of this holding. Changes apply immediately." })] }),
626
+ /* @__PURE__ */ u("div", {
624
627
  className: "space-y-3 py-2",
625
628
  children: [
626
- /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
629
+ /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
627
630
  className: "mb-1.5 block text-sm font-medium text-text-primary",
628
631
  children: "Title *"
629
- }), /* @__PURE__ */ u("input", {
632
+ }), /* @__PURE__ */ l("input", {
630
633
  type: "text",
631
634
  required: !0,
632
- value: I,
633
- onChange: (e) => L(e.target.value),
634
- className: y
635
+ value: j,
636
+ onChange: (e) => M(e.target.value),
637
+ className: g
635
638
  })] }),
636
- /* @__PURE__ */ d("div", {
639
+ /* @__PURE__ */ u("div", {
637
640
  className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
638
- children: [/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
641
+ children: [/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
639
642
  className: "mb-1.5 block text-sm font-medium text-text-primary",
640
643
  children: "Type"
641
- }), /* @__PURE__ */ u("select", {
642
- value: Ve,
643
- onChange: (e) => He(e.target.value),
644
- className: y,
645
- children: Ae.map((e) => /* @__PURE__ */ u("option", {
644
+ }), /* @__PURE__ */ l("select", {
645
+ value: L,
646
+ onChange: (e) => R(e.target.value),
647
+ className: g,
648
+ children: Pe.map((e) => /* @__PURE__ */ l("option", {
646
649
  value: e.value,
647
650
  children: e.label
648
651
  }, e.value))
649
- })] }), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
652
+ })] }), /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
650
653
  className: "mb-1.5 block text-sm font-medium text-text-primary",
651
654
  children: "Status"
652
- }), /* @__PURE__ */ u("select", {
653
- value: R,
654
- onChange: (e) => z(e.target.value),
655
- className: y,
656
- children: je.map((e) => /* @__PURE__ */ u("option", {
655
+ }), /* @__PURE__ */ l("select", {
656
+ value: N,
657
+ onChange: (e) => P(e.target.value),
658
+ className: g,
659
+ children: Fe.map((e) => /* @__PURE__ */ l("option", {
657
660
  value: e.value,
658
661
  children: e.label
659
662
  }, e.value))
660
663
  })] })]
661
664
  }),
662
- /* @__PURE__ */ d("div", {
665
+ /* @__PURE__ */ u("div", {
663
666
  className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
664
- children: [/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
667
+ children: [/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
665
668
  className: "mb-1.5 block text-sm font-medium text-text-primary",
666
669
  children: "Risk level"
667
- }), /* @__PURE__ */ u("select", {
668
- value: ze,
669
- onChange: (e) => Be(e.target.value),
670
- className: y,
671
- children: Me.map((e) => /* @__PURE__ */ u("option", {
670
+ }), /* @__PURE__ */ l("select", {
671
+ value: F,
672
+ onChange: (e) => I(e.target.value),
673
+ className: g,
674
+ children: Ie.map((e) => /* @__PURE__ */ l("option", {
672
675
  value: e.value,
673
676
  children: e.label
674
677
  }, e.value))
675
- })] }), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
678
+ })] }), /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
676
679
  className: "mb-1.5 block text-sm font-medium text-text-primary",
677
680
  children: "Total value (USD) *"
678
- }), /* @__PURE__ */ u("input", {
681
+ }), /* @__PURE__ */ l("input", {
679
682
  type: "number",
680
683
  required: !0,
681
684
  min: 1,
682
685
  step: "any",
683
- value: B,
684
- onChange: (e) => Ue(e.target.value),
685
- className: y
686
+ value: z,
687
+ onChange: (e) => B(e.target.value),
688
+ className: g
686
689
  })] })]
687
690
  }),
688
- /* @__PURE__ */ d("div", {
691
+ /* @__PURE__ */ u("div", {
689
692
  className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
690
- children: [/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
693
+ children: [/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
691
694
  className: "mb-1.5 block text-sm font-medium text-text-primary",
692
695
  children: "Start date"
693
- }), /* @__PURE__ */ u("input", {
696
+ }), /* @__PURE__ */ l("input", {
694
697
  type: "date",
695
698
  value: V,
696
- onChange: (e) => We(e.target.value),
697
- className: y
698
- })] }), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
699
+ onChange: (e) => H(e.target.value),
700
+ className: g
701
+ })] }), /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
699
702
  className: "mb-1.5 block text-sm font-medium text-text-primary",
700
703
  children: "Maturity date"
701
- }), /* @__PURE__ */ u("input", {
704
+ }), /* @__PURE__ */ l("input", {
702
705
  type: "date",
703
- value: H,
706
+ value: U,
704
707
  onChange: (e) => Ge(e.target.value),
705
- className: y
708
+ className: g
706
709
  })] })]
707
710
  })
708
711
  ]
709
712
  }),
710
- /* @__PURE__ */ d(g, { children: [/* @__PURE__ */ u(f, {
713
+ /* @__PURE__ */ u(m, { children: [/* @__PURE__ */ l(d, {
711
714
  type: "button",
712
715
  variant: "outline",
713
- onClick: () => P(!1),
716
+ onClick: () => k(!1),
714
717
  children: "Cancel"
715
- }), /* @__PURE__ */ u(f, {
718
+ }), /* @__PURE__ */ l(d, {
716
719
  type: "submit",
717
- disabled: A || !I.trim() || !B,
718
- children: A ? "Saving…" : "Save changes"
720
+ disabled: T || !j.trim() || !z,
721
+ children: T ? "Saving…" : "Save changes"
719
722
  })] })
720
723
  ]
721
724
  })
722
725
  })
723
726
  }),
724
- /* @__PURE__ */ u(p, {
725
- open: Re,
726
- onOpenChange: F,
727
- children: /* @__PURE__ */ d(m, {
727
+ /* @__PURE__ */ l(Me, {
728
+ open: We,
729
+ onOpenChange: A,
730
+ children: /* @__PURE__ */ u(f, {
728
731
  className: "sm:max-w-sm",
729
- children: [/* @__PURE__ */ d(_, { children: [/* @__PURE__ */ u(v, { children: "Delete investment?" }), /* @__PURE__ */ d(h, { children: [
732
+ children: [/* @__PURE__ */ u(h, { children: [/* @__PURE__ */ l(Ne, { children: "Delete investment?" }), /* @__PURE__ */ u(p, { children: [
730
733
  "This permanently removes “",
731
- K,
734
+ q,
732
735
  "” from your portfolio. This action cannot be undone."
733
- ] })] }), /* @__PURE__ */ d(g, { children: [/* @__PURE__ */ u(f, {
736
+ ] })] }), /* @__PURE__ */ u(m, { children: [/* @__PURE__ */ l(d, {
734
737
  type: "button",
735
738
  variant: "outline",
736
- onClick: () => F(!1),
739
+ onClick: () => A(!1),
737
740
  children: "Cancel"
738
- }), /* @__PURE__ */ u(f, {
741
+ }), /* @__PURE__ */ l(d, {
739
742
  type: "button",
740
743
  variant: "destructive",
741
744
  onClick: async () => {
742
745
  if (n) try {
743
- await Ie(n), o.success("Investment deleted"), F(!1), C("../investments");
746
+ await He(n), a.success("Investment deleted"), A(!1), b("../investments");
744
747
  } catch (e) {
745
- o.error("Could not delete investment", e.message);
748
+ a.error("Could not delete investment", e.message);
746
749
  }
747
750
  },
748
- disabled: j,
749
- children: j ? "Deleting…" : "Delete investment"
751
+ disabled: E,
752
+ children: E ? "Deleting…" : "Delete investment"
750
753
  })] })]
751
754
  })
752
755
  })
@@ -754,6 +757,6 @@ function k() {
754
757
  });
755
758
  }
756
759
  //#endregion
757
- export { k as InvestmentDetailPage };
760
+ export { w as InvestmentDetailPage };
758
761
 
759
762
  //# sourceMappingURL=InvestmentDetailPage.js.map