@burdenoff/microfe-housingvista 2026.716.1 → 2026.720.2
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.
- package/dist/housingvista/components/PropertyCard.d.ts +7 -0
- package/dist/housingvista/components/PropertyCard.d.ts.map +1 -1
- package/dist/housingvista/components/PropertyCard.js +83 -58
- package/dist/housingvista/components/PropertyCard.js.map +1 -1
- package/dist/housingvista/components/Sparkline.d.ts +15 -0
- package/dist/housingvista/components/Sparkline.d.ts.map +1 -0
- package/dist/housingvista/components/Sparkline.js +61 -0
- package/dist/housingvista/components/Sparkline.js.map +1 -0
- package/dist/housingvista/components/StatCard.d.ts +3 -0
- package/dist/housingvista/components/StatCard.d.ts.map +1 -1
- package/dist/housingvista/components/StatCard.js +33 -29
- package/dist/housingvista/components/StatCard.js.map +1 -1
- package/dist/housingvista/components/index.d.ts +2 -0
- package/dist/housingvista/components/index.d.ts.map +1 -1
- package/dist/housingvista/components/index.js +1 -0
- package/dist/housingvista/components/maps/PropertyMapView.d.ts +22 -0
- package/dist/housingvista/components/maps/PropertyMapView.d.ts.map +1 -0
- package/dist/housingvista/components/maps/PropertyMapView.js +175 -0
- package/dist/housingvista/components/maps/PropertyMapView.js.map +1 -0
- package/dist/housingvista/components/maps/index.d.ts +5 -0
- package/dist/housingvista/components/maps/index.d.ts.map +1 -0
- package/dist/housingvista/components/maps/index.js +2 -0
- package/dist/housingvista/components/maps/leaflet-setup.d.ts +27 -0
- package/dist/housingvista/components/maps/leaflet-setup.d.ts.map +1 -0
- package/dist/housingvista/components/maps/leaflet-setup.js +36 -0
- package/dist/housingvista/components/maps/leaflet-setup.js.map +1 -0
- package/dist/housingvista/hooks/index.d.ts +33 -2
- package/dist/housingvista/hooks/index.d.ts.map +1 -1
- package/dist/housingvista/hooks/index.js +177 -94
- package/dist/housingvista/hooks/index.js.map +1 -1
- package/dist/housingvista/pages/HomePage.d.ts.map +1 -1
- package/dist/housingvista/pages/HomePage.js +7 -3
- package/dist/housingvista/pages/HomePage.js.map +1 -1
- package/dist/housingvista/pages/analytics/AnalyticsPage.d.ts.map +1 -1
- package/dist/housingvista/pages/analytics/AnalyticsPage.js +146 -145
- package/dist/housingvista/pages/analytics/AnalyticsPage.js.map +1 -1
- package/dist/housingvista/pages/market/AreaInsightsPage.d.ts.map +1 -1
- package/dist/housingvista/pages/market/AreaInsightsPage.js +60 -7
- package/dist/housingvista/pages/market/AreaInsightsPage.js.map +1 -1
- package/dist/housingvista/pages/properties/PropertiesPage.d.ts.map +1 -1
- package/dist/housingvista/pages/properties/PropertiesPage.js +285 -191
- package/dist/housingvista/pages/properties/PropertiesPage.js.map +1 -1
- package/dist/housingvista/pages/properties/PropertyDetailPage.d.ts.map +1 -1
- package/dist/housingvista/pages/properties/PropertyDetailPage.js +792 -599
- package/dist/housingvista/pages/properties/PropertyDetailPage.js.map +1 -1
- package/dist/housingvista/pages/shortlist/ShortlistPage.d.ts.map +1 -1
- package/dist/housingvista/pages/shortlist/ShortlistPage.js +172 -75
- package/dist/housingvista/pages/shortlist/ShortlistPage.js.map +1 -1
- package/dist/housingvista/types/index.d.ts +44 -1
- package/dist/housingvista/types/index.d.ts.map +1 -1
- package/dist/housingvista/utils/pageContext.d.ts.map +1 -1
- package/dist/housingvista/utils/pageContext.js +20 -17
- package/dist/housingvista/utils/pageContext.js.map +1 -1
- package/dist/microfe-housingvista.css +2 -0
- package/dist/node_modules/@react-leaflet/core/lib/attribution.js +12 -0
- package/dist/node_modules/@react-leaflet/core/lib/attribution.js.map +1 -0
- package/dist/node_modules/@react-leaflet/core/lib/component.js +39 -0
- package/dist/node_modules/@react-leaflet/core/lib/component.js.map +1 -0
- package/dist/node_modules/@react-leaflet/core/lib/context.js +23 -0
- package/dist/node_modules/@react-leaflet/core/lib/context.js.map +1 -0
- package/dist/node_modules/@react-leaflet/core/lib/div-overlay.js +15 -0
- package/dist/node_modules/@react-leaflet/core/lib/div-overlay.js.map +1 -0
- package/dist/node_modules/@react-leaflet/core/lib/element.js +30 -0
- package/dist/node_modules/@react-leaflet/core/lib/element.js.map +1 -0
- package/dist/node_modules/@react-leaflet/core/lib/events.js +14 -0
- package/dist/node_modules/@react-leaflet/core/lib/events.js.map +1 -0
- package/dist/node_modules/@react-leaflet/core/lib/generic.js +18 -0
- package/dist/node_modules/@react-leaflet/core/lib/generic.js.map +1 -0
- package/dist/node_modules/@react-leaflet/core/lib/grid-layer.js +9 -0
- package/dist/node_modules/@react-leaflet/core/lib/grid-layer.js.map +1 -0
- package/dist/node_modules/@react-leaflet/core/lib/layer.js +23 -0
- package/dist/node_modules/@react-leaflet/core/lib/layer.js.map +1 -0
- package/dist/node_modules/@react-leaflet/core/lib/pane.js +12 -0
- package/dist/node_modules/@react-leaflet/core/lib/pane.js.map +1 -0
- package/dist/node_modules/leaflet/dist/leaflet-src.js +4585 -0
- package/dist/node_modules/leaflet/dist/leaflet-src.js.map +1 -0
- package/dist/node_modules/react-leaflet/lib/MapContainer.js +33 -0
- package/dist/node_modules/react-leaflet/lib/MapContainer.js.map +1 -0
- package/dist/node_modules/react-leaflet/lib/Marker.js +16 -0
- package/dist/node_modules/react-leaflet/lib/Marker.js.map +1 -0
- package/dist/node_modules/react-leaflet/lib/Popup.js +37 -0
- package/dist/node_modules/react-leaflet/lib/Popup.js.map +1 -0
- package/dist/node_modules/react-leaflet/lib/TileLayer.js +18 -0
- package/dist/node_modules/react-leaflet/lib/TileLayer.js.map +1 -0
- package/dist/node_modules/react-leaflet/lib/hooks.js +18 -0
- package/dist/node_modules/react-leaflet/lib/hooks.js.map +1 -0
- package/package.json +5 -1
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { cn as e, formatCompactCurrency as t, formatCurrency as n, formatDate as
|
|
2
|
-
import { StatusBadge as
|
|
3
|
-
import { EmptyState as
|
|
1
|
+
import { cn as e, formatCompactCurrency as t, formatCurrency as n, formatDate as r, formatNumber as i } from "../../utils/helpers.js";
|
|
2
|
+
import { StatusBadge as a } from "../../components/StatusBadge.js";
|
|
3
|
+
import { EmptyState as ee } from "../../components/EmptyState.js";
|
|
4
4
|
import { Breadcrumbs as te } from "../../components/Breadcrumbs.js";
|
|
5
|
-
import { LoadingSkeleton as
|
|
6
|
-
import { useHousingVistaAnalytics as
|
|
7
|
-
import { useBookViewing as
|
|
8
|
-
import { notify as
|
|
9
|
-
import { ContactOwnerDialog as
|
|
10
|
-
import { ReviewsSection as
|
|
5
|
+
import { LoadingSkeleton as ne } from "../../components/LoadingSkeleton.js";
|
|
6
|
+
import { useHousingVistaAnalytics as re, useTrackPageView as ie } from "../../hooks/useHousingVistaAnalytics.js";
|
|
7
|
+
import { useBookViewing as ae, useCreateInvestment as oe, useDeleteProperty as se, useProperties as ce, useProperty as le, useRemoveShortlist as ue, useRentalUnits as de, useSaveShortlist as fe, useShortlists as pe, useSubmitOffer as me, useSubmitRentalApplication as he, useUpdateProperty as ge, useUpdatePropertyReraStatus as _e } from "../../hooks/index.js";
|
|
8
|
+
import { notify as o } from "../../lib/toast.js";
|
|
9
|
+
import { ContactOwnerDialog as ve } from "../../components/ContactOwnerDialog.js";
|
|
10
|
+
import { ReviewsSection as ye } from "../../components/ReviewsSection.js";
|
|
11
11
|
import "../../components/index.js";
|
|
12
|
-
import { Tooltip as
|
|
13
|
-
import { ResponsiveContainer as
|
|
14
|
-
import { Area as
|
|
15
|
-
import { XAxis as
|
|
16
|
-
import { YAxis as
|
|
17
|
-
import { AreaChart as
|
|
18
|
-
import { useMemo as
|
|
19
|
-
import { ArrowLeft as
|
|
20
|
-
import { useLocation as
|
|
21
|
-
import { Fragment as
|
|
22
|
-
import { Button as
|
|
12
|
+
import { Tooltip as be } from "../../../node_modules/recharts/es6/component/Tooltip.js";
|
|
13
|
+
import { ResponsiveContainer as xe } from "../../../node_modules/recharts/es6/component/ResponsiveContainer.js";
|
|
14
|
+
import { Area as Se } from "../../../node_modules/recharts/es6/cartesian/Area.js";
|
|
15
|
+
import { XAxis as Ce } from "../../../node_modules/recharts/es6/cartesian/XAxis.js";
|
|
16
|
+
import { YAxis as we } from "../../../node_modules/recharts/es6/cartesian/YAxis.js";
|
|
17
|
+
import { AreaChart as Te } from "../../../node_modules/recharts/es6/chart/AreaChart.js";
|
|
18
|
+
import { useMemo as Ee, useState as s } from "react";
|
|
19
|
+
import { ArrowLeft as De, BadgeCheck as c, Bath as Oe, Bed as ke, Building as Ae, Calculator as je, Calendar as Me, Car as Ne, CheckCircle as l, ChevronLeft as Pe, ChevronRight as Fe, Compass as Ie, DollarSign as Le, Download as Re, Dumbbell as u, Flame as ze, Heart as Be, KeyRound as Ve, MapPin as He, MessageSquare as Ue, Navigation as We, ParkingCircle as Ge, Pencil as Ke, Share2 as qe, Shield as d, Square as Je, Trash2 as Ye, TreePine as f, TrendingUp as Xe, Utensils as Ze, Waves as p, Wifi as m, Wind as Qe } from "lucide-react";
|
|
20
|
+
import { useLocation as $e, useNavigate as et, useParams as tt } from "react-router-dom";
|
|
21
|
+
import { Fragment as nt, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
22
|
+
import { Button as _, EmphasisPanel as rt, NextSteps as it, PagePurpose as at, ResponsiveDialog as v, ResponsiveDialogContent as y, ResponsiveDialogDescription as b, ResponsiveDialogFooter as x, ResponsiveDialogHeader as S, ResponsiveDialogTitle as C } from "@burdenoff/fe-libs/ui";
|
|
23
23
|
//#region src/housingvista/pages/properties/PropertyDetailPage.tsx
|
|
24
|
-
var
|
|
24
|
+
var ot = {
|
|
25
25
|
for_sale: "success",
|
|
26
26
|
for_rent: "info",
|
|
27
27
|
sold: "muted",
|
|
28
28
|
rented: "muted",
|
|
29
29
|
under_contract: "warning",
|
|
30
30
|
off_market: "error"
|
|
31
|
-
},
|
|
31
|
+
}, st = [
|
|
32
32
|
{
|
|
33
33
|
value: "for_sale",
|
|
34
34
|
label: "For Sale"
|
|
@@ -53,7 +53,7 @@ var A = {
|
|
|
53
53
|
value: "off_market",
|
|
54
54
|
label: "Off Market"
|
|
55
55
|
}
|
|
56
|
-
],
|
|
56
|
+
], ct = [
|
|
57
57
|
{
|
|
58
58
|
id: "details",
|
|
59
59
|
label: "Details"
|
|
@@ -66,10 +66,10 @@ var A = {
|
|
|
66
66
|
id: "location",
|
|
67
67
|
label: "Location"
|
|
68
68
|
}
|
|
69
|
-
],
|
|
69
|
+
], w = "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)]", lt = [
|
|
70
70
|
{
|
|
71
71
|
match: /pool|swim/i,
|
|
72
|
-
icon:
|
|
72
|
+
icon: p
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
75
|
match: /gym|fitness/i,
|
|
@@ -77,311 +77,317 @@ var A = {
|
|
|
77
77
|
},
|
|
78
78
|
{
|
|
79
79
|
match: /park/i,
|
|
80
|
-
icon:
|
|
80
|
+
icon: Ge
|
|
81
81
|
},
|
|
82
82
|
{
|
|
83
83
|
match: /garden|green|lawn|park/i,
|
|
84
|
-
icon:
|
|
84
|
+
icon: f
|
|
85
85
|
},
|
|
86
86
|
{
|
|
87
87
|
match: /security|guard|cctv|gated/i,
|
|
88
|
-
icon:
|
|
88
|
+
icon: d
|
|
89
89
|
},
|
|
90
90
|
{
|
|
91
91
|
match: /wifi|internet|broadband/i,
|
|
92
|
-
icon:
|
|
92
|
+
icon: m
|
|
93
93
|
},
|
|
94
94
|
{
|
|
95
95
|
match: /a\/?c|air.?condition|central air|hvac/i,
|
|
96
|
-
icon:
|
|
96
|
+
icon: Qe
|
|
97
97
|
},
|
|
98
98
|
{
|
|
99
99
|
match: /fire|chimney|heat/i,
|
|
100
|
-
icon:
|
|
100
|
+
icon: ze
|
|
101
101
|
},
|
|
102
102
|
{
|
|
103
103
|
match: /kitchen|modular|dining/i,
|
|
104
|
-
icon:
|
|
104
|
+
icon: Ze
|
|
105
105
|
},
|
|
106
106
|
{
|
|
107
107
|
match: /car|garage/i,
|
|
108
|
-
icon:
|
|
108
|
+
icon: Ne
|
|
109
109
|
}
|
|
110
|
-
],
|
|
111
|
-
let { id: l } =
|
|
112
|
-
|
|
113
|
-
let { data:
|
|
110
|
+
], ut = (e) => lt.find((t) => t.match.test(e))?.icon ?? l, T = () => {
|
|
111
|
+
let { id: l } = tt(), u = et(), ze = $e(), { emit: Ge, emitResource: d } = re();
|
|
112
|
+
ie("housingvista.property.viewed", l);
|
|
113
|
+
let { data: f, loading: Ze } = le(l), { data: p } = ce({ pagination: {
|
|
114
114
|
limit: 8,
|
|
115
115
|
offset: 0
|
|
116
|
-
} }), { data:
|
|
116
|
+
} }), { data: m } = pe(), { data: Qe } = de({
|
|
117
117
|
filter: l ? { propertyId: l } : void 0,
|
|
118
118
|
pagination: {
|
|
119
119
|
limit: 1,
|
|
120
120
|
offset: 0
|
|
121
121
|
}
|
|
122
|
-
}), { saveShortlist:
|
|
123
|
-
if (
|
|
122
|
+
}), { saveShortlist: lt, loading: T } = fe(), { removeShortlist: dt, loading: ft } = ue(), { bookViewing: pt, loading: mt } = ae(), { submitOffer: ht, loading: gt } = me(), { updateProperty: _t, loading: vt } = ge(), { deleteProperty: yt, loading: bt } = se(), { submitRentalApplication: xt, loading: St } = he(), { createInvestment: Ct, loading: wt } = oe(), { updatePropertyReraStatus: Tt, loading: Et } = _e(), Dt = Ee(() => p.filter((e) => e.id !== l).slice(0, 3), [p, l]), E = Ee(() => m.some((e) => e.propertyId === l), [m, l]), [D, O] = s(0), [k, Ot] = s("details"), [kt, A] = s(!1), [At, j] = s(!1), [jt, M] = s(!1), [Mt, N] = s(!1), [Nt, P] = s(!1), [Pt, Ft] = s(!1), [F, It] = s(""), [I, Lt] = s(""), [Rt, zt] = s(""), [L, Bt] = s(""), [Vt, Ht] = s(""), [Ut, Wt] = s(""), [Gt, Kt] = s(""), [qt, Jt] = s("8"), [R, Yt] = s(!0), [Xt, Zt] = s("6"), [z, Qt] = s(!1), [$t, en] = s("20"), [tn, nn] = s("8.5"), [rn, an] = s("20"), [B, on] = s(""), [sn, cn] = s("in_person"), [ln, un] = s(""), [dn, fn] = s(""), [pn, mn] = s(""), [hn, gn] = s(""), [_n, vn] = s(""), [yn, bn] = s(""), [xn, Sn] = s(""), [Cn, wn] = s("for_sale"), [Tn, En] = s("");
|
|
123
|
+
if (Ze) return /* @__PURE__ */ g("div", {
|
|
124
124
|
className: "space-y-6 p-6",
|
|
125
|
-
children: [/* @__PURE__ */
|
|
125
|
+
children: [/* @__PURE__ */ h(ne, { className: "h-80" }), /* @__PURE__ */ h(ne, { variant: "detail" })]
|
|
126
126
|
});
|
|
127
|
-
if (!
|
|
127
|
+
if (!f) return /* @__PURE__ */ h("div", {
|
|
128
128
|
className: "p-6",
|
|
129
|
-
children: /* @__PURE__ */
|
|
129
|
+
children: /* @__PURE__ */ h(ee, {
|
|
130
130
|
illustration: "empty-search",
|
|
131
|
-
icon: /* @__PURE__ */
|
|
131
|
+
icon: /* @__PURE__ */ h(Ae, { className: "h-12 w-12" }),
|
|
132
132
|
title: "Property Not Found",
|
|
133
133
|
description: "The property you're looking for doesn't exist or has been removed.",
|
|
134
|
-
action: /* @__PURE__ */
|
|
134
|
+
action: /* @__PURE__ */ g("button", {
|
|
135
135
|
onClick: () => u("../properties"),
|
|
136
136
|
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",
|
|
137
|
-
children: [/* @__PURE__ */
|
|
137
|
+
children: [/* @__PURE__ */ h(De, { className: "h-4 w-4" }), "Back to Properties"]
|
|
138
138
|
})
|
|
139
139
|
})
|
|
140
140
|
});
|
|
141
|
-
let
|
|
141
|
+
let Dn = [{
|
|
142
142
|
label: "Properties",
|
|
143
143
|
href: "../"
|
|
144
|
-
}, { label:
|
|
144
|
+
}, { label: f.title }], V = (e) => {
|
|
145
145
|
let t = n(e.amount, e.currency);
|
|
146
146
|
return e.type === "rent" && e.period ? `${t}/${e.period.replace("ly", "")}` : t;
|
|
147
|
-
},
|
|
147
|
+
}, On = () => O((e) => e === f.images.length - 1 ? 0 : e + 1), kn = () => O((e) => e === 0 ? f.images.length - 1 : e - 1), An = () => {
|
|
148
148
|
navigator.share ? navigator.share({
|
|
149
|
-
title:
|
|
150
|
-
text:
|
|
149
|
+
title: f.title,
|
|
150
|
+
text: f.description,
|
|
151
151
|
url: window.location.href
|
|
152
|
-
}) : (navigator.clipboard.writeText(window.location.href),
|
|
153
|
-
},
|
|
152
|
+
}) : (navigator.clipboard.writeText(window.location.href), o.info("Link copied", "The property link is on your clipboard."));
|
|
153
|
+
}, jn = async () => {
|
|
154
154
|
try {
|
|
155
|
-
|
|
155
|
+
E ? (await dt(f.id), o.success("Removed from shortlist")) : (await lt(f.id), d("housingvista.shortlist.property_added", f.id), o.success("Saved to shortlist"));
|
|
156
156
|
} catch (e) {
|
|
157
|
-
|
|
157
|
+
o.error("Could not update shortlist", e.message);
|
|
158
158
|
}
|
|
159
|
-
},
|
|
160
|
-
if (e.preventDefault(),
|
|
161
|
-
await
|
|
162
|
-
propertyId:
|
|
163
|
-
scheduledAt: new Date(
|
|
164
|
-
type:
|
|
165
|
-
attendeeName:
|
|
166
|
-
attendeeEmail:
|
|
167
|
-
notes:
|
|
168
|
-
}),
|
|
159
|
+
}, Mn = async (e) => {
|
|
160
|
+
if (e.preventDefault(), B) try {
|
|
161
|
+
await pt({
|
|
162
|
+
propertyId: f.id,
|
|
163
|
+
scheduledAt: new Date(B).toISOString(),
|
|
164
|
+
type: sn,
|
|
165
|
+
attendeeName: ln.trim() || void 0,
|
|
166
|
+
attendeeEmail: dn.trim() || void 0,
|
|
167
|
+
notes: pn.trim() || void 0
|
|
168
|
+
}), d("housingvista.viewing.scheduled", f.id), o.success("Viewing requested", "The owner will confirm your slot shortly."), A(!1), on(""), un(""), fn(""), mn("");
|
|
169
169
|
} catch (e) {
|
|
170
|
-
|
|
170
|
+
o.error("Could not book viewing", e.message);
|
|
171
171
|
}
|
|
172
|
-
},
|
|
172
|
+
}, Nn = async (e) => {
|
|
173
173
|
e.preventDefault();
|
|
174
|
-
let t = Number(
|
|
174
|
+
let t = Number(hn);
|
|
175
175
|
if (!t || t <= 0) {
|
|
176
|
-
|
|
176
|
+
o.warning("Enter a valid offer amount");
|
|
177
177
|
return;
|
|
178
178
|
}
|
|
179
179
|
try {
|
|
180
|
-
await
|
|
181
|
-
propertyId:
|
|
180
|
+
await ht({
|
|
181
|
+
propertyId: f.id,
|
|
182
182
|
amount: t,
|
|
183
|
-
currency:
|
|
184
|
-
notes:
|
|
185
|
-
}),
|
|
183
|
+
currency: f.price.currency,
|
|
184
|
+
notes: _n.trim() || void 0
|
|
185
|
+
}), d("housingvista.offer.created", f.id), o.success("Offer submitted", `Your offer of ${n(t, f.price.currency)} was sent.`), j(!1), gn(""), vn("");
|
|
186
186
|
} catch (e) {
|
|
187
|
-
|
|
187
|
+
o.error("Could not submit offer", e.message);
|
|
188
188
|
}
|
|
189
|
-
},
|
|
190
|
-
|
|
191
|
-
},
|
|
189
|
+
}, Pn = () => {
|
|
190
|
+
bn(f.title), Sn(f.description), wn(f.status), En(String(f.price.amount)), M(!0);
|
|
191
|
+
}, Fn = async (e) => {
|
|
192
192
|
e.preventDefault();
|
|
193
193
|
try {
|
|
194
|
-
await
|
|
195
|
-
title:
|
|
196
|
-
description:
|
|
197
|
-
status:
|
|
198
|
-
price: Number(
|
|
199
|
-
}),
|
|
194
|
+
await _t(f.id, {
|
|
195
|
+
title: yn.trim(),
|
|
196
|
+
description: xn.trim(),
|
|
197
|
+
status: Cn,
|
|
198
|
+
price: Number(Tn) || f.price.amount
|
|
199
|
+
}), d("housingvista.property.updated", f.id), o.success("Property updated"), M(!1);
|
|
200
200
|
} catch (e) {
|
|
201
|
-
|
|
201
|
+
o.error("Could not update property", e.message);
|
|
202
202
|
}
|
|
203
|
-
},
|
|
203
|
+
}, In = async () => {
|
|
204
204
|
try {
|
|
205
|
-
await
|
|
205
|
+
await yt(f.id), d("housingvista.property.deleted", f.id), o.success("Property deleted"), u("../properties");
|
|
206
206
|
} catch (e) {
|
|
207
|
-
|
|
207
|
+
o.error("Could not delete property", e.message);
|
|
208
208
|
}
|
|
209
|
-
},
|
|
210
|
-
if (e.preventDefault(), !
|
|
211
|
-
|
|
209
|
+
}, H = Qe[0]?.id, Ln = async (e) => {
|
|
210
|
+
if (e.preventDefault(), !H) {
|
|
211
|
+
o.warning("No rental unit is available for this property yet");
|
|
212
212
|
return;
|
|
213
213
|
}
|
|
214
|
-
if (!
|
|
215
|
-
|
|
214
|
+
if (!F.trim() || !I.trim()) {
|
|
215
|
+
o.warning("Enter your name and email to apply");
|
|
216
216
|
return;
|
|
217
217
|
}
|
|
218
218
|
try {
|
|
219
|
-
await
|
|
220
|
-
rentalUnitId:
|
|
221
|
-
applicantName:
|
|
222
|
-
applicantEmail:
|
|
223
|
-
applicantPhone:
|
|
224
|
-
monthlyIncome:
|
|
225
|
-
moveInDate:
|
|
226
|
-
}),
|
|
219
|
+
await xt({
|
|
220
|
+
rentalUnitId: H,
|
|
221
|
+
applicantName: F.trim(),
|
|
222
|
+
applicantEmail: I.trim(),
|
|
223
|
+
applicantPhone: Rt.trim() || void 0,
|
|
224
|
+
monthlyIncome: L ? Number(L) : void 0,
|
|
225
|
+
moveInDate: Vt ? new Date(Vt).toISOString() : void 0
|
|
226
|
+
}), o.success("Application submitted", "The owner will review your rental application shortly."), P(!1), It(""), Lt(""), zt(""), Bt(""), Ht("");
|
|
227
227
|
} catch (e) {
|
|
228
|
-
|
|
228
|
+
o.error("Could not submit application", e.message);
|
|
229
229
|
}
|
|
230
|
-
},
|
|
230
|
+
}, Rn = async () => {
|
|
231
231
|
try {
|
|
232
|
-
await
|
|
233
|
-
propertyId:
|
|
234
|
-
title: `${
|
|
232
|
+
await Ct({
|
|
233
|
+
propertyId: f.id,
|
|
234
|
+
title: `${f.title} — investment`,
|
|
235
235
|
status: "active",
|
|
236
236
|
investmentType: "full_ownership",
|
|
237
237
|
riskLevel: "medium",
|
|
238
|
-
totalValue:
|
|
238
|
+
totalValue: f.price.amount,
|
|
239
239
|
startDate: (/* @__PURE__ */ new Date()).toISOString()
|
|
240
|
-
}),
|
|
240
|
+
}), o.success("Tracking investment", `${f.title} was added to your portfolio.`);
|
|
241
241
|
} catch (e) {
|
|
242
|
-
|
|
242
|
+
o.error("Could not track investment", e.message);
|
|
243
243
|
}
|
|
244
|
-
},
|
|
244
|
+
}, zn = async (e) => {
|
|
245
|
+
try {
|
|
246
|
+
await Tt(f.id, e), o.success(e === "verified" ? "RERA registration verified" : "RERA registration rejected", f.title);
|
|
247
|
+
} catch (e) {
|
|
248
|
+
o.error("Could not update RERA status", e.message);
|
|
249
|
+
}
|
|
250
|
+
}, U = f.price.amount, W = Number(Ut) || Math.round(U * .005), G = Number(Gt) || Math.round(U * .0015), Bn = W * 12, Vn = U > 0 ? Bn / U * 100 : 0, K = Bn - G * 12, Hn = U > 0 ? K / U * 100 : 0, Un = Math.max(0, Number(qt) || 0) / 100, q = Array.from({ length: 6 }, (e, t) => ({
|
|
245
251
|
label: t === 0 ? "Now" : `Yr ${t}`,
|
|
246
|
-
value: Math.round(
|
|
247
|
-
})),
|
|
248
|
-
return /* @__PURE__ */
|
|
252
|
+
value: Math.round(U * (1 + Un) ** +t)
|
|
253
|
+
})), J = q[q.length - 1].value, Wn = J - U + K * 5, Gn = U > 0 ? Wn / U * 100 : 0, Kn = Math.max(0, Number(Xt) || 0), Y = R ? Kn / 100 * U : 0, qn = Math.min(100, Math.max(0, Number($t) || 0)), Jn = Math.max(0, Number(tn) || 0) / 100, Yn = Math.max(1, Number(rn) || 1), X = z ? qn / 100 * U : U, Z = z ? U - X : 0, Q = Jn / 12, Xn = Yn * 12, Zn = z && Z > 0 ? Q > 0 ? Z * Q * (1 + Q) ** +Xn / ((1 + Q) ** +Xn - 1) : Z / Xn : 0, Qn = Zn * 12, $ = X + Y, $n = K - Qn, er = $ > 0 ? $n / $ * 100 : 0;
|
|
254
|
+
return /* @__PURE__ */ g("div", {
|
|
249
255
|
className: "space-y-6 p-6",
|
|
250
256
|
children: [
|
|
251
|
-
/* @__PURE__ */
|
|
252
|
-
/* @__PURE__ */
|
|
257
|
+
/* @__PURE__ */ h(te, { items: Dn }),
|
|
258
|
+
/* @__PURE__ */ g("div", {
|
|
253
259
|
className: "flex flex-wrap items-center gap-3",
|
|
254
260
|
children: [
|
|
255
|
-
/* @__PURE__ */
|
|
261
|
+
/* @__PURE__ */ g("button", {
|
|
256
262
|
onClick: () => u("../properties"),
|
|
257
263
|
className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-3 py-1.5 text-sm text-text-primary transition-colors hover:bg-bg-sunken",
|
|
258
|
-
children: [/* @__PURE__ */
|
|
264
|
+
children: [/* @__PURE__ */ h(De, { className: "h-4 w-4" }), "Back"]
|
|
259
265
|
}),
|
|
260
|
-
/* @__PURE__ */
|
|
261
|
-
label:
|
|
262
|
-
variant:
|
|
266
|
+
/* @__PURE__ */ h(a, {
|
|
267
|
+
label: f.status.replace("_", " "),
|
|
268
|
+
variant: ot[f.status] ?? "default",
|
|
263
269
|
dot: !0
|
|
264
270
|
}),
|
|
265
|
-
|
|
271
|
+
f.verificationStatus === "verified" && /* @__PURE__ */ h(a, {
|
|
266
272
|
label: "Verified",
|
|
267
273
|
variant: "success",
|
|
268
274
|
dot: !0
|
|
269
275
|
}),
|
|
270
|
-
|
|
276
|
+
f.price.negotiable && /* @__PURE__ */ h(a, {
|
|
271
277
|
label: "Negotiable",
|
|
272
278
|
variant: "info"
|
|
273
279
|
}),
|
|
274
|
-
/* @__PURE__ */
|
|
280
|
+
/* @__PURE__ */ g("div", {
|
|
275
281
|
className: "ml-auto flex items-center gap-2",
|
|
276
|
-
children: [/* @__PURE__ */
|
|
282
|
+
children: [/* @__PURE__ */ g(_, {
|
|
277
283
|
type: "button",
|
|
278
284
|
variant: "outline",
|
|
279
285
|
size: "sm",
|
|
280
|
-
onClick:
|
|
281
|
-
children: [/* @__PURE__ */
|
|
282
|
-
}), /* @__PURE__ */
|
|
286
|
+
onClick: Pn,
|
|
287
|
+
children: [/* @__PURE__ */ h(Ke, { className: "mr-1.5 h-4 w-4" }), "Edit"]
|
|
288
|
+
}), /* @__PURE__ */ g(_, {
|
|
283
289
|
type: "button",
|
|
284
290
|
variant: "outline",
|
|
285
291
|
size: "sm",
|
|
286
|
-
onClick: () =>
|
|
287
|
-
children: [/* @__PURE__ */
|
|
292
|
+
onClick: () => N(!0),
|
|
293
|
+
children: [/* @__PURE__ */ h(Ye, { className: "mr-1.5 h-4 w-4" }), "Delete"]
|
|
288
294
|
})]
|
|
289
295
|
})
|
|
290
296
|
]
|
|
291
297
|
}),
|
|
292
|
-
/* @__PURE__ */
|
|
298
|
+
/* @__PURE__ */ h(at, {
|
|
293
299
|
className: "max-w-3xl",
|
|
294
300
|
children: "Everything you need to evaluate this property in one place — photos, specifications, amenities, and location. Use it to shortlist the property, schedule a viewing, or make an offer."
|
|
295
301
|
}),
|
|
296
|
-
/* @__PURE__ */
|
|
302
|
+
/* @__PURE__ */ h(it, {
|
|
297
303
|
storageKey: "housingvista-property-detail",
|
|
298
304
|
steps: [
|
|
299
305
|
{
|
|
300
306
|
id: "schedule",
|
|
301
307
|
label: "Schedule a viewing",
|
|
302
308
|
description: "Book a time to see the property in person or virtually.",
|
|
303
|
-
onClick: () =>
|
|
309
|
+
onClick: () => A(!0)
|
|
304
310
|
},
|
|
305
311
|
{
|
|
306
312
|
id: "offer",
|
|
307
313
|
label: "Make an offer",
|
|
308
314
|
description: "Submit a price and let the owner respond.",
|
|
309
|
-
onClick: () =>
|
|
315
|
+
onClick: () => j(!0)
|
|
310
316
|
},
|
|
311
317
|
{
|
|
312
318
|
id: "location",
|
|
313
319
|
label: "Explore the location",
|
|
314
320
|
description: "See the neighborhood, nearby landmarks, and map.",
|
|
315
|
-
onClick: () =>
|
|
321
|
+
onClick: () => Ot("location")
|
|
316
322
|
}
|
|
317
323
|
]
|
|
318
324
|
}),
|
|
319
|
-
/* @__PURE__ */
|
|
325
|
+
/* @__PURE__ */ g("div", {
|
|
320
326
|
className: "space-y-3",
|
|
321
|
-
children: [/* @__PURE__ */
|
|
327
|
+
children: [/* @__PURE__ */ g("div", {
|
|
322
328
|
className: "relative overflow-hidden rounded-xl border border-border-subtle bg-bg-sunken",
|
|
323
329
|
children: [
|
|
324
|
-
|
|
325
|
-
src:
|
|
326
|
-
alt:
|
|
330
|
+
f.images.length > 0 ? /* @__PURE__ */ h("img", {
|
|
331
|
+
src: f.images[D]?.url,
|
|
332
|
+
alt: f.images[D]?.title ?? f.title,
|
|
327
333
|
className: "h-80 w-full object-cover sm:h-[26rem]"
|
|
328
|
-
}) : /* @__PURE__ */
|
|
334
|
+
}) : /* @__PURE__ */ g("div", {
|
|
329
335
|
className: "flex h-80 w-full flex-col items-center justify-center gap-3 bg-gradient-to-br from-[var(--color-action-primary-bg)]/12 via-bg-sunken to-[var(--color-accent-blue)]/12 text-text-secondary/70 sm:h-[26rem]",
|
|
330
|
-
children: [/* @__PURE__ */
|
|
336
|
+
children: [/* @__PURE__ */ h(Ae, { className: "h-12 w-12" }), /* @__PURE__ */ h("span", {
|
|
331
337
|
className: "text-sm font-medium tracking-wide",
|
|
332
338
|
children: "No photos yet"
|
|
333
339
|
})]
|
|
334
340
|
}),
|
|
335
|
-
|
|
336
|
-
onClick:
|
|
341
|
+
f.images.length > 1 && /* @__PURE__ */ g(nt, { children: [/* @__PURE__ */ h("button", {
|
|
342
|
+
onClick: kn,
|
|
337
343
|
"aria-label": "Previous photo",
|
|
338
344
|
className: "absolute left-4 top-1/2 -translate-y-1/2 rounded-full bg-bg-overlay/70 p-2 text-text-inverse transition-colors hover:bg-bg-overlay",
|
|
339
|
-
children: /* @__PURE__ */
|
|
340
|
-
}), /* @__PURE__ */
|
|
341
|
-
onClick:
|
|
345
|
+
children: /* @__PURE__ */ h(Pe, { className: "h-5 w-5" })
|
|
346
|
+
}), /* @__PURE__ */ h("button", {
|
|
347
|
+
onClick: On,
|
|
342
348
|
"aria-label": "Next photo",
|
|
343
349
|
className: "absolute right-4 top-1/2 -translate-y-1/2 rounded-full bg-bg-overlay/70 p-2 text-text-inverse transition-colors hover:bg-bg-overlay",
|
|
344
|
-
children: /* @__PURE__ */
|
|
350
|
+
children: /* @__PURE__ */ h(Fe, { className: "h-5 w-5" })
|
|
345
351
|
})] }),
|
|
346
|
-
|
|
352
|
+
f.verificationStatus === "verified" && /* @__PURE__ */ g("div", {
|
|
347
353
|
className: "absolute left-4 top-4 inline-flex items-center gap-1.5 rounded-full bg-status-success-bg-subtle px-3 py-1 text-xs font-semibold text-status-success-text shadow-elevation-1 backdrop-blur-sm",
|
|
348
|
-
children: [/* @__PURE__ */
|
|
354
|
+
children: [/* @__PURE__ */ h(c, { className: "h-4 w-4" }), "Verified listing"]
|
|
349
355
|
}),
|
|
350
|
-
/* @__PURE__ */
|
|
356
|
+
/* @__PURE__ */ g("div", {
|
|
351
357
|
className: "absolute right-4 top-4 flex gap-2",
|
|
352
|
-
children: [/* @__PURE__ */
|
|
353
|
-
onClick:
|
|
354
|
-
disabled:
|
|
355
|
-
"aria-label":
|
|
358
|
+
children: [/* @__PURE__ */ h("button", {
|
|
359
|
+
onClick: jn,
|
|
360
|
+
disabled: T || ft,
|
|
361
|
+
"aria-label": E ? "Remove from shortlist" : "Save to shortlist",
|
|
356
362
|
className: "rounded-full bg-bg-surface/85 p-2 shadow-elevation-1 backdrop-blur-sm transition-colors hover:bg-bg-surface disabled:opacity-60",
|
|
357
|
-
children: /* @__PURE__ */
|
|
358
|
-
}), /* @__PURE__ */
|
|
359
|
-
onClick:
|
|
363
|
+
children: /* @__PURE__ */ h(Be, { className: e("h-5 w-5", E ? "fill-status-error-text text-status-error-text" : "text-text-secondary") })
|
|
364
|
+
}), /* @__PURE__ */ h("button", {
|
|
365
|
+
onClick: An,
|
|
360
366
|
"aria-label": "Share this listing",
|
|
361
367
|
className: "rounded-full bg-bg-surface/85 p-2 shadow-elevation-1 backdrop-blur-sm transition-colors hover:bg-bg-surface",
|
|
362
|
-
children: /* @__PURE__ */
|
|
368
|
+
children: /* @__PURE__ */ h(qe, { className: "h-5 w-5 text-text-secondary" })
|
|
363
369
|
})]
|
|
364
370
|
}),
|
|
365
|
-
|
|
371
|
+
f.images.length > 0 && /* @__PURE__ */ h("div", {
|
|
366
372
|
className: "absolute bottom-4 right-4",
|
|
367
|
-
children: /* @__PURE__ */
|
|
373
|
+
children: /* @__PURE__ */ g("span", {
|
|
368
374
|
className: "rounded-md bg-bg-overlay/70 px-2 py-1 text-xs font-medium text-text-inverse",
|
|
369
375
|
children: [
|
|
370
|
-
|
|
376
|
+
D + 1,
|
|
371
377
|
" / ",
|
|
372
|
-
|
|
378
|
+
f.images.length
|
|
373
379
|
]
|
|
374
380
|
})
|
|
375
381
|
})
|
|
376
382
|
]
|
|
377
|
-
}),
|
|
383
|
+
}), f.images.length > 1 && /* @__PURE__ */ h("div", {
|
|
378
384
|
className: "flex gap-3 overflow-x-auto pb-1",
|
|
379
|
-
children:
|
|
380
|
-
onClick: () =>
|
|
385
|
+
children: f.images.map((t, n) => /* @__PURE__ */ h("button", {
|
|
386
|
+
onClick: () => O(n),
|
|
381
387
|
"aria-label": `View photo ${n + 1}`,
|
|
382
|
-
"aria-current": n ===
|
|
383
|
-
className: e("h-16 w-24 shrink-0 overflow-hidden rounded-lg border-2 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", n ===
|
|
384
|
-
children: /* @__PURE__ */
|
|
388
|
+
"aria-current": n === D,
|
|
389
|
+
className: e("h-16 w-24 shrink-0 overflow-hidden rounded-lg border-2 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", n === D ? "border-action-primary-border" : "border-transparent opacity-70 hover:opacity-100"),
|
|
390
|
+
children: /* @__PURE__ */ h("img", {
|
|
385
391
|
src: t.url,
|
|
386
392
|
alt: t.title ?? `Photo ${n + 1}`,
|
|
387
393
|
className: "h-full w-full object-cover"
|
|
@@ -389,75 +395,75 @@ var A = {
|
|
|
389
395
|
}, t.id))
|
|
390
396
|
})]
|
|
391
397
|
}),
|
|
392
|
-
/* @__PURE__ */
|
|
398
|
+
/* @__PURE__ */ g("div", {
|
|
393
399
|
className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
|
|
394
|
-
children: [/* @__PURE__ */
|
|
400
|
+
children: [/* @__PURE__ */ g("div", {
|
|
395
401
|
className: "space-y-6 lg:col-span-2",
|
|
396
|
-
children: [/* @__PURE__ */
|
|
397
|
-
/* @__PURE__ */
|
|
402
|
+
children: [/* @__PURE__ */ g(rt, { children: [
|
|
403
|
+
/* @__PURE__ */ g("div", {
|
|
398
404
|
className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
|
|
399
|
-
children: [/* @__PURE__ */
|
|
405
|
+
children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h1", {
|
|
400
406
|
className: "text-2xl font-bold text-text-primary",
|
|
401
|
-
children:
|
|
402
|
-
}), /* @__PURE__ */
|
|
407
|
+
children: f.title
|
|
408
|
+
}), /* @__PURE__ */ g("div", {
|
|
403
409
|
className: "mt-2 flex items-center text-text-secondary",
|
|
404
|
-
children: [/* @__PURE__ */
|
|
410
|
+
children: [/* @__PURE__ */ h(He, { className: "mr-1.5 h-4 w-4 shrink-0" }), /* @__PURE__ */ h("span", {
|
|
405
411
|
className: "text-sm",
|
|
406
412
|
children: [
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
413
|
+
f.location.address,
|
|
414
|
+
f.location.neighborhood,
|
|
415
|
+
f.location.city
|
|
410
416
|
].filter(Boolean).join(", ")
|
|
411
417
|
})]
|
|
412
|
-
})] }), /* @__PURE__ */
|
|
418
|
+
})] }), /* @__PURE__ */ g("div", {
|
|
413
419
|
className: "text-right",
|
|
414
|
-
children: [/* @__PURE__ */
|
|
420
|
+
children: [/* @__PURE__ */ h("div", {
|
|
415
421
|
className: "text-2xl font-bold text-text-primary",
|
|
416
|
-
children:
|
|
417
|
-
}),
|
|
422
|
+
children: V(f.price)
|
|
423
|
+
}), f.price.pricePerSqft && /* @__PURE__ */ g("div", {
|
|
418
424
|
className: "text-sm text-text-secondary",
|
|
419
|
-
children: [n(
|
|
425
|
+
children: [n(f.price.pricePerSqft), "/sqft"]
|
|
420
426
|
})]
|
|
421
427
|
})]
|
|
422
428
|
}),
|
|
423
|
-
/* @__PURE__ */
|
|
429
|
+
/* @__PURE__ */ h("div", {
|
|
424
430
|
className: "mt-6 grid grid-cols-2 gap-3 border-t border-border-subtle pt-6 sm:grid-cols-4",
|
|
425
431
|
children: [
|
|
426
|
-
|
|
427
|
-
icon:
|
|
428
|
-
value: String(
|
|
429
|
-
label:
|
|
432
|
+
f.specifications.bedrooms != null && {
|
|
433
|
+
icon: ke,
|
|
434
|
+
value: String(f.specifications.bedrooms),
|
|
435
|
+
label: f.specifications.bedrooms === 1 ? "Bedroom" : "Bedrooms"
|
|
430
436
|
},
|
|
431
|
-
|
|
432
|
-
icon:
|
|
433
|
-
value: String(
|
|
434
|
-
label:
|
|
437
|
+
f.specifications.bathrooms != null && {
|
|
438
|
+
icon: Oe,
|
|
439
|
+
value: String(f.specifications.bathrooms),
|
|
440
|
+
label: f.specifications.bathrooms === 1 ? "Bathroom" : "Bathrooms"
|
|
435
441
|
},
|
|
436
442
|
{
|
|
437
|
-
icon:
|
|
438
|
-
value:
|
|
443
|
+
icon: Je,
|
|
444
|
+
value: i(f.specifications.totalArea),
|
|
439
445
|
label: "sq ft"
|
|
440
446
|
},
|
|
441
|
-
|
|
442
|
-
icon:
|
|
443
|
-
value: String(
|
|
447
|
+
f.specifications.parking != null && f.specifications.parking > 0 ? {
|
|
448
|
+
icon: Ne,
|
|
449
|
+
value: String(f.specifications.parking),
|
|
444
450
|
label: "Parking"
|
|
445
|
-
} :
|
|
446
|
-
icon:
|
|
447
|
-
value:
|
|
451
|
+
} : f.specifications.facing ? {
|
|
452
|
+
icon: Ie,
|
|
453
|
+
value: f.specifications.facing,
|
|
448
454
|
label: "Facing"
|
|
449
455
|
} : !1
|
|
450
456
|
].filter((e) => !!e).map((e) => {
|
|
451
457
|
let t = e.icon;
|
|
452
|
-
return /* @__PURE__ */
|
|
458
|
+
return /* @__PURE__ */ g("div", {
|
|
453
459
|
className: "flex flex-col items-center gap-1 rounded-lg border border-border-subtle bg-bg-sunken/40 p-3 text-center",
|
|
454
460
|
children: [
|
|
455
|
-
/* @__PURE__ */
|
|
456
|
-
/* @__PURE__ */
|
|
461
|
+
/* @__PURE__ */ h(t, { className: "h-5 w-5 text-text-secondary" }),
|
|
462
|
+
/* @__PURE__ */ h("span", {
|
|
457
463
|
className: "text-base font-semibold text-text-primary",
|
|
458
464
|
children: e.value
|
|
459
465
|
}),
|
|
460
|
-
/* @__PURE__ */
|
|
466
|
+
/* @__PURE__ */ h("span", {
|
|
461
467
|
className: "text-xs text-text-secondary",
|
|
462
468
|
children: e.label
|
|
463
469
|
})
|
|
@@ -465,255 +471,255 @@ var A = {
|
|
|
465
471
|
}, e.label);
|
|
466
472
|
})
|
|
467
473
|
}),
|
|
468
|
-
|
|
474
|
+
f.description && /* @__PURE__ */ g("div", {
|
|
469
475
|
className: "mt-6 border-t border-border-subtle pt-6",
|
|
470
|
-
children: [/* @__PURE__ */
|
|
476
|
+
children: [/* @__PURE__ */ h("h3", {
|
|
471
477
|
className: "mb-3 text-base font-semibold text-text-primary",
|
|
472
478
|
children: "Description"
|
|
473
|
-
}), /* @__PURE__ */
|
|
479
|
+
}), /* @__PURE__ */ h("p", {
|
|
474
480
|
className: "text-sm leading-relaxed text-text-secondary",
|
|
475
|
-
children:
|
|
481
|
+
children: f.description
|
|
476
482
|
})]
|
|
477
483
|
})
|
|
478
|
-
] }), /* @__PURE__ */
|
|
484
|
+
] }), /* @__PURE__ */ g("div", {
|
|
479
485
|
className: "rounded-lg border border-border-subtle bg-bg-surface",
|
|
480
|
-
children: [/* @__PURE__ */
|
|
486
|
+
children: [/* @__PURE__ */ h("div", {
|
|
481
487
|
className: "border-b border-border-subtle",
|
|
482
|
-
children: /* @__PURE__ */
|
|
488
|
+
children: /* @__PURE__ */ h("nav", {
|
|
483
489
|
className: "flex space-x-6 overflow-x-auto px-6",
|
|
484
|
-
children:
|
|
485
|
-
onClick: () =>
|
|
486
|
-
className: e("whitespace-nowrap border-b-2 py-3 text-sm font-medium transition-colors",
|
|
490
|
+
children: ct.map((t) => /* @__PURE__ */ h("button", {
|
|
491
|
+
onClick: () => Ot(t.id),
|
|
492
|
+
className: e("whitespace-nowrap border-b-2 py-3 text-sm font-medium transition-colors", k === t.id ? "border-action-primary-border text-text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
|
|
487
493
|
children: t.label
|
|
488
494
|
}, t.id))
|
|
489
495
|
})
|
|
490
|
-
}), /* @__PURE__ */
|
|
496
|
+
}), /* @__PURE__ */ g("div", {
|
|
491
497
|
className: "p-6",
|
|
492
498
|
children: [
|
|
493
|
-
|
|
499
|
+
k === "details" && /* @__PURE__ */ g("div", {
|
|
494
500
|
className: "grid grid-cols-1 gap-6 sm:grid-cols-2",
|
|
495
|
-
children: [/* @__PURE__ */
|
|
501
|
+
children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h4", {
|
|
496
502
|
className: "mb-3 text-sm font-semibold text-text-primary",
|
|
497
503
|
children: "Property Information"
|
|
498
|
-
}), /* @__PURE__ */
|
|
504
|
+
}), /* @__PURE__ */ g("dl", {
|
|
499
505
|
className: "space-y-2 text-sm",
|
|
500
506
|
children: [
|
|
501
|
-
/* @__PURE__ */
|
|
507
|
+
/* @__PURE__ */ g("div", {
|
|
502
508
|
className: "flex justify-between",
|
|
503
|
-
children: [/* @__PURE__ */
|
|
509
|
+
children: [/* @__PURE__ */ h("dt", {
|
|
504
510
|
className: "text-text-secondary",
|
|
505
511
|
children: "Property Type"
|
|
506
|
-
}), /* @__PURE__ */
|
|
512
|
+
}), /* @__PURE__ */ h("dd", {
|
|
507
513
|
className: "font-medium capitalize text-text-primary",
|
|
508
|
-
children:
|
|
514
|
+
children: f.type
|
|
509
515
|
})]
|
|
510
516
|
}),
|
|
511
|
-
/* @__PURE__ */
|
|
517
|
+
/* @__PURE__ */ g("div", {
|
|
512
518
|
className: "flex justify-between",
|
|
513
|
-
children: [/* @__PURE__ */
|
|
519
|
+
children: [/* @__PURE__ */ h("dt", {
|
|
514
520
|
className: "text-text-secondary",
|
|
515
521
|
children: "Category"
|
|
516
|
-
}), /* @__PURE__ */
|
|
522
|
+
}), /* @__PURE__ */ h("dd", {
|
|
517
523
|
className: "font-medium capitalize text-text-primary",
|
|
518
|
-
children:
|
|
524
|
+
children: f.category
|
|
519
525
|
})]
|
|
520
526
|
}),
|
|
521
|
-
|
|
527
|
+
f.specifications.ageOfProperty != null && /* @__PURE__ */ g("div", {
|
|
522
528
|
className: "flex justify-between",
|
|
523
|
-
children: [/* @__PURE__ */
|
|
529
|
+
children: [/* @__PURE__ */ h("dt", {
|
|
524
530
|
className: "text-text-secondary",
|
|
525
531
|
children: "Age of Property"
|
|
526
|
-
}), /* @__PURE__ */
|
|
532
|
+
}), /* @__PURE__ */ g("dd", {
|
|
527
533
|
className: "font-medium text-text-primary",
|
|
528
|
-
children: [
|
|
534
|
+
children: [f.specifications.ageOfProperty, " years"]
|
|
529
535
|
})]
|
|
530
536
|
}),
|
|
531
|
-
/* @__PURE__ */
|
|
537
|
+
/* @__PURE__ */ g("div", {
|
|
532
538
|
className: "flex justify-between",
|
|
533
|
-
children: [/* @__PURE__ */
|
|
539
|
+
children: [/* @__PURE__ */ h("dt", {
|
|
534
540
|
className: "text-text-secondary",
|
|
535
541
|
children: "Furnishing"
|
|
536
|
-
}), /* @__PURE__ */
|
|
542
|
+
}), /* @__PURE__ */ h("dd", {
|
|
537
543
|
className: "font-medium capitalize text-text-primary",
|
|
538
|
-
children:
|
|
544
|
+
children: f.specifications.furnishingStatus?.replace("_", " ")
|
|
539
545
|
})]
|
|
540
546
|
}),
|
|
541
|
-
|
|
547
|
+
f.specifications.facing && /* @__PURE__ */ g("div", {
|
|
542
548
|
className: "flex justify-between",
|
|
543
|
-
children: [/* @__PURE__ */
|
|
549
|
+
children: [/* @__PURE__ */ h("dt", {
|
|
544
550
|
className: "text-text-secondary",
|
|
545
551
|
children: "Facing"
|
|
546
|
-
}), /* @__PURE__ */
|
|
552
|
+
}), /* @__PURE__ */ h("dd", {
|
|
547
553
|
className: "font-medium text-text-primary",
|
|
548
|
-
children:
|
|
554
|
+
children: f.specifications.facing
|
|
549
555
|
})]
|
|
550
556
|
}),
|
|
551
|
-
|
|
557
|
+
f.specifications.floors != null && /* @__PURE__ */ g("div", {
|
|
552
558
|
className: "flex justify-between",
|
|
553
|
-
children: [/* @__PURE__ */
|
|
559
|
+
children: [/* @__PURE__ */ h("dt", {
|
|
554
560
|
className: "text-text-secondary",
|
|
555
561
|
children: "Floor"
|
|
556
|
-
}), /* @__PURE__ */
|
|
562
|
+
}), /* @__PURE__ */ g("dd", {
|
|
557
563
|
className: "font-medium text-text-primary",
|
|
558
564
|
children: [
|
|
559
|
-
|
|
565
|
+
f.specifications.floors,
|
|
560
566
|
" of ",
|
|
561
|
-
|
|
567
|
+
f.specifications.totalFloors
|
|
562
568
|
]
|
|
563
569
|
})]
|
|
564
570
|
})
|
|
565
571
|
]
|
|
566
|
-
})] }), /* @__PURE__ */
|
|
572
|
+
})] }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h4", {
|
|
567
573
|
className: "mb-3 text-sm font-semibold text-text-primary",
|
|
568
574
|
children: "Area Details"
|
|
569
|
-
}), /* @__PURE__ */
|
|
575
|
+
}), /* @__PURE__ */ g("dl", {
|
|
570
576
|
className: "space-y-2 text-sm",
|
|
571
577
|
children: [
|
|
572
|
-
/* @__PURE__ */
|
|
578
|
+
/* @__PURE__ */ g("div", {
|
|
573
579
|
className: "flex justify-between",
|
|
574
|
-
children: [/* @__PURE__ */
|
|
580
|
+
children: [/* @__PURE__ */ h("dt", {
|
|
575
581
|
className: "text-text-secondary",
|
|
576
582
|
children: "Total Area"
|
|
577
|
-
}), /* @__PURE__ */
|
|
583
|
+
}), /* @__PURE__ */ g("dd", {
|
|
578
584
|
className: "font-medium text-text-primary",
|
|
579
|
-
children: [
|
|
585
|
+
children: [i(f.specifications.totalArea), " sqft"]
|
|
580
586
|
})]
|
|
581
587
|
}),
|
|
582
|
-
|
|
588
|
+
f.specifications.carpetArea && /* @__PURE__ */ g("div", {
|
|
583
589
|
className: "flex justify-between",
|
|
584
|
-
children: [/* @__PURE__ */
|
|
590
|
+
children: [/* @__PURE__ */ h("dt", {
|
|
585
591
|
className: "text-text-secondary",
|
|
586
592
|
children: "Carpet Area"
|
|
587
|
-
}), /* @__PURE__ */
|
|
593
|
+
}), /* @__PURE__ */ g("dd", {
|
|
588
594
|
className: "font-medium text-text-primary",
|
|
589
|
-
children: [
|
|
595
|
+
children: [i(f.specifications.carpetArea), " sqft"]
|
|
590
596
|
})]
|
|
591
597
|
}),
|
|
592
|
-
|
|
598
|
+
f.specifications.builtUpArea && /* @__PURE__ */ g("div", {
|
|
593
599
|
className: "flex justify-between",
|
|
594
|
-
children: [/* @__PURE__ */
|
|
600
|
+
children: [/* @__PURE__ */ h("dt", {
|
|
595
601
|
className: "text-text-secondary",
|
|
596
602
|
children: "Built-up Area"
|
|
597
|
-
}), /* @__PURE__ */
|
|
603
|
+
}), /* @__PURE__ */ g("dd", {
|
|
598
604
|
className: "font-medium text-text-primary",
|
|
599
|
-
children: [
|
|
605
|
+
children: [i(f.specifications.builtUpArea), " sqft"]
|
|
600
606
|
})]
|
|
601
607
|
}),
|
|
602
|
-
|
|
608
|
+
f.price.pricePerSqft && /* @__PURE__ */ g("div", {
|
|
603
609
|
className: "flex justify-between",
|
|
604
|
-
children: [/* @__PURE__ */
|
|
610
|
+
children: [/* @__PURE__ */ h("dt", {
|
|
605
611
|
className: "text-text-secondary",
|
|
606
612
|
children: "Price per sqft"
|
|
607
|
-
}), /* @__PURE__ */
|
|
613
|
+
}), /* @__PURE__ */ h("dd", {
|
|
608
614
|
className: "font-medium text-text-primary",
|
|
609
|
-
children: n(
|
|
615
|
+
children: n(f.price.pricePerSqft)
|
|
610
616
|
})]
|
|
611
617
|
})
|
|
612
618
|
]
|
|
613
619
|
})] })]
|
|
614
620
|
}),
|
|
615
|
-
|
|
621
|
+
k === "amenities" && /* @__PURE__ */ h("div", { children: f.amenities.length > 0 ? /* @__PURE__ */ h("div", {
|
|
616
622
|
className: "grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-4",
|
|
617
|
-
children:
|
|
623
|
+
children: f.amenities.map((e) => /* @__PURE__ */ g("div", {
|
|
618
624
|
className: "flex flex-col items-center gap-2 rounded-lg border border-border-subtle bg-bg-sunken/40 p-4 text-center",
|
|
619
|
-
children: [/* @__PURE__ */
|
|
625
|
+
children: [/* @__PURE__ */ h("span", {
|
|
620
626
|
className: "flex h-10 w-10 items-center justify-center rounded-full bg-status-success-bg-subtle text-status-success-text",
|
|
621
|
-
children: /* @__PURE__ */
|
|
622
|
-
}), /* @__PURE__ */
|
|
627
|
+
children: /* @__PURE__ */ h(ut(e.name), { className: "h-5 w-5" })
|
|
628
|
+
}), /* @__PURE__ */ h("span", {
|
|
623
629
|
className: "text-sm font-medium text-text-primary",
|
|
624
630
|
children: e.name
|
|
625
631
|
})]
|
|
626
632
|
}, e.id))
|
|
627
|
-
}) : /* @__PURE__ */
|
|
633
|
+
}) : /* @__PURE__ */ h(ee, {
|
|
628
634
|
illustration: "empty-generic",
|
|
629
635
|
title: "No amenities listed",
|
|
630
636
|
description: "This property has no amenities recorded yet.",
|
|
631
637
|
className: "border-0 bg-transparent p-6"
|
|
632
638
|
}) }),
|
|
633
|
-
|
|
639
|
+
k === "location" && /* @__PURE__ */ g("div", {
|
|
634
640
|
className: "space-y-4",
|
|
635
641
|
children: [
|
|
636
|
-
/* @__PURE__ */
|
|
642
|
+
/* @__PURE__ */ g("div", {
|
|
637
643
|
className: "relative h-56 overflow-hidden rounded-xl border border-border-subtle bg-bg-sunken",
|
|
638
644
|
children: [
|
|
639
|
-
/* @__PURE__ */
|
|
645
|
+
/* @__PURE__ */ h("div", {
|
|
640
646
|
className: "absolute inset-0 opacity-60",
|
|
641
647
|
style: {
|
|
642
648
|
backgroundImage: "linear-gradient(var(--color-border-seam, rgba(120,120,120,.18)) 1px, transparent 1px), linear-gradient(90deg, var(--color-border-seam, rgba(120,120,120,.18)) 1px, transparent 1px)",
|
|
643
649
|
backgroundSize: "32px 32px"
|
|
644
650
|
}
|
|
645
651
|
}),
|
|
646
|
-
/* @__PURE__ */
|
|
652
|
+
/* @__PURE__ */ g("div", {
|
|
647
653
|
className: "absolute left-1/2 top-1/2 flex -translate-x-1/2 -translate-y-1/2 flex-col items-center gap-1 text-center",
|
|
648
654
|
children: [
|
|
649
|
-
/* @__PURE__ */
|
|
655
|
+
/* @__PURE__ */ h("span", {
|
|
650
656
|
className: "flex h-11 w-11 items-center justify-center rounded-full bg-action-primary-bg text-action-primary-text shadow-pop",
|
|
651
|
-
children: /* @__PURE__ */
|
|
657
|
+
children: /* @__PURE__ */ h(He, { className: "h-5 w-5" })
|
|
652
658
|
}),
|
|
653
|
-
/* @__PURE__ */
|
|
659
|
+
/* @__PURE__ */ h("span", {
|
|
654
660
|
className: "mt-1 rounded-md bg-bg-surface/90 px-2 py-0.5 text-sm font-semibold text-text-primary shadow-elevation-1 backdrop-blur-sm",
|
|
655
|
-
children:
|
|
661
|
+
children: f.location.neighborhood || f.location.city
|
|
656
662
|
}),
|
|
657
|
-
/* @__PURE__ */
|
|
663
|
+
/* @__PURE__ */ h("span", {
|
|
658
664
|
className: "text-xs text-text-secondary",
|
|
659
|
-
children: [
|
|
665
|
+
children: [f.location.city, f.location.state].filter(Boolean).join(", ")
|
|
660
666
|
})
|
|
661
667
|
]
|
|
662
668
|
}),
|
|
663
|
-
|
|
664
|
-
href: `https://www.google.com/maps/search/?api=1&query=${
|
|
669
|
+
f.location.coordinates?.latitude != null && f.location.coordinates?.longitude != null && /* @__PURE__ */ g("a", {
|
|
670
|
+
href: `https://www.google.com/maps/search/?api=1&query=${f.location.coordinates.latitude},${f.location.coordinates.longitude}`,
|
|
665
671
|
target: "_blank",
|
|
666
672
|
rel: "noreferrer",
|
|
667
673
|
className: "absolute bottom-3 right-3 inline-flex items-center gap-1.5 rounded-md bg-bg-surface/90 px-2.5 py-1.5 text-xs font-medium text-text-primary shadow-elevation-1 backdrop-blur-sm transition-colors hover:bg-bg-surface",
|
|
668
|
-
children: [/* @__PURE__ */
|
|
674
|
+
children: [/* @__PURE__ */ h(We, { className: "h-3.5 w-3.5" }), "Open in Maps"]
|
|
669
675
|
})
|
|
670
676
|
]
|
|
671
677
|
}),
|
|
672
|
-
|
|
678
|
+
f.location.address && /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("div", {
|
|
673
679
|
className: "mb-1 text-xs text-text-secondary",
|
|
674
680
|
children: "Full Address"
|
|
675
|
-
}), /* @__PURE__ */
|
|
681
|
+
}), /* @__PURE__ */ h("div", {
|
|
676
682
|
className: "text-sm font-medium text-text-primary",
|
|
677
|
-
children:
|
|
683
|
+
children: f.location.address
|
|
678
684
|
})] }),
|
|
679
|
-
/* @__PURE__ */
|
|
685
|
+
/* @__PURE__ */ g("div", {
|
|
680
686
|
className: "grid grid-cols-1 gap-4 text-sm sm:grid-cols-3",
|
|
681
687
|
children: [
|
|
682
|
-
/* @__PURE__ */
|
|
688
|
+
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("div", {
|
|
683
689
|
className: "mb-1 text-xs text-text-secondary",
|
|
684
690
|
children: "Neighborhood"
|
|
685
|
-
}), /* @__PURE__ */
|
|
691
|
+
}), /* @__PURE__ */ h("div", {
|
|
686
692
|
className: "font-medium text-text-primary",
|
|
687
|
-
children:
|
|
693
|
+
children: f.location.neighborhood || "—"
|
|
688
694
|
})] }),
|
|
689
|
-
/* @__PURE__ */
|
|
695
|
+
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("div", {
|
|
690
696
|
className: "mb-1 text-xs text-text-secondary",
|
|
691
697
|
children: "City, State"
|
|
692
|
-
}), /* @__PURE__ */
|
|
698
|
+
}), /* @__PURE__ */ g("div", {
|
|
693
699
|
className: "font-medium text-text-primary",
|
|
694
700
|
children: [
|
|
695
|
-
|
|
701
|
+
f.location.city,
|
|
696
702
|
", ",
|
|
697
|
-
|
|
703
|
+
f.location.state
|
|
698
704
|
]
|
|
699
705
|
})] }),
|
|
700
|
-
/* @__PURE__ */
|
|
706
|
+
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("div", {
|
|
701
707
|
className: "mb-1 text-xs text-text-secondary",
|
|
702
708
|
children: "PIN / ZIP"
|
|
703
|
-
}), /* @__PURE__ */
|
|
709
|
+
}), /* @__PURE__ */ h("div", {
|
|
704
710
|
className: "font-medium text-text-primary",
|
|
705
|
-
children:
|
|
711
|
+
children: f.location.pincode || "—"
|
|
706
712
|
})] })
|
|
707
713
|
]
|
|
708
714
|
}),
|
|
709
|
-
|
|
715
|
+
f.location.landmarks.length > 0 && /* @__PURE__ */ g("div", {
|
|
710
716
|
className: "border-t border-border-subtle pt-4",
|
|
711
|
-
children: [/* @__PURE__ */
|
|
717
|
+
children: [/* @__PURE__ */ h("h4", {
|
|
712
718
|
className: "mb-2 text-xs font-medium text-text-secondary",
|
|
713
719
|
children: "Nearby Landmarks"
|
|
714
|
-
}), /* @__PURE__ */
|
|
720
|
+
}), /* @__PURE__ */ h("div", {
|
|
715
721
|
className: "flex flex-wrap gap-2",
|
|
716
|
-
children:
|
|
722
|
+
children: f.location.landmarks.map((e) => /* @__PURE__ */ h("span", {
|
|
717
723
|
className: "rounded-full bg-bg-sunken px-3 py-1 text-xs text-text-primary",
|
|
718
724
|
children: e
|
|
719
725
|
}, e))
|
|
@@ -724,195 +730,298 @@ var A = {
|
|
|
724
730
|
]
|
|
725
731
|
})]
|
|
726
732
|
})]
|
|
727
|
-
}), /* @__PURE__ */
|
|
733
|
+
}), /* @__PURE__ */ g("div", {
|
|
728
734
|
className: "space-y-6",
|
|
729
735
|
children: [
|
|
730
|
-
/* @__PURE__ */
|
|
736
|
+
/* @__PURE__ */ g("div", {
|
|
731
737
|
id: "property-actions",
|
|
732
738
|
className: "scroll-mt-6 rounded-lg border border-border-subtle bg-bg-surface p-5 shadow-elevation-1 lg:sticky lg:top-6",
|
|
733
739
|
children: [
|
|
734
|
-
/* @__PURE__ */
|
|
740
|
+
/* @__PURE__ */ g("div", {
|
|
735
741
|
className: "flex flex-wrap items-baseline gap-x-2 gap-y-1",
|
|
736
|
-
children: [/* @__PURE__ */
|
|
742
|
+
children: [/* @__PURE__ */ h("span", {
|
|
737
743
|
className: "text-3xl font-bold text-text-primary",
|
|
738
|
-
children:
|
|
739
|
-
}),
|
|
744
|
+
children: V(f.price)
|
|
745
|
+
}), f.price.negotiable && /* @__PURE__ */ h("span", {
|
|
740
746
|
className: "text-sm text-text-secondary",
|
|
741
747
|
children: "· Negotiable"
|
|
742
748
|
})]
|
|
743
749
|
}),
|
|
744
|
-
|
|
750
|
+
f.price.pricePerSqft && /* @__PURE__ */ g("p", {
|
|
745
751
|
className: "mt-1 text-sm text-text-secondary",
|
|
746
|
-
children: [n(
|
|
752
|
+
children: [n(f.price.pricePerSqft, f.price.currency), "/sqft"]
|
|
747
753
|
}),
|
|
748
|
-
/* @__PURE__ */
|
|
754
|
+
/* @__PURE__ */ g("div", {
|
|
749
755
|
className: "mt-4 space-y-2",
|
|
750
756
|
children: [
|
|
751
|
-
/* @__PURE__ */
|
|
757
|
+
/* @__PURE__ */ g(_, {
|
|
752
758
|
type: "button",
|
|
753
759
|
className: "w-full justify-center",
|
|
754
|
-
onClick: () =>
|
|
755
|
-
children: [/* @__PURE__ */
|
|
760
|
+
onClick: () => j(!0),
|
|
761
|
+
children: [/* @__PURE__ */ h(Le, { className: "mr-2 h-4 w-4" }), "Make Offer"]
|
|
756
762
|
}),
|
|
757
|
-
|
|
763
|
+
f.status === "for_rent" && /* @__PURE__ */ g(nt, { children: [/* @__PURE__ */ g(_, {
|
|
758
764
|
type: "button",
|
|
759
765
|
className: "w-full justify-center",
|
|
760
|
-
onClick: () =>
|
|
761
|
-
disabled: !
|
|
762
|
-
children: [/* @__PURE__ */
|
|
763
|
-
}), !
|
|
766
|
+
onClick: () => P(!0),
|
|
767
|
+
disabled: !H,
|
|
768
|
+
children: [/* @__PURE__ */ h(Ve, { className: "mr-2 h-4 w-4" }), "Apply to Rent"]
|
|
769
|
+
}), !H && /* @__PURE__ */ h("p", {
|
|
764
770
|
className: "px-1 text-xs text-text-secondary",
|
|
765
771
|
children: "No rental unit is listed for this property yet — applications open once a unit is added."
|
|
766
772
|
})] }),
|
|
767
|
-
/* @__PURE__ */
|
|
773
|
+
/* @__PURE__ */ g("div", {
|
|
768
774
|
className: "grid grid-cols-2 gap-2",
|
|
769
|
-
children: [/* @__PURE__ */
|
|
775
|
+
children: [/* @__PURE__ */ g(_, {
|
|
770
776
|
type: "button",
|
|
771
777
|
variant: "outline",
|
|
772
778
|
className: "w-full justify-center",
|
|
773
|
-
onClick: () =>
|
|
774
|
-
children: [/* @__PURE__ */
|
|
775
|
-
}), /* @__PURE__ */
|
|
779
|
+
onClick: () => A(!0),
|
|
780
|
+
children: [/* @__PURE__ */ h(Me, { className: "mr-2 h-4 w-4" }), "Viewing"]
|
|
781
|
+
}), /* @__PURE__ */ g(_, {
|
|
776
782
|
type: "button",
|
|
777
783
|
variant: "outline",
|
|
778
784
|
className: "w-full justify-center",
|
|
779
|
-
onClick: () =>
|
|
780
|
-
children: [/* @__PURE__ */
|
|
785
|
+
onClick: () => Ft(!0),
|
|
786
|
+
children: [/* @__PURE__ */ h(Ue, { className: "mr-2 h-4 w-4" }), "Contact"]
|
|
781
787
|
})]
|
|
782
788
|
}),
|
|
783
|
-
/* @__PURE__ */
|
|
789
|
+
/* @__PURE__ */ g(_, {
|
|
784
790
|
type: "button",
|
|
785
791
|
variant: "outline",
|
|
786
792
|
className: "w-full justify-center",
|
|
787
|
-
onClick:
|
|
788
|
-
disabled:
|
|
789
|
-
children: [/* @__PURE__ */
|
|
793
|
+
onClick: jn,
|
|
794
|
+
disabled: T || ft,
|
|
795
|
+
children: [/* @__PURE__ */ h(Be, { className: e("mr-2 h-4 w-4", E && "fill-status-error-text text-status-error-text") }), E ? "Saved to Shortlist" : "Save to Shortlist"]
|
|
790
796
|
})
|
|
791
797
|
]
|
|
792
798
|
}),
|
|
793
|
-
|
|
799
|
+
f.verificationStatus === "verified" && /* @__PURE__ */ g("div", {
|
|
794
800
|
className: "mt-4 flex items-center gap-2 border-t border-border-subtle pt-4 text-sm font-medium text-status-success-text",
|
|
795
|
-
children: [/* @__PURE__ */
|
|
801
|
+
children: [/* @__PURE__ */ h(c, { className: "h-4 w-4" }), "Verified listing"]
|
|
796
802
|
})
|
|
797
803
|
]
|
|
798
804
|
}),
|
|
799
|
-
/* @__PURE__ */
|
|
805
|
+
/* @__PURE__ */ g("div", {
|
|
800
806
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
|
|
801
807
|
children: [
|
|
802
|
-
/* @__PURE__ */
|
|
808
|
+
/* @__PURE__ */ g("div", {
|
|
803
809
|
className: "mb-4 flex items-center gap-2",
|
|
804
|
-
children: [/* @__PURE__ */
|
|
810
|
+
children: [/* @__PURE__ */ h(je, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ h("h3", {
|
|
805
811
|
className: "text-base font-semibold text-text-primary",
|
|
806
812
|
children: "Investment Analysis"
|
|
807
813
|
})]
|
|
808
814
|
}),
|
|
809
|
-
/* @__PURE__ */
|
|
815
|
+
/* @__PURE__ */ g("div", {
|
|
810
816
|
className: "space-y-3",
|
|
811
817
|
children: [
|
|
812
|
-
/* @__PURE__ */
|
|
818
|
+
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("label", {
|
|
813
819
|
className: "mb-1.5 block text-xs font-medium text-text-secondary",
|
|
814
820
|
children: [
|
|
815
821
|
"Expected monthly rent (",
|
|
816
|
-
|
|
822
|
+
f.price.currency,
|
|
817
823
|
")"
|
|
818
824
|
]
|
|
819
|
-
}), /* @__PURE__ */
|
|
825
|
+
}), /* @__PURE__ */ h("input", {
|
|
820
826
|
type: "number",
|
|
821
827
|
min: 0,
|
|
822
|
-
value:
|
|
823
|
-
onChange: (e) =>
|
|
824
|
-
placeholder: String(
|
|
825
|
-
className:
|
|
828
|
+
value: Ut,
|
|
829
|
+
onChange: (e) => Wt(e.target.value),
|
|
830
|
+
placeholder: String(W),
|
|
831
|
+
className: w
|
|
826
832
|
})] }),
|
|
827
|
-
/* @__PURE__ */
|
|
833
|
+
/* @__PURE__ */ g("div", {
|
|
828
834
|
className: "grid grid-cols-2 gap-3",
|
|
829
|
-
children: [/* @__PURE__ */
|
|
835
|
+
children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("label", {
|
|
830
836
|
className: "mb-1.5 block text-xs font-medium text-text-secondary",
|
|
831
837
|
children: [
|
|
832
838
|
"Monthly costs (",
|
|
833
|
-
|
|
839
|
+
f.price.currency,
|
|
834
840
|
")"
|
|
835
841
|
]
|
|
836
|
-
}), /* @__PURE__ */
|
|
842
|
+
}), /* @__PURE__ */ h("input", {
|
|
837
843
|
type: "number",
|
|
838
844
|
min: 0,
|
|
839
|
-
value:
|
|
840
|
-
onChange: (e) =>
|
|
841
|
-
placeholder: String(
|
|
842
|
-
className:
|
|
843
|
-
})] }), /* @__PURE__ */
|
|
845
|
+
value: Gt,
|
|
846
|
+
onChange: (e) => Kt(e.target.value),
|
|
847
|
+
placeholder: String(G),
|
|
848
|
+
className: w
|
|
849
|
+
})] }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
844
850
|
className: "mb-1.5 block text-xs font-medium text-text-secondary",
|
|
845
851
|
children: "Appreciation (%/yr)"
|
|
846
|
-
}), /* @__PURE__ */
|
|
852
|
+
}), /* @__PURE__ */ h("input", {
|
|
847
853
|
type: "number",
|
|
848
854
|
min: 0,
|
|
849
855
|
step: .5,
|
|
850
|
-
value:
|
|
851
|
-
onChange: (e) =>
|
|
852
|
-
className:
|
|
856
|
+
value: qt,
|
|
857
|
+
onChange: (e) => Jt(e.target.value),
|
|
858
|
+
className: w
|
|
853
859
|
})] })]
|
|
854
860
|
}),
|
|
855
|
-
/* @__PURE__ */
|
|
861
|
+
/* @__PURE__ */ h("p", {
|
|
856
862
|
className: "text-[11px] text-text-secondary",
|
|
857
863
|
children: "Costs cover maintenance, tax, insurance, and management."
|
|
858
864
|
})
|
|
859
865
|
]
|
|
860
866
|
}),
|
|
861
|
-
/* @__PURE__ */
|
|
867
|
+
/* @__PURE__ */ g("div", {
|
|
868
|
+
className: "mt-4 space-y-3 border-t border-border-subtle pt-4",
|
|
869
|
+
children: [
|
|
870
|
+
/* @__PURE__ */ g("div", {
|
|
871
|
+
className: "flex items-center justify-between gap-3",
|
|
872
|
+
children: [/* @__PURE__ */ g("label", {
|
|
873
|
+
className: "flex items-center gap-2 text-xs font-medium text-text-secondary",
|
|
874
|
+
children: [/* @__PURE__ */ h("input", {
|
|
875
|
+
type: "checkbox",
|
|
876
|
+
checked: R,
|
|
877
|
+
onChange: (e) => Yt(e.target.checked),
|
|
878
|
+
className: "h-3.5 w-3.5 rounded border-border-subtle"
|
|
879
|
+
}), "Include stamp duty & registration"]
|
|
880
|
+
}), R && /* @__PURE__ */ h("input", {
|
|
881
|
+
type: "number",
|
|
882
|
+
min: 0,
|
|
883
|
+
step: .5,
|
|
884
|
+
value: Xt,
|
|
885
|
+
onChange: (e) => Zt(e.target.value),
|
|
886
|
+
"aria-label": "Stamp duty rate percent",
|
|
887
|
+
className: "h-7 w-16 rounded-md border border-border-subtle bg-bg-surface px-2 text-right text-xs text-text-primary"
|
|
888
|
+
})]
|
|
889
|
+
}),
|
|
890
|
+
/* @__PURE__ */ h("div", {
|
|
891
|
+
className: "flex items-center justify-between gap-3",
|
|
892
|
+
children: /* @__PURE__ */ g("label", {
|
|
893
|
+
className: "flex items-center gap-2 text-xs font-medium text-text-secondary",
|
|
894
|
+
children: [/* @__PURE__ */ h("input", {
|
|
895
|
+
type: "checkbox",
|
|
896
|
+
checked: z,
|
|
897
|
+
onChange: (e) => Qt(e.target.checked),
|
|
898
|
+
className: "h-3.5 w-3.5 rounded border-border-subtle"
|
|
899
|
+
}), "Include financing (loan)"]
|
|
900
|
+
})
|
|
901
|
+
}),
|
|
902
|
+
z && /* @__PURE__ */ g("div", {
|
|
903
|
+
className: "grid grid-cols-3 gap-2",
|
|
904
|
+
children: [
|
|
905
|
+
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
906
|
+
className: "mb-1 block text-[10px] text-text-secondary",
|
|
907
|
+
children: "Down payment %"
|
|
908
|
+
}), /* @__PURE__ */ h("input", {
|
|
909
|
+
type: "number",
|
|
910
|
+
min: 0,
|
|
911
|
+
max: 100,
|
|
912
|
+
value: $t,
|
|
913
|
+
onChange: (e) => en(e.target.value),
|
|
914
|
+
className: w
|
|
915
|
+
})] }),
|
|
916
|
+
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
917
|
+
className: "mb-1 block text-[10px] text-text-secondary",
|
|
918
|
+
children: "Loan rate %"
|
|
919
|
+
}), /* @__PURE__ */ h("input", {
|
|
920
|
+
type: "number",
|
|
921
|
+
min: 0,
|
|
922
|
+
step: .1,
|
|
923
|
+
value: tn,
|
|
924
|
+
onChange: (e) => nn(e.target.value),
|
|
925
|
+
className: w
|
|
926
|
+
})] }),
|
|
927
|
+
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
928
|
+
className: "mb-1 block text-[10px] text-text-secondary",
|
|
929
|
+
children: "Tenure (yrs)"
|
|
930
|
+
}), /* @__PURE__ */ h("input", {
|
|
931
|
+
type: "number",
|
|
932
|
+
min: 1,
|
|
933
|
+
value: rn,
|
|
934
|
+
onChange: (e) => an(e.target.value),
|
|
935
|
+
className: w
|
|
936
|
+
})] })
|
|
937
|
+
]
|
|
938
|
+
}),
|
|
939
|
+
(R || z) && /* @__PURE__ */ g("div", {
|
|
940
|
+
className: "flex flex-wrap items-center gap-x-4 gap-y-1 text-[11px] text-text-secondary",
|
|
941
|
+
children: [
|
|
942
|
+
R && /* @__PURE__ */ g("span", { children: [
|
|
943
|
+
"Stamp duty:",
|
|
944
|
+
" ",
|
|
945
|
+
/* @__PURE__ */ h("span", {
|
|
946
|
+
className: "font-semibold text-text-primary",
|
|
947
|
+
children: t(Y, f.price.currency)
|
|
948
|
+
})
|
|
949
|
+
] }),
|
|
950
|
+
z && /* @__PURE__ */ g("span", { children: [
|
|
951
|
+
"Monthly EMI:",
|
|
952
|
+
" ",
|
|
953
|
+
/* @__PURE__ */ h("span", {
|
|
954
|
+
className: "font-semibold text-text-primary",
|
|
955
|
+
children: t(Zn, f.price.currency)
|
|
956
|
+
})
|
|
957
|
+
] }),
|
|
958
|
+
/* @__PURE__ */ g("span", { children: [
|
|
959
|
+
"Net cash outlay:",
|
|
960
|
+
" ",
|
|
961
|
+
/* @__PURE__ */ h("span", {
|
|
962
|
+
className: "font-semibold text-text-primary",
|
|
963
|
+
children: t($, f.price.currency)
|
|
964
|
+
})
|
|
965
|
+
] })
|
|
966
|
+
]
|
|
967
|
+
})
|
|
968
|
+
]
|
|
969
|
+
}),
|
|
970
|
+
/* @__PURE__ */ g("div", {
|
|
862
971
|
className: "mt-4 grid grid-cols-3 gap-2 border-t border-border-subtle pt-4",
|
|
863
972
|
children: [
|
|
864
|
-
/* @__PURE__ */
|
|
973
|
+
/* @__PURE__ */ g("div", {
|
|
865
974
|
className: "rounded-lg border border-status-success-border bg-status-success-bg-subtle p-2.5 text-center",
|
|
866
|
-
children: [/* @__PURE__ */
|
|
975
|
+
children: [/* @__PURE__ */ h("div", {
|
|
867
976
|
className: "text-[11px] font-medium text-status-success-text",
|
|
868
977
|
children: "Gross Yield"
|
|
869
|
-
}), /* @__PURE__ */
|
|
978
|
+
}), /* @__PURE__ */ g("div", {
|
|
870
979
|
className: "mt-0.5 text-lg font-bold text-status-success-text",
|
|
871
|
-
children: [
|
|
980
|
+
children: [Vn.toFixed(1), "%"]
|
|
872
981
|
})]
|
|
873
982
|
}),
|
|
874
|
-
/* @__PURE__ */
|
|
983
|
+
/* @__PURE__ */ g("div", {
|
|
875
984
|
className: "rounded-lg border border-border-subtle bg-bg-sunken/40 p-2.5 text-center",
|
|
876
|
-
children: [/* @__PURE__ */
|
|
985
|
+
children: [/* @__PURE__ */ h("div", {
|
|
877
986
|
className: "text-[11px] font-medium text-text-secondary",
|
|
878
987
|
children: "Net Yield"
|
|
879
|
-
}), /* @__PURE__ */
|
|
988
|
+
}), /* @__PURE__ */ g("div", {
|
|
880
989
|
className: "mt-0.5 text-lg font-bold text-text-primary",
|
|
881
|
-
children: [
|
|
990
|
+
children: [Hn.toFixed(1), "%"]
|
|
882
991
|
})]
|
|
883
992
|
}),
|
|
884
|
-
/* @__PURE__ */
|
|
993
|
+
/* @__PURE__ */ g("div", {
|
|
885
994
|
className: "rounded-lg border border-border-subtle bg-bg-sunken/40 p-2.5 text-center",
|
|
886
|
-
children: [/* @__PURE__ */
|
|
995
|
+
children: [/* @__PURE__ */ h("div", {
|
|
887
996
|
className: "text-[11px] font-medium text-text-secondary",
|
|
888
|
-
children: "5-yr ROI"
|
|
889
|
-
}), /* @__PURE__ */
|
|
997
|
+
children: z ? "Cash-on-Cash" : "5-yr ROI"
|
|
998
|
+
}), /* @__PURE__ */ g("div", {
|
|
890
999
|
className: "mt-0.5 text-lg font-bold text-text-primary",
|
|
891
|
-
children: [
|
|
1000
|
+
children: [z ? er.toFixed(1) : Gn.toFixed(0), "%"]
|
|
892
1001
|
})]
|
|
893
1002
|
})
|
|
894
1003
|
]
|
|
895
1004
|
}),
|
|
896
|
-
/* @__PURE__ */
|
|
1005
|
+
/* @__PURE__ */ g("div", {
|
|
897
1006
|
className: "mt-4",
|
|
898
1007
|
children: [
|
|
899
|
-
/* @__PURE__ */
|
|
1008
|
+
/* @__PURE__ */ g("div", {
|
|
900
1009
|
className: "mb-1 flex items-center justify-between",
|
|
901
|
-
children: [/* @__PURE__ */
|
|
1010
|
+
children: [/* @__PURE__ */ h("span", {
|
|
902
1011
|
className: "text-xs font-medium text-text-secondary",
|
|
903
1012
|
children: "Projected Value Growth"
|
|
904
|
-
}), /* @__PURE__ */
|
|
1013
|
+
}), /* @__PURE__ */ h("span", {
|
|
905
1014
|
className: "text-xs font-semibold text-text-primary",
|
|
906
|
-
children: t(
|
|
1015
|
+
children: t(J, f.price.currency)
|
|
907
1016
|
})]
|
|
908
1017
|
}),
|
|
909
|
-
/* @__PURE__ */
|
|
1018
|
+
/* @__PURE__ */ h("div", {
|
|
910
1019
|
className: "h-32",
|
|
911
|
-
children: /* @__PURE__ */
|
|
1020
|
+
children: /* @__PURE__ */ h(xe, {
|
|
912
1021
|
width: "100%",
|
|
913
1022
|
height: "100%",
|
|
914
|
-
children: /* @__PURE__ */
|
|
915
|
-
data:
|
|
1023
|
+
children: /* @__PURE__ */ g(Te, {
|
|
1024
|
+
data: q,
|
|
916
1025
|
margin: {
|
|
917
1026
|
top: 4,
|
|
918
1027
|
right: 4,
|
|
@@ -920,37 +1029,37 @@ var A = {
|
|
|
920
1029
|
left: 0
|
|
921
1030
|
},
|
|
922
1031
|
children: [
|
|
923
|
-
/* @__PURE__ */
|
|
1032
|
+
/* @__PURE__ */ h("defs", { children: /* @__PURE__ */ g("linearGradient", {
|
|
924
1033
|
id: "hvValueGrad",
|
|
925
1034
|
x1: "0",
|
|
926
1035
|
y1: "0",
|
|
927
1036
|
x2: "0",
|
|
928
1037
|
y2: "1",
|
|
929
|
-
children: [/* @__PURE__ */
|
|
1038
|
+
children: [/* @__PURE__ */ h("stop", {
|
|
930
1039
|
offset: "5%",
|
|
931
1040
|
stopColor: "var(--color-chart-2)",
|
|
932
1041
|
stopOpacity: .35
|
|
933
|
-
}), /* @__PURE__ */
|
|
1042
|
+
}), /* @__PURE__ */ h("stop", {
|
|
934
1043
|
offset: "95%",
|
|
935
1044
|
stopColor: "var(--color-chart-2)",
|
|
936
1045
|
stopOpacity: 0
|
|
937
1046
|
})]
|
|
938
1047
|
}) }),
|
|
939
|
-
/* @__PURE__ */
|
|
1048
|
+
/* @__PURE__ */ h(Ce, {
|
|
940
1049
|
dataKey: "label",
|
|
941
1050
|
tick: { fontSize: 10 },
|
|
942
1051
|
axisLine: !1,
|
|
943
1052
|
tickLine: !1
|
|
944
1053
|
}),
|
|
945
|
-
/* @__PURE__ */
|
|
1054
|
+
/* @__PURE__ */ h(we, {
|
|
946
1055
|
hide: !0,
|
|
947
1056
|
domain: ["dataMin", "dataMax"]
|
|
948
1057
|
}),
|
|
949
|
-
/* @__PURE__ */
|
|
950
|
-
formatter: (e) => [t(e,
|
|
1058
|
+
/* @__PURE__ */ h(be, {
|
|
1059
|
+
formatter: (e) => [t(e, f.price.currency), "Value"],
|
|
951
1060
|
labelClassName: "text-text-primary"
|
|
952
1061
|
}),
|
|
953
|
-
/* @__PURE__ */
|
|
1062
|
+
/* @__PURE__ */ h(Se, {
|
|
954
1063
|
type: "monotone",
|
|
955
1064
|
dataKey: "value",
|
|
956
1065
|
stroke: "var(--color-chart-2)",
|
|
@@ -961,89 +1070,173 @@ var A = {
|
|
|
961
1070
|
})
|
|
962
1071
|
})
|
|
963
1072
|
}),
|
|
964
|
-
/* @__PURE__ */
|
|
1073
|
+
/* @__PURE__ */ h("p", {
|
|
965
1074
|
className: "mt-1 text-[11px] text-text-secondary",
|
|
966
1075
|
children: "Projection based on your inputs and market appreciation. Consult a financial advisor before investing."
|
|
967
1076
|
})
|
|
968
1077
|
]
|
|
969
1078
|
}),
|
|
970
|
-
/* @__PURE__ */
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
1079
|
+
/* @__PURE__ */ g("div", {
|
|
1080
|
+
className: "mt-4 flex gap-2",
|
|
1081
|
+
children: [/* @__PURE__ */ g(_, {
|
|
1082
|
+
type: "button",
|
|
1083
|
+
variant: "outline",
|
|
1084
|
+
className: "flex-1 justify-center",
|
|
1085
|
+
onClick: Rn,
|
|
1086
|
+
disabled: wt,
|
|
1087
|
+
children: [/* @__PURE__ */ h(Xe, { className: "mr-2 h-4 w-4" }), wt ? "Adding…" : "Track as Investment"]
|
|
1088
|
+
}), /* @__PURE__ */ h(_, {
|
|
1089
|
+
type: "button",
|
|
1090
|
+
variant: "ghost",
|
|
1091
|
+
className: "justify-center",
|
|
1092
|
+
onClick: () => {
|
|
1093
|
+
let e = [
|
|
1094
|
+
`Investment Analysis Report — ${f.title}`,
|
|
1095
|
+
`Generated: ${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}`,
|
|
1096
|
+
"",
|
|
1097
|
+
`Listing price,${U}`,
|
|
1098
|
+
`Expected monthly rent,${W}`,
|
|
1099
|
+
`Monthly holding costs,${G}`,
|
|
1100
|
+
`Gross rental yield,${Vn.toFixed(2)}%`,
|
|
1101
|
+
`Net rental yield,${Hn.toFixed(2)}%`,
|
|
1102
|
+
`Appreciation rate (input),${(Un * 100).toFixed(2)}%`,
|
|
1103
|
+
`Projected value (5yr),${J}`,
|
|
1104
|
+
`Projected ROI (5yr, unleveraged),${Gn.toFixed(2)}%`,
|
|
1105
|
+
"",
|
|
1106
|
+
`Stamp duty & registration included,${R ? "Yes" : "No"}`,
|
|
1107
|
+
`Stamp duty rate,${Kn}%`,
|
|
1108
|
+
`Stamp duty & registration cost,${Y.toFixed(0)}`,
|
|
1109
|
+
"",
|
|
1110
|
+
`Financing included,${z ? "Yes" : "No"}`,
|
|
1111
|
+
...z ? [
|
|
1112
|
+
`Down payment (${qn}%),${X.toFixed(0)}`,
|
|
1113
|
+
`Loan amount,${Z.toFixed(0)}`,
|
|
1114
|
+
`Loan rate,${(Jn * 100).toFixed(2)}%`,
|
|
1115
|
+
`Loan tenure (years),${Yn}`,
|
|
1116
|
+
`Monthly EMI,${Zn.toFixed(0)}`,
|
|
1117
|
+
`Annual debt service,${Qn.toFixed(0)}`
|
|
1118
|
+
] : [],
|
|
1119
|
+
`Net cash outlay,${$.toFixed(0)}`,
|
|
1120
|
+
`Cash-on-cash return,${er.toFixed(2)}%`,
|
|
1121
|
+
"",
|
|
1122
|
+
"This is not financial advice. Consult a licensed financial advisor before investing."
|
|
1123
|
+
], t = new Blob([e.join("\n")], { type: "text/csv;charset=utf-8;" }), n = URL.createObjectURL(t), r = document.createElement("a");
|
|
1124
|
+
r.href = n, r.download = `${f.id}-investment-analysis.csv`, r.click(), URL.revokeObjectURL(n);
|
|
1125
|
+
},
|
|
1126
|
+
"aria-label": "Download investment analysis report",
|
|
1127
|
+
children: /* @__PURE__ */ h(Re, { className: "h-4 w-4" })
|
|
1128
|
+
})]
|
|
977
1129
|
})
|
|
978
1130
|
]
|
|
979
1131
|
}),
|
|
980
|
-
/* @__PURE__ */
|
|
1132
|
+
/* @__PURE__ */ g("div", {
|
|
981
1133
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
|
|
982
|
-
children: [
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
className: "
|
|
992
|
-
children: "
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
className: "
|
|
1002
|
-
children: "
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
className: "
|
|
1012
|
-
children: "
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1134
|
+
children: [
|
|
1135
|
+
/* @__PURE__ */ h("h3", {
|
|
1136
|
+
className: "mb-4 text-base font-semibold text-text-primary",
|
|
1137
|
+
children: "At a Glance"
|
|
1138
|
+
}),
|
|
1139
|
+
/* @__PURE__ */ g("div", {
|
|
1140
|
+
className: "space-y-3 text-sm",
|
|
1141
|
+
children: [
|
|
1142
|
+
/* @__PURE__ */ g("div", {
|
|
1143
|
+
className: "flex items-center justify-between",
|
|
1144
|
+
children: [/* @__PURE__ */ h("span", {
|
|
1145
|
+
className: "text-text-secondary",
|
|
1146
|
+
children: "Status"
|
|
1147
|
+
}), /* @__PURE__ */ h(a, {
|
|
1148
|
+
label: f.status.replace("_", " "),
|
|
1149
|
+
variant: ot[f.status] ?? "default"
|
|
1150
|
+
})]
|
|
1151
|
+
}),
|
|
1152
|
+
/* @__PURE__ */ g("div", {
|
|
1153
|
+
className: "flex items-center justify-between",
|
|
1154
|
+
children: [/* @__PURE__ */ h("span", {
|
|
1155
|
+
className: "text-text-secondary",
|
|
1156
|
+
children: "Verification"
|
|
1157
|
+
}), /* @__PURE__ */ h("span", {
|
|
1158
|
+
className: "font-medium capitalize text-text-primary",
|
|
1159
|
+
children: f.verificationStatus
|
|
1160
|
+
})]
|
|
1161
|
+
}),
|
|
1162
|
+
f.reraVerificationStatus !== "not_applicable" && /* @__PURE__ */ g("div", {
|
|
1163
|
+
className: "flex items-center justify-between",
|
|
1164
|
+
children: [/* @__PURE__ */ h("span", {
|
|
1165
|
+
className: "text-text-secondary",
|
|
1166
|
+
children: "RERA status"
|
|
1167
|
+
}), /* @__PURE__ */ g("span", {
|
|
1168
|
+
className: "flex items-center gap-1.5 font-medium capitalize text-text-primary",
|
|
1169
|
+
children: [f.reraVerificationStatus === "verified" && /* @__PURE__ */ h(c, { className: "h-4 w-4 text-status-success-text" }), f.reraVerificationStatus.replace("_", " ")]
|
|
1170
|
+
})]
|
|
1171
|
+
}),
|
|
1172
|
+
f.reraRegistrationNo && /* @__PURE__ */ g("div", {
|
|
1173
|
+
className: "flex items-center justify-between",
|
|
1174
|
+
children: [/* @__PURE__ */ h("span", {
|
|
1175
|
+
className: "text-text-secondary",
|
|
1176
|
+
children: "RERA reg. no."
|
|
1177
|
+
}), /* @__PURE__ */ h("span", {
|
|
1178
|
+
className: "font-medium text-text-primary",
|
|
1179
|
+
children: f.reraRegistrationNo
|
|
1180
|
+
})]
|
|
1181
|
+
}),
|
|
1182
|
+
/* @__PURE__ */ g("div", {
|
|
1183
|
+
className: "flex items-center justify-between",
|
|
1184
|
+
children: [/* @__PURE__ */ h("span", {
|
|
1185
|
+
className: "text-text-secondary",
|
|
1186
|
+
children: "Listed"
|
|
1187
|
+
}), /* @__PURE__ */ h("span", {
|
|
1188
|
+
className: "font-medium text-text-primary",
|
|
1189
|
+
children: r(String(f.createdAt))
|
|
1190
|
+
})]
|
|
1191
|
+
})
|
|
1192
|
+
]
|
|
1193
|
+
}),
|
|
1194
|
+
f.reraVerificationStatus === "pending" && /* @__PURE__ */ g("div", {
|
|
1195
|
+
className: "mt-4 flex gap-2 border-t border-border-subtle pt-4",
|
|
1196
|
+
children: [/* @__PURE__ */ h(_, {
|
|
1197
|
+
type: "button",
|
|
1198
|
+
variant: "outline",
|
|
1199
|
+
className: "flex-1 justify-center",
|
|
1200
|
+
disabled: Et,
|
|
1201
|
+
onClick: () => zn("verified"),
|
|
1202
|
+
children: "Verify RERA"
|
|
1203
|
+
}), /* @__PURE__ */ h(_, {
|
|
1204
|
+
type: "button",
|
|
1205
|
+
variant: "ghost",
|
|
1206
|
+
className: "flex-1 justify-center",
|
|
1207
|
+
disabled: Et,
|
|
1208
|
+
onClick: () => zn("rejected"),
|
|
1209
|
+
children: "Reject"
|
|
1210
|
+
})]
|
|
1211
|
+
})
|
|
1212
|
+
]
|
|
1020
1213
|
}),
|
|
1021
|
-
|
|
1214
|
+
Dt.length > 0 && /* @__PURE__ */ g("div", {
|
|
1022
1215
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
|
|
1023
|
-
children: [/* @__PURE__ */
|
|
1216
|
+
children: [/* @__PURE__ */ h("h3", {
|
|
1024
1217
|
className: "mb-4 text-base font-semibold text-text-primary",
|
|
1025
1218
|
children: "Similar Properties"
|
|
1026
|
-
}), /* @__PURE__ */
|
|
1219
|
+
}), /* @__PURE__ */ h("div", {
|
|
1027
1220
|
className: "space-y-3",
|
|
1028
|
-
children:
|
|
1221
|
+
children: Dt.map((e) => /* @__PURE__ */ g("button", {
|
|
1029
1222
|
onClick: () => u(`../properties/${e.id}`),
|
|
1030
1223
|
className: "flex w-full items-start gap-3 rounded-lg border border-border-subtle p-3 text-left transition-colors hover:bg-bg-sunken/50",
|
|
1031
|
-
children: [e.images[0] && /* @__PURE__ */
|
|
1224
|
+
children: [e.images[0] && /* @__PURE__ */ h("img", {
|
|
1032
1225
|
src: e.images[0].url,
|
|
1033
1226
|
alt: e.title,
|
|
1034
1227
|
className: "h-14 w-14 rounded object-cover"
|
|
1035
|
-
}), /* @__PURE__ */
|
|
1228
|
+
}), /* @__PURE__ */ g("div", {
|
|
1036
1229
|
className: "min-w-0 flex-1",
|
|
1037
1230
|
children: [
|
|
1038
|
-
/* @__PURE__ */
|
|
1231
|
+
/* @__PURE__ */ h("div", {
|
|
1039
1232
|
className: "truncate text-sm font-medium text-text-primary",
|
|
1040
1233
|
children: e.title
|
|
1041
1234
|
}),
|
|
1042
|
-
/* @__PURE__ */
|
|
1235
|
+
/* @__PURE__ */ h("div", {
|
|
1043
1236
|
className: "text-sm font-semibold text-text-primary",
|
|
1044
1237
|
children: n(e.price.amount)
|
|
1045
1238
|
}),
|
|
1046
|
-
/* @__PURE__ */
|
|
1239
|
+
/* @__PURE__ */ h("div", {
|
|
1047
1240
|
className: "truncate text-xs text-text-secondary",
|
|
1048
1241
|
children: [e.location.neighborhood, e.location.city].filter(Boolean).join(", ")
|
|
1049
1242
|
})
|
|
@@ -1055,331 +1248,331 @@ var A = {
|
|
|
1055
1248
|
]
|
|
1056
1249
|
})]
|
|
1057
1250
|
}),
|
|
1058
|
-
/* @__PURE__ */
|
|
1059
|
-
entityId:
|
|
1251
|
+
/* @__PURE__ */ h(ye, {
|
|
1252
|
+
entityId: f.id,
|
|
1060
1253
|
entityType: "housingvista-property"
|
|
1061
1254
|
}),
|
|
1062
|
-
/* @__PURE__ */
|
|
1063
|
-
open:
|
|
1064
|
-
onOpenChange:
|
|
1065
|
-
entityId:
|
|
1255
|
+
/* @__PURE__ */ h(ve, {
|
|
1256
|
+
open: Pt,
|
|
1257
|
+
onOpenChange: Ft,
|
|
1258
|
+
entityId: f.id,
|
|
1066
1259
|
entityType: "housingvista-property",
|
|
1067
|
-
title:
|
|
1068
|
-
pagePath:
|
|
1260
|
+
title: f.title,
|
|
1261
|
+
pagePath: ze.pathname,
|
|
1069
1262
|
heading: "Contact owner",
|
|
1070
|
-
description: `Ask a question or start a conversation about ${
|
|
1263
|
+
description: `Ask a question or start a conversation about ${f.title}.`
|
|
1071
1264
|
}),
|
|
1072
|
-
/* @__PURE__ */
|
|
1073
|
-
open:
|
|
1074
|
-
onOpenChange:
|
|
1075
|
-
children: /* @__PURE__ */
|
|
1265
|
+
/* @__PURE__ */ h(v, {
|
|
1266
|
+
open: Nt,
|
|
1267
|
+
onOpenChange: P,
|
|
1268
|
+
children: /* @__PURE__ */ h(y, {
|
|
1076
1269
|
className: "sm:max-w-md",
|
|
1077
|
-
children: /* @__PURE__ */
|
|
1078
|
-
onSubmit:
|
|
1270
|
+
children: /* @__PURE__ */ g("form", {
|
|
1271
|
+
onSubmit: Ln,
|
|
1079
1272
|
children: [
|
|
1080
|
-
/* @__PURE__ */ S
|
|
1273
|
+
/* @__PURE__ */ g(S, { children: [/* @__PURE__ */ h(C, { children: "Apply to rent" }), /* @__PURE__ */ g(b, { children: [
|
|
1081
1274
|
"Submit a rental application for ",
|
|
1082
|
-
|
|
1275
|
+
f.title,
|
|
1083
1276
|
". The owner will review and respond."
|
|
1084
1277
|
] })] }),
|
|
1085
|
-
/* @__PURE__ */
|
|
1278
|
+
/* @__PURE__ */ g("div", {
|
|
1086
1279
|
className: "space-y-3 py-2",
|
|
1087
1280
|
children: [
|
|
1088
|
-
/* @__PURE__ */
|
|
1281
|
+
/* @__PURE__ */ g("div", {
|
|
1089
1282
|
className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
|
|
1090
|
-
children: [/* @__PURE__ */
|
|
1283
|
+
children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
1091
1284
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
1092
1285
|
children: "Full name *"
|
|
1093
|
-
}), /* @__PURE__ */
|
|
1286
|
+
}), /* @__PURE__ */ h("input", {
|
|
1094
1287
|
type: "text",
|
|
1095
1288
|
required: !0,
|
|
1096
|
-
value:
|
|
1097
|
-
onChange: (e) =>
|
|
1098
|
-
className:
|
|
1099
|
-
})] }), /* @__PURE__ */
|
|
1289
|
+
value: F,
|
|
1290
|
+
onChange: (e) => It(e.target.value),
|
|
1291
|
+
className: w
|
|
1292
|
+
})] }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
1100
1293
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
1101
1294
|
children: "Email *"
|
|
1102
|
-
}), /* @__PURE__ */
|
|
1295
|
+
}), /* @__PURE__ */ h("input", {
|
|
1103
1296
|
type: "email",
|
|
1104
1297
|
required: !0,
|
|
1105
|
-
value:
|
|
1106
|
-
onChange: (e) =>
|
|
1107
|
-
className:
|
|
1298
|
+
value: I,
|
|
1299
|
+
onChange: (e) => Lt(e.target.value),
|
|
1300
|
+
className: w
|
|
1108
1301
|
})] })]
|
|
1109
1302
|
}),
|
|
1110
|
-
/* @__PURE__ */
|
|
1303
|
+
/* @__PURE__ */ g("div", {
|
|
1111
1304
|
className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
|
|
1112
|
-
children: [/* @__PURE__ */
|
|
1305
|
+
children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
1113
1306
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
1114
1307
|
children: "Phone"
|
|
1115
|
-
}), /* @__PURE__ */
|
|
1308
|
+
}), /* @__PURE__ */ h("input", {
|
|
1116
1309
|
type: "tel",
|
|
1117
|
-
value:
|
|
1118
|
-
onChange: (e) =>
|
|
1119
|
-
className:
|
|
1120
|
-
})] }), /* @__PURE__ */
|
|
1310
|
+
value: Rt,
|
|
1311
|
+
onChange: (e) => zt(e.target.value),
|
|
1312
|
+
className: w
|
|
1313
|
+
})] }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("label", {
|
|
1121
1314
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
1122
1315
|
children: [
|
|
1123
1316
|
"Monthly income (",
|
|
1124
|
-
|
|
1317
|
+
f.price.currency,
|
|
1125
1318
|
")"
|
|
1126
1319
|
]
|
|
1127
|
-
}), /* @__PURE__ */
|
|
1320
|
+
}), /* @__PURE__ */ h("input", {
|
|
1128
1321
|
type: "number",
|
|
1129
1322
|
min: 0,
|
|
1130
|
-
value:
|
|
1131
|
-
onChange: (e) =>
|
|
1132
|
-
className:
|
|
1323
|
+
value: L,
|
|
1324
|
+
onChange: (e) => Bt(e.target.value),
|
|
1325
|
+
className: w
|
|
1133
1326
|
})] })]
|
|
1134
1327
|
}),
|
|
1135
|
-
/* @__PURE__ */
|
|
1328
|
+
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
1136
1329
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
1137
1330
|
children: "Preferred move-in date"
|
|
1138
|
-
}), /* @__PURE__ */
|
|
1331
|
+
}), /* @__PURE__ */ h("input", {
|
|
1139
1332
|
type: "date",
|
|
1140
|
-
value:
|
|
1141
|
-
onChange: (e) =>
|
|
1142
|
-
className:
|
|
1333
|
+
value: Vt,
|
|
1334
|
+
onChange: (e) => Ht(e.target.value),
|
|
1335
|
+
className: w
|
|
1143
1336
|
})] })
|
|
1144
1337
|
]
|
|
1145
1338
|
}),
|
|
1146
|
-
/* @__PURE__ */
|
|
1339
|
+
/* @__PURE__ */ g(x, { children: [/* @__PURE__ */ h(_, {
|
|
1147
1340
|
type: "button",
|
|
1148
1341
|
variant: "outline",
|
|
1149
|
-
onClick: () =>
|
|
1342
|
+
onClick: () => P(!1),
|
|
1150
1343
|
children: "Cancel"
|
|
1151
|
-
}), /* @__PURE__ */
|
|
1344
|
+
}), /* @__PURE__ */ h(_, {
|
|
1152
1345
|
type: "submit",
|
|
1153
|
-
disabled:
|
|
1154
|
-
children:
|
|
1346
|
+
disabled: St || !H,
|
|
1347
|
+
children: St ? "Submitting…" : "Submit application"
|
|
1155
1348
|
})] })
|
|
1156
1349
|
]
|
|
1157
1350
|
})
|
|
1158
1351
|
})
|
|
1159
1352
|
}),
|
|
1160
|
-
/* @__PURE__ */
|
|
1161
|
-
open:
|
|
1162
|
-
onOpenChange:
|
|
1163
|
-
children: /* @__PURE__ */
|
|
1353
|
+
/* @__PURE__ */ h(v, {
|
|
1354
|
+
open: kt,
|
|
1355
|
+
onOpenChange: A,
|
|
1356
|
+
children: /* @__PURE__ */ h(y, {
|
|
1164
1357
|
className: "sm:max-w-md",
|
|
1165
|
-
children: /* @__PURE__ */
|
|
1166
|
-
onSubmit:
|
|
1358
|
+
children: /* @__PURE__ */ g("form", {
|
|
1359
|
+
onSubmit: Mn,
|
|
1167
1360
|
children: [
|
|
1168
|
-
/* @__PURE__ */ S
|
|
1361
|
+
/* @__PURE__ */ g(S, { children: [/* @__PURE__ */ h(C, { children: "Schedule a viewing" }), /* @__PURE__ */ g(b, { children: [
|
|
1169
1362
|
"Pick a date and time to see ",
|
|
1170
|
-
|
|
1363
|
+
f.title,
|
|
1171
1364
|
"."
|
|
1172
1365
|
] })] }),
|
|
1173
|
-
/* @__PURE__ */
|
|
1366
|
+
/* @__PURE__ */ g("div", {
|
|
1174
1367
|
className: "space-y-3 py-2",
|
|
1175
1368
|
children: [
|
|
1176
|
-
/* @__PURE__ */
|
|
1369
|
+
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
1177
1370
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
1178
1371
|
children: "Date & time *"
|
|
1179
|
-
}), /* @__PURE__ */
|
|
1372
|
+
}), /* @__PURE__ */ h("input", {
|
|
1180
1373
|
type: "datetime-local",
|
|
1181
1374
|
required: !0,
|
|
1182
|
-
value:
|
|
1183
|
-
onChange: (e) =>
|
|
1184
|
-
className:
|
|
1375
|
+
value: B,
|
|
1376
|
+
onChange: (e) => on(e.target.value),
|
|
1377
|
+
className: w
|
|
1185
1378
|
})] }),
|
|
1186
|
-
/* @__PURE__ */
|
|
1379
|
+
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
1187
1380
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
1188
1381
|
children: "Type"
|
|
1189
|
-
}), /* @__PURE__ */
|
|
1190
|
-
value:
|
|
1191
|
-
onChange: (e) =>
|
|
1192
|
-
className:
|
|
1193
|
-
children: [/* @__PURE__ */
|
|
1382
|
+
}), /* @__PURE__ */ g("select", {
|
|
1383
|
+
value: sn,
|
|
1384
|
+
onChange: (e) => cn(e.target.value),
|
|
1385
|
+
className: w,
|
|
1386
|
+
children: [/* @__PURE__ */ h("option", {
|
|
1194
1387
|
value: "in_person",
|
|
1195
1388
|
children: "In person"
|
|
1196
|
-
}), /* @__PURE__ */
|
|
1389
|
+
}), /* @__PURE__ */ h("option", {
|
|
1197
1390
|
value: "virtual",
|
|
1198
1391
|
children: "Virtual"
|
|
1199
1392
|
})]
|
|
1200
1393
|
})] }),
|
|
1201
|
-
/* @__PURE__ */
|
|
1394
|
+
/* @__PURE__ */ g("div", {
|
|
1202
1395
|
className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
|
|
1203
|
-
children: [/* @__PURE__ */
|
|
1396
|
+
children: [/* @__PURE__ */ h("input", {
|
|
1204
1397
|
type: "text",
|
|
1205
1398
|
placeholder: "Your name",
|
|
1206
|
-
value:
|
|
1207
|
-
onChange: (e) =>
|
|
1208
|
-
className:
|
|
1209
|
-
}), /* @__PURE__ */
|
|
1399
|
+
value: ln,
|
|
1400
|
+
onChange: (e) => un(e.target.value),
|
|
1401
|
+
className: w
|
|
1402
|
+
}), /* @__PURE__ */ h("input", {
|
|
1210
1403
|
type: "email",
|
|
1211
1404
|
placeholder: "Your email",
|
|
1212
|
-
value:
|
|
1213
|
-
onChange: (e) =>
|
|
1214
|
-
className:
|
|
1405
|
+
value: dn,
|
|
1406
|
+
onChange: (e) => fn(e.target.value),
|
|
1407
|
+
className: w
|
|
1215
1408
|
})]
|
|
1216
1409
|
}),
|
|
1217
|
-
/* @__PURE__ */
|
|
1410
|
+
/* @__PURE__ */ h("textarea", {
|
|
1218
1411
|
placeholder: "Notes (optional)",
|
|
1219
1412
|
rows: 2,
|
|
1220
|
-
value:
|
|
1221
|
-
onChange: (e) =>
|
|
1413
|
+
value: pn,
|
|
1414
|
+
onChange: (e) => mn(e.target.value),
|
|
1222
1415
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
1223
1416
|
})
|
|
1224
1417
|
]
|
|
1225
1418
|
}),
|
|
1226
|
-
/* @__PURE__ */
|
|
1419
|
+
/* @__PURE__ */ g(x, { children: [/* @__PURE__ */ h(_, {
|
|
1227
1420
|
type: "button",
|
|
1228
1421
|
variant: "outline",
|
|
1229
|
-
onClick: () =>
|
|
1422
|
+
onClick: () => A(!1),
|
|
1230
1423
|
children: "Cancel"
|
|
1231
|
-
}), /* @__PURE__ */
|
|
1424
|
+
}), /* @__PURE__ */ h(_, {
|
|
1232
1425
|
type: "submit",
|
|
1233
|
-
disabled:
|
|
1234
|
-
children:
|
|
1426
|
+
disabled: mt || !B,
|
|
1427
|
+
children: mt ? "Booking…" : "Request viewing"
|
|
1235
1428
|
})] })
|
|
1236
1429
|
]
|
|
1237
1430
|
})
|
|
1238
1431
|
})
|
|
1239
1432
|
}),
|
|
1240
|
-
/* @__PURE__ */
|
|
1241
|
-
open:
|
|
1242
|
-
onOpenChange:
|
|
1243
|
-
children: /* @__PURE__ */
|
|
1433
|
+
/* @__PURE__ */ h(v, {
|
|
1434
|
+
open: At,
|
|
1435
|
+
onOpenChange: j,
|
|
1436
|
+
children: /* @__PURE__ */ h(y, {
|
|
1244
1437
|
className: "sm:max-w-md",
|
|
1245
|
-
children: /* @__PURE__ */
|
|
1246
|
-
onSubmit:
|
|
1438
|
+
children: /* @__PURE__ */ g("form", {
|
|
1439
|
+
onSubmit: Nn,
|
|
1247
1440
|
children: [
|
|
1248
|
-
/* @__PURE__ */ S
|
|
1441
|
+
/* @__PURE__ */ g(S, { children: [/* @__PURE__ */ h(C, { children: "Make an offer" }), /* @__PURE__ */ g(b, { children: [
|
|
1249
1442
|
"Listing price is ",
|
|
1250
|
-
|
|
1443
|
+
V(f.price),
|
|
1251
1444
|
"."
|
|
1252
1445
|
] })] }),
|
|
1253
|
-
/* @__PURE__ */
|
|
1446
|
+
/* @__PURE__ */ g("div", {
|
|
1254
1447
|
className: "space-y-3 py-2",
|
|
1255
|
-
children: [/* @__PURE__ */
|
|
1448
|
+
children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("label", {
|
|
1256
1449
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
1257
1450
|
children: [
|
|
1258
1451
|
"Your offer (",
|
|
1259
|
-
|
|
1452
|
+
f.price.currency,
|
|
1260
1453
|
") *"
|
|
1261
1454
|
]
|
|
1262
|
-
}), /* @__PURE__ */
|
|
1455
|
+
}), /* @__PURE__ */ h("input", {
|
|
1263
1456
|
type: "number",
|
|
1264
1457
|
required: !0,
|
|
1265
1458
|
min: 1,
|
|
1266
|
-
value:
|
|
1267
|
-
onChange: (e) =>
|
|
1459
|
+
value: hn,
|
|
1460
|
+
onChange: (e) => gn(e.target.value),
|
|
1268
1461
|
placeholder: "Enter amount",
|
|
1269
|
-
className:
|
|
1270
|
-
})] }), /* @__PURE__ */
|
|
1462
|
+
className: w
|
|
1463
|
+
})] }), /* @__PURE__ */ h("textarea", {
|
|
1271
1464
|
placeholder: "Message to the owner (optional)",
|
|
1272
1465
|
rows: 3,
|
|
1273
|
-
value:
|
|
1274
|
-
onChange: (e) =>
|
|
1466
|
+
value: _n,
|
|
1467
|
+
onChange: (e) => vn(e.target.value),
|
|
1275
1468
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
1276
1469
|
})]
|
|
1277
1470
|
}),
|
|
1278
|
-
/* @__PURE__ */
|
|
1471
|
+
/* @__PURE__ */ g(x, { children: [/* @__PURE__ */ h(_, {
|
|
1279
1472
|
type: "button",
|
|
1280
1473
|
variant: "outline",
|
|
1281
|
-
onClick: () =>
|
|
1474
|
+
onClick: () => j(!1),
|
|
1282
1475
|
children: "Cancel"
|
|
1283
|
-
}), /* @__PURE__ */
|
|
1476
|
+
}), /* @__PURE__ */ h(_, {
|
|
1284
1477
|
type: "submit",
|
|
1285
|
-
disabled:
|
|
1286
|
-
children:
|
|
1478
|
+
disabled: gt,
|
|
1479
|
+
children: gt ? "Submitting…" : "Submit offer"
|
|
1287
1480
|
})] })
|
|
1288
1481
|
]
|
|
1289
1482
|
})
|
|
1290
1483
|
})
|
|
1291
1484
|
}),
|
|
1292
|
-
/* @__PURE__ */
|
|
1293
|
-
open:
|
|
1294
|
-
onOpenChange:
|
|
1295
|
-
children: /* @__PURE__ */
|
|
1485
|
+
/* @__PURE__ */ h(v, {
|
|
1486
|
+
open: jt,
|
|
1487
|
+
onOpenChange: M,
|
|
1488
|
+
children: /* @__PURE__ */ h(y, {
|
|
1296
1489
|
className: "sm:max-w-md",
|
|
1297
|
-
children: /* @__PURE__ */
|
|
1298
|
-
onSubmit:
|
|
1490
|
+
children: /* @__PURE__ */ g("form", {
|
|
1491
|
+
onSubmit: Fn,
|
|
1299
1492
|
children: [
|
|
1300
|
-
/* @__PURE__ */ S
|
|
1301
|
-
/* @__PURE__ */
|
|
1493
|
+
/* @__PURE__ */ g(S, { children: [/* @__PURE__ */ h(C, { children: "Edit property" }), /* @__PURE__ */ h(b, { children: "Update the core listing details." })] }),
|
|
1494
|
+
/* @__PURE__ */ g("div", {
|
|
1302
1495
|
className: "space-y-3 py-2",
|
|
1303
1496
|
children: [
|
|
1304
|
-
/* @__PURE__ */
|
|
1497
|
+
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
1305
1498
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
1306
1499
|
children: "Title *"
|
|
1307
|
-
}), /* @__PURE__ */
|
|
1500
|
+
}), /* @__PURE__ */ h("input", {
|
|
1308
1501
|
type: "text",
|
|
1309
1502
|
required: !0,
|
|
1310
|
-
value:
|
|
1311
|
-
onChange: (e) =>
|
|
1312
|
-
className:
|
|
1503
|
+
value: yn,
|
|
1504
|
+
onChange: (e) => bn(e.target.value),
|
|
1505
|
+
className: w
|
|
1313
1506
|
})] }),
|
|
1314
|
-
/* @__PURE__ */
|
|
1507
|
+
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
1315
1508
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
1316
1509
|
children: "Description"
|
|
1317
|
-
}), /* @__PURE__ */
|
|
1510
|
+
}), /* @__PURE__ */ h("textarea", {
|
|
1318
1511
|
rows: 3,
|
|
1319
|
-
value:
|
|
1320
|
-
onChange: (e) =>
|
|
1512
|
+
value: xn,
|
|
1513
|
+
onChange: (e) => Sn(e.target.value),
|
|
1321
1514
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
1322
1515
|
})] }),
|
|
1323
|
-
/* @__PURE__ */
|
|
1516
|
+
/* @__PURE__ */ g("div", {
|
|
1324
1517
|
className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
|
|
1325
|
-
children: [/* @__PURE__ */
|
|
1518
|
+
children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
1326
1519
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
1327
1520
|
children: "Status"
|
|
1328
|
-
}), /* @__PURE__ */
|
|
1329
|
-
value:
|
|
1330
|
-
onChange: (e) =>
|
|
1331
|
-
className:
|
|
1332
|
-
children:
|
|
1521
|
+
}), /* @__PURE__ */ h("select", {
|
|
1522
|
+
value: Cn,
|
|
1523
|
+
onChange: (e) => wn(e.target.value),
|
|
1524
|
+
className: w,
|
|
1525
|
+
children: st.map((e) => /* @__PURE__ */ h("option", {
|
|
1333
1526
|
value: e.value,
|
|
1334
1527
|
children: e.label
|
|
1335
1528
|
}, e.value))
|
|
1336
|
-
})] }), /* @__PURE__ */
|
|
1529
|
+
})] }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("label", {
|
|
1337
1530
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
1338
1531
|
children: [
|
|
1339
1532
|
"Price (",
|
|
1340
|
-
|
|
1533
|
+
f.price.currency,
|
|
1341
1534
|
")"
|
|
1342
1535
|
]
|
|
1343
|
-
}), /* @__PURE__ */
|
|
1536
|
+
}), /* @__PURE__ */ h("input", {
|
|
1344
1537
|
type: "number",
|
|
1345
1538
|
min: 0,
|
|
1346
|
-
value:
|
|
1347
|
-
onChange: (e) =>
|
|
1348
|
-
className:
|
|
1539
|
+
value: Tn,
|
|
1540
|
+
onChange: (e) => En(e.target.value),
|
|
1541
|
+
className: w
|
|
1349
1542
|
})] })]
|
|
1350
1543
|
})
|
|
1351
1544
|
]
|
|
1352
1545
|
}),
|
|
1353
|
-
/* @__PURE__ */
|
|
1546
|
+
/* @__PURE__ */ g(x, { children: [/* @__PURE__ */ h(_, {
|
|
1354
1547
|
type: "button",
|
|
1355
1548
|
variant: "outline",
|
|
1356
|
-
onClick: () =>
|
|
1549
|
+
onClick: () => M(!1),
|
|
1357
1550
|
children: "Cancel"
|
|
1358
|
-
}), /* @__PURE__ */
|
|
1551
|
+
}), /* @__PURE__ */ h(_, {
|
|
1359
1552
|
type: "submit",
|
|
1360
|
-
disabled:
|
|
1361
|
-
children:
|
|
1553
|
+
disabled: vt,
|
|
1554
|
+
children: vt ? "Saving…" : "Save changes"
|
|
1362
1555
|
})] })
|
|
1363
1556
|
]
|
|
1364
1557
|
})
|
|
1365
1558
|
})
|
|
1366
1559
|
}),
|
|
1367
|
-
/* @__PURE__ */
|
|
1368
|
-
open:
|
|
1369
|
-
onOpenChange:
|
|
1370
|
-
children: /* @__PURE__ */
|
|
1560
|
+
/* @__PURE__ */ h(v, {
|
|
1561
|
+
open: Mt,
|
|
1562
|
+
onOpenChange: N,
|
|
1563
|
+
children: /* @__PURE__ */ g(y, {
|
|
1371
1564
|
className: "sm:max-w-md",
|
|
1372
|
-
children: [/* @__PURE__ */ S
|
|
1565
|
+
children: [/* @__PURE__ */ g(S, { children: [/* @__PURE__ */ h(C, { children: "Delete this property?" }), /* @__PURE__ */ g(b, { children: [f.title, " will be permanently removed. This cannot be undone."] })] }), /* @__PURE__ */ g(x, { children: [/* @__PURE__ */ h(_, {
|
|
1373
1566
|
type: "button",
|
|
1374
1567
|
variant: "outline",
|
|
1375
|
-
onClick: () =>
|
|
1568
|
+
onClick: () => N(!1),
|
|
1376
1569
|
children: "Cancel"
|
|
1377
|
-
}), /* @__PURE__ */
|
|
1570
|
+
}), /* @__PURE__ */ h(_, {
|
|
1378
1571
|
type: "button",
|
|
1379
1572
|
variant: "destructive",
|
|
1380
|
-
onClick:
|
|
1381
|
-
disabled:
|
|
1382
|
-
children:
|
|
1573
|
+
onClick: In,
|
|
1574
|
+
disabled: bt,
|
|
1575
|
+
children: bt ? "Deleting…" : "Delete property"
|
|
1383
1576
|
})] })]
|
|
1384
1577
|
})
|
|
1385
1578
|
})
|
|
@@ -1387,6 +1580,6 @@ var A = {
|
|
|
1387
1580
|
});
|
|
1388
1581
|
};
|
|
1389
1582
|
//#endregion
|
|
1390
|
-
export {
|
|
1583
|
+
export { T as PropertyDetailPage };
|
|
1391
1584
|
|
|
1392
1585
|
//# sourceMappingURL=PropertyDetailPage.js.map
|