@burdenoff/microfe-housingvista 2026.720.2 → 2026.730.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,20 +6,20 @@ import { FilterBar as i } from "../../components/FilterBar.js";
6
6
  import { LoadingSkeleton as a } from "../../components/LoadingSkeleton.js";
7
7
  import { PropertyCard as ee } from "../../components/PropertyCard.js";
8
8
  import { useHousingVistaAnalytics as te, useTrackPageView as ne } from "../../hooks/useHousingVistaAnalytics.js";
9
- import { useDashboardStats as re, useProperties as o, useRemoveShortlist as ie, useSaveShortlist as ae, useShortlists as oe } from "../../hooks/index.js";
9
+ import { useDashboardStats as re, useNaturalLanguageSearch as ie, useProperties as o, useRemoveShortlist as ae, useSaveShortlist as oe, useShortlists as se } from "../../hooks/index.js";
10
10
  import { notify as s } from "../../lib/toast.js";
11
11
  import "../../components/index.js";
12
- import { useServerPagination as se } from "../../hooks/useServerPagination.js";
13
- import { PropertyMapView as ce } from "../../components/maps/PropertyMapView.js";
12
+ import { useServerPagination as ce } from "../../hooks/useServerPagination.js";
13
+ import { PropertyMapView as le } from "../../components/maps/PropertyMapView.js";
14
14
  import "../../components/maps/index.js";
15
15
  import { useEffect as c, useMemo as l, useState as u } from "react";
16
- import { Building as d, Grid as le, List as ue, Map as de, Plus as fe, SlidersHorizontal as pe, X as me } from "lucide-react";
17
- import { useNavigate as he, useSearchParams as ge } from "react-router-dom";
16
+ import { Building as d, Grid as ue, List as de, Map as fe, Plus as pe, SlidersHorizontal as me, Sparkles as he, X as ge } from "lucide-react";
17
+ import { useNavigate as _e, useSearchParams as ve } from "react-router-dom";
18
18
  import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
19
- import { useI18n as _e } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
20
- import { EmphasisPanel as ve, Pagination as ye } from "@burdenoff/fe-libs/ui";
19
+ import { useI18n as ye } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
20
+ import { EmphasisPanel as be, Pagination as xe } from "@burdenoff/fe-libs/ui";
21
21
  //#region src/housingvista/pages/properties/PropertiesPage.tsx
22
- function be(e) {
22
+ function Se(e) {
23
23
  return [
24
24
  e.neLat,
25
25
  e.neLng,
@@ -27,7 +27,7 @@ function be(e) {
27
27
  e.swLng
28
28
  ].map((e) => e.toFixed(5)).join(",");
29
29
  }
30
- function xe(e) {
30
+ function Ce(e) {
31
31
  if (!e) return;
32
32
  let t = e.split(",").map(Number);
33
33
  if (t.length !== 4 || t.some((e) => Number.isNaN(e))) return;
@@ -39,138 +39,138 @@ function xe(e) {
39
39
  swLng: a
40
40
  };
41
41
  }
42
- var Se = 9, h = () => {
43
- let h = he(), [g, _] = ge(), { t: Ce } = _e(), { emit: we, emitResource: Te, emitSearch: Ee } = te();
42
+ var we = 9, h = () => {
43
+ let h = _e(), [g, Te] = ve(), { t: Ee } = ye(), { emit: _, emitResource: De, emitSearch: v } = te();
44
44
  ne("housingvista.property.viewed");
45
- let v = (e, t) => {
46
- let n = Ce(e);
45
+ let y = (e, t) => {
46
+ let n = Ee(e);
47
47
  return n === e ? t : n;
48
- }, De = [
48
+ }, Oe = [
49
49
  {
50
50
  value: "all",
51
- label: v("housingvista.properties.filters.propertyTypes.all", "All Types")
51
+ label: y("housingvista.properties.filters.propertyTypes.all", "All Types")
52
52
  },
53
53
  {
54
54
  value: "residential",
55
- label: v("housingvista.properties.filters.propertyTypes.residential", "Residential")
55
+ label: y("housingvista.properties.filters.propertyTypes.residential", "Residential")
56
56
  },
57
57
  {
58
58
  value: "commercial",
59
- label: v("housingvista.properties.filters.propertyTypes.commercial", "Commercial")
59
+ label: y("housingvista.properties.filters.propertyTypes.commercial", "Commercial")
60
60
  },
61
61
  {
62
62
  value: "industrial",
63
- label: v("housingvista.properties.filters.propertyTypes.industrial", "Industrial")
63
+ label: y("housingvista.properties.filters.propertyTypes.industrial", "Industrial")
64
64
  },
65
65
  {
66
66
  value: "agricultural",
67
- label: v("housingvista.properties.filters.propertyTypes.agricultural", "Agricultural")
67
+ label: y("housingvista.properties.filters.propertyTypes.agricultural", "Agricultural")
68
68
  },
69
69
  {
70
70
  value: "mixed_use",
71
- label: v("housingvista.properties.filters.propertyTypes.mixedUse", "Mixed Use")
71
+ label: y("housingvista.properties.filters.propertyTypes.mixedUse", "Mixed Use")
72
72
  }
73
- ], Oe = [
73
+ ], ke = [
74
74
  {
75
75
  value: "all",
76
- label: v("housingvista.properties.filters.propertyStatuses.all", "All Status")
76
+ label: y("housingvista.properties.filters.propertyStatuses.all", "All Status")
77
77
  },
78
78
  {
79
79
  value: "for_sale",
80
- label: v("housingvista.properties.filters.propertyStatuses.forSale", "For Sale")
80
+ label: y("housingvista.properties.filters.propertyStatuses.forSale", "For Sale")
81
81
  },
82
82
  {
83
83
  value: "for_rent",
84
- label: v("housingvista.properties.filters.propertyStatuses.forRent", "For Rent")
84
+ label: y("housingvista.properties.filters.propertyStatuses.forRent", "For Rent")
85
85
  },
86
86
  {
87
87
  value: "sold",
88
- label: v("housingvista.properties.filters.propertyStatuses.sold", "Sold")
88
+ label: y("housingvista.properties.filters.propertyStatuses.sold", "Sold")
89
89
  },
90
90
  {
91
91
  value: "rented",
92
- label: v("housingvista.properties.filters.propertyStatuses.rented", "Rented")
92
+ label: y("housingvista.properties.filters.propertyStatuses.rented", "Rented")
93
93
  },
94
94
  {
95
95
  value: "under_contract",
96
- label: v("housingvista.properties.filters.propertyStatuses.underContract", "Under Contract")
96
+ label: y("housingvista.properties.filters.propertyStatuses.underContract", "Under Contract")
97
97
  },
98
98
  {
99
99
  value: "off_market",
100
- label: v("housingvista.properties.filters.propertyStatuses.offMarket", "Off Market")
100
+ label: y("housingvista.properties.filters.propertyStatuses.offMarket", "Off Market")
101
101
  }
102
- ], ke = [
102
+ ], Ae = [
103
103
  {
104
104
  value: "all",
105
- label: v("housingvista.properties.filters.propertyCategories.all", "All Categories")
105
+ label: y("housingvista.properties.filters.propertyCategories.all", "All Categories")
106
106
  },
107
107
  {
108
108
  value: "apartment",
109
- label: v("housingvista.properties.filters.propertyCategories.apartment", "Apartment")
109
+ label: y("housingvista.properties.filters.propertyCategories.apartment", "Apartment")
110
110
  },
111
111
  {
112
112
  value: "house",
113
- label: v("housingvista.properties.filters.propertyCategories.house", "House")
113
+ label: y("housingvista.properties.filters.propertyCategories.house", "House")
114
114
  },
115
115
  {
116
116
  value: "villa",
117
- label: v("housingvista.properties.filters.propertyCategories.villa", "Villa")
117
+ label: y("housingvista.properties.filters.propertyCategories.villa", "Villa")
118
118
  },
119
119
  {
120
120
  value: "office",
121
- label: v("housingvista.properties.filters.propertyCategories.office", "Office")
121
+ label: y("housingvista.properties.filters.propertyCategories.office", "Office")
122
122
  },
123
123
  {
124
124
  value: "retail",
125
- label: v("housingvista.properties.filters.propertyCategories.retail", "Retail")
125
+ label: y("housingvista.properties.filters.propertyCategories.retail", "Retail")
126
126
  },
127
127
  {
128
128
  value: "warehouse",
129
- label: v("housingvista.properties.filters.propertyCategories.warehouse", "Warehouse")
129
+ label: y("housingvista.properties.filters.propertyCategories.warehouse", "Warehouse")
130
130
  },
131
131
  {
132
132
  value: "land",
133
- label: v("housingvista.properties.filters.propertyCategories.land", "Land")
133
+ label: y("housingvista.properties.filters.propertyCategories.land", "Land")
134
134
  },
135
135
  {
136
136
  value: "plot",
137
- label: v("housingvista.properties.filters.propertyCategories.plot", "Plot")
137
+ label: y("housingvista.properties.filters.propertyCategories.plot", "Plot")
138
138
  }
139
- ], y = [
139
+ ], b = [
140
140
  {
141
141
  value: "all",
142
- label: v("housingvista.properties.filters.priceRanges.all", "Any Price"),
142
+ label: y("housingvista.properties.filters.priceRanges.all", "Any Price"),
143
143
  min: 0,
144
144
  max: Infinity
145
145
  },
146
146
  {
147
147
  value: "under_100k",
148
- label: v("housingvista.properties.filters.priceRanges.under100k", "Under $100K"),
148
+ label: y("housingvista.properties.filters.priceRanges.under100k", "Under $100K"),
149
149
  min: 0,
150
150
  max: 1e5
151
151
  },
152
152
  {
153
153
  value: "100k_500k",
154
- label: v("housingvista.properties.filters.priceRanges.100kTo500k", "$100K - $500K"),
154
+ label: y("housingvista.properties.filters.priceRanges.100kTo500k", "$100K - $500K"),
155
155
  min: 1e5,
156
156
  max: 5e5
157
157
  },
158
158
  {
159
159
  value: "500k_1m",
160
- label: v("housingvista.properties.filters.priceRanges.500kTo1m", "$500K - $1M"),
160
+ label: y("housingvista.properties.filters.priceRanges.500kTo1m", "$500K - $1M"),
161
161
  min: 5e5,
162
162
  max: 1e6
163
163
  },
164
164
  {
165
165
  value: "over_1m",
166
- label: v("housingvista.properties.filters.priceRanges.over1m", "Over $1M"),
166
+ label: y("housingvista.properties.filters.priceRanges.over1m", "Over $1M"),
167
167
  min: 1e6,
168
168
  max: Infinity
169
169
  }
170
- ], Ae = [
170
+ ], je = [
171
171
  {
172
172
  value: "all",
173
- label: v("housingvista.properties.filters.bedrooms.all", "Any Bedrooms")
173
+ label: y("housingvista.properties.filters.bedrooms.all", "Any Bedrooms")
174
174
  },
175
175
  {
176
176
  value: "1",
@@ -192,130 +192,202 @@ var Se = 9, h = () => {
192
192
  value: "5",
193
193
  label: "5+"
194
194
  }
195
- ], [b, x] = u(""), [S, C] = u("all"), [w, T] = u("all"), [E, D] = u("all"), [O, k] = u("all"), [A, j] = u("all"), M = g.get("view"), [N, je] = u(M === "map" || M === "list" ? M : "grid"), [P, Me] = u(() => xe(g.get("bounds"))), [F, Ne] = u(!1), I = (e) => {
196
- je(e);
197
- let t = new URLSearchParams(g);
198
- e === "grid" ? t.delete("view") : t.set("view", e), e !== "map" && t.delete("bounds"), _(t, { replace: !0 });
199
- }, Pe = (e) => {
195
+ ], [x, S] = u(""), [C, w] = u("all"), [T, E] = u("all"), [D, O] = u("all"), [k, A] = u("all"), [j, M] = u("all"), N = g.get("view"), [P, Me] = u(N === "map" || N === "list" ? N : "grid"), [F, Ne] = u(() => Ce(g.get("bounds"))), [Pe, Fe] = u(!1), I = (e) => {
200
196
  Me(e);
201
197
  let t = new URLSearchParams(g);
202
- t.set("view", "map"), t.set("bounds", be(e)), _(t, { replace: !0 });
203
- }, Fe = [
198
+ e === "grid" ? t.delete("view") : t.set("view", e), e !== "map" && t.delete("bounds"), Te(t, { replace: !0 });
199
+ }, Ie = (e) => {
200
+ Ne(e);
201
+ let t = new URLSearchParams(g);
202
+ t.set("view", "map"), t.set("bounds", Se(e)), Te(t, { replace: !0 });
203
+ }, Le = [
204
204
  {
205
205
  value: "all",
206
- label: v("housingvista.properties.filters.rera.all", "Any RERA status")
206
+ label: y("housingvista.properties.filters.rera.all", "Any RERA status")
207
207
  },
208
208
  {
209
209
  value: "verified",
210
- label: v("housingvista.properties.filters.rera.verified", "RERA Verified")
210
+ label: y("housingvista.properties.filters.rera.verified", "RERA Verified")
211
211
  },
212
212
  {
213
213
  value: "pending",
214
- label: v("housingvista.properties.filters.rera.pending", "RERA Pending")
214
+ label: y("housingvista.properties.filters.rera.pending", "RERA Pending")
215
215
  },
216
216
  {
217
217
  value: "not_applicable",
218
- label: v("housingvista.properties.filters.rera.notApplicable", "Not RERA-applicable")
218
+ label: y("housingvista.properties.filters.rera.notApplicable", "Not RERA-applicable")
219
219
  },
220
220
  {
221
221
  value: "rejected",
222
- label: v("housingvista.properties.filters.rera.rejected", "RERA Rejected")
222
+ label: y("housingvista.properties.filters.rera.rejected", "RERA Rejected")
223
223
  }
224
- ], [L, R] = u("all"), z = y.find((e) => e.value === O) ?? y[0], B = A === "all" ? 0 : Number(A), [V, Ie] = u("");
224
+ ], [L, Re] = u("all"), R = b.find((e) => e.value === k) ?? b[0], z = j === "all" ? 0 : Number(j), [B, ze] = u("");
225
225
  c(() => {
226
- let e = setTimeout(() => Ie(b), 300);
226
+ let e = setTimeout(() => ze(x), 300);
227
227
  return () => clearTimeout(e);
228
- }, [b]), c(() => {
229
- V.trim() && Ee("properties");
230
- }, [V]);
231
- let { page: H, pageSize: U, pagination: Le, setPage: W, setPageSize: Re } = se(Se), G = l(() => {
228
+ }, [x]), c(() => {
229
+ B.trim() && v("properties");
230
+ }, [B]);
231
+ let { page: V, pageSize: Be, pagination: Ve, setPage: H, setPageSize: He } = ce(we), U = l(() => {
232
232
  let e = {};
233
- return V.trim() && (e.search = V.trim()), w !== "all" && (e.status = w), S !== "all" && (e.type = S), E !== "all" && (e.category = E), z.min > 0 && (e.priceMin = z.min), Number.isFinite(z.max) && (e.priceMax = z.max), B > 0 && (e.bedroomsMin = B), L !== "all" && (e.reraVerificationStatus = L), Object.keys(e).length > 0 ? e : void 0;
233
+ return B.trim() && (e.search = B.trim()), T !== "all" && (e.status = T), C !== "all" && (e.type = C), D !== "all" && (e.category = D), R.min > 0 && (e.priceMin = R.min), Number.isFinite(R.max) && (e.priceMax = R.max), z > 0 && (e.bedroomsMin = z), L !== "all" && (e.reraVerificationStatus = L), Object.keys(e).length > 0 ? e : void 0;
234
234
  }, [
235
- V,
236
- w,
237
- S,
238
- E,
239
- z,
240
235
  B,
236
+ T,
237
+ C,
238
+ D,
239
+ R,
240
+ z,
241
241
  L
242
242
  ]);
243
243
  c(() => {
244
- W(1);
245
- }, [G, W]);
246
- let { data: K, loading: q } = o({
247
- filter: G,
248
- pagination: Le,
249
- skip: N === "map"
250
- }), { data: ze, loading: Be } = o({
251
- filter: l(() => P ? {
252
- ...G ?? {},
253
- bounds: P
254
- } : G, [G, P]),
244
+ H(1);
245
+ }, [U, H]);
246
+ let { data: Ue, loading: We } = o({
247
+ filter: U,
248
+ pagination: Ve,
249
+ skip: P === "map"
250
+ }), { data: Ge, loading: Ke } = o({
251
+ filter: l(() => F ? {
252
+ ...U ?? {},
253
+ bounds: F
254
+ } : U, [U, F]),
255
255
  pagination: {
256
256
  limit: 200,
257
257
  offset: 0
258
258
  },
259
- skip: N !== "map"
260
- }), { data: J } = re(), { data: Y } = oe(), { saveShortlist: Ve } = ae(), { removeShortlist: He } = ie(), X = l(() => new Set(Y.map((e) => e.propertyId)), [Y]), Ue = async (e) => {
259
+ skip: P !== "map"
260
+ }), { data: W } = re(), { data: qe } = se(), { saveShortlist: Je } = oe(), { removeShortlist: Ye } = ae(), G = l(() => new Set(qe.map((e) => e.propertyId)), [qe]), Xe = async (e) => {
261
261
  try {
262
- X.has(e) ? (await He(e), s.success("Removed from shortlist")) : (await Ve(e), Te("housingvista.shortlist.property_added", e), s.success("Saved to shortlist"));
262
+ G.has(e) ? (await Ye(e), s.success("Removed from shortlist")) : (await Je(e), De("housingvista.shortlist.property_added", e), s.success("Saved to shortlist"));
263
263
  } catch (e) {
264
264
  s.error("Could not update shortlist", e.message);
265
265
  }
266
- }, Z = K, We = K.length >= U, Q = b || S !== "all" || w !== "all" || E !== "all" || O !== "all" || A !== "all" || L !== "all", $ = () => {
267
- x(""), C("all"), T("all"), D("all"), k("all"), j("all"), R("all");
266
+ }, Ze = Ue, [K, Qe] = u(""), [q, $e] = u(!1), { search: et, loading: J, method: Y, filter: X, properties: tt } = ie();
267
+ c(() => {
268
+ q && Y && _(Y === "ai" ? "housingvista.nlsearch.ai_used" : "housingvista.nlsearch.fallback_used");
269
+ }, [Y]);
270
+ let nt = (e) => {
271
+ e.preventDefault();
272
+ let t = K.trim();
273
+ t && ($e(!0), v("properties.natural_language"), et(t));
274
+ }, rt = () => {
275
+ $e(!1), Qe("");
276
+ }, Z = q ? tt : Ze, it = q ? J : We, at = Ue.length >= Be, Q = x || C !== "all" || T !== "all" || D !== "all" || k !== "all" || j !== "all" || L !== "all", $ = () => {
277
+ S(""), w("all"), E("all"), O("all"), A("all"), M("all"), Re("all");
268
278
  };
269
279
  return /* @__PURE__ */ m(t, {
270
- title: v("housingvista.properties.title", "Properties"),
271
- description: v("housingvista.properties.description", "Discover your perfect property from our comprehensive listings"),
272
- purpose: v("housingvista.properties.purpose", "Browse, search, and filter every property in your portfolio or on the market. Use the filters to narrow by type, status, price, and bedrooms, then open any listing to see full details, schedule viewings, or start a transaction."),
280
+ title: y("housingvista.properties.title", "Properties"),
281
+ description: y("housingvista.properties.description", "Discover your perfect property from our comprehensive listings"),
282
+ purpose: y("housingvista.properties.purpose", "Browse, search, and filter every property in your portfolio or on the market. Use the filters to narrow by type, status, price, and bedrooms, then open any listing to see full details, schedule viewings, or start a transaction."),
273
283
  actions: /* @__PURE__ */ m("button", {
274
284
  onClick: () => {
275
- we("housingvista.property.create_clicked"), h("new");
285
+ _("housingvista.property.create_clicked"), h("new");
276
286
  },
277
287
  className: "inline-flex items-center gap-2 rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background transition-colors hover:bg-foreground/90",
278
- children: [/* @__PURE__ */ p(fe, { className: "h-4 w-4" }), v("housingvista.properties.actions.addProperty", "Add Property")]
288
+ children: [/* @__PURE__ */ p(pe, { className: "h-4 w-4" }), y("housingvista.properties.actions.addProperty", "Add Property")]
279
289
  }),
280
290
  children: [
281
- /* @__PURE__ */ p(ve, {
291
+ /* @__PURE__ */ p(be, {
282
292
  className: "p-4",
283
293
  children: /* @__PURE__ */ m("div", {
284
294
  className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
285
295
  children: [
286
296
  /* @__PURE__ */ p(n, {
287
- label: v("housingvista.properties.stats.totalProperties", "Total Properties"),
288
- value: J.totalProperties,
297
+ label: y("housingvista.properties.stats.totalProperties", "Total Properties"),
298
+ value: W.totalProperties,
289
299
  icon: /* @__PURE__ */ p(d, { className: "h-5 w-5" })
290
300
  }),
291
301
  /* @__PURE__ */ p(n, {
292
- label: v("housingvista.properties.stats.portfolioValue", "Portfolio Value"),
293
- value: J.totalValue,
302
+ label: y("housingvista.properties.stats.portfolioValue", "Portfolio Value"),
303
+ value: W.totalValue,
294
304
  prefix: "$"
295
305
  }),
296
306
  /* @__PURE__ */ p(n, {
297
- label: v("housingvista.properties.stats.occupancyRate", "Occupancy Rate"),
298
- value: J.occupancyRate,
307
+ label: y("housingvista.properties.stats.occupancyRate", "Occupancy Rate"),
308
+ value: W.occupancyRate,
299
309
  unit: "%"
300
310
  }),
301
311
  /* @__PURE__ */ p(n, {
302
- label: v("housingvista.properties.stats.monthlyRevenue", "Monthly Revenue"),
303
- value: J.monthlyRevenue,
312
+ label: y("housingvista.properties.stats.monthlyRevenue", "Monthly Revenue"),
313
+ value: W.monthlyRevenue,
304
314
  prefix: "$"
305
315
  })
306
316
  ]
307
317
  })
308
318
  }),
319
+ /* @__PURE__ */ m("div", {
320
+ className: "rounded-lg border border-border-subtle bg-bg-surface p-4",
321
+ children: [/* @__PURE__ */ m("form", {
322
+ onSubmit: nt,
323
+ className: "flex flex-col gap-2 sm:flex-row sm:items-center",
324
+ children: [/* @__PURE__ */ m("div", {
325
+ className: "flex flex-1 items-center gap-2",
326
+ children: [/* @__PURE__ */ p(he, { className: "h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ p("input", {
327
+ type: "text",
328
+ value: K,
329
+ onChange: (e) => Qe(e.target.value),
330
+ placeholder: y("housingvista.properties.nlSearch.placeholder", "Try \"2 bedroom apartment near downtown under $2000 with parking\""),
331
+ className: "h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
332
+ })]
333
+ }), /* @__PURE__ */ m("div", {
334
+ className: "flex items-center gap-3",
335
+ children: [/* @__PURE__ */ p("button", {
336
+ type: "submit",
337
+ disabled: !K.trim() || J,
338
+ className: "inline-flex items-center gap-2 whitespace-nowrap rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background transition-colors hover:bg-foreground/90 disabled:opacity-50",
339
+ children: J ? y("housingvista.properties.nlSearch.searching", "Searching…") : y("housingvista.properties.nlSearch.submit", "AI Search")
340
+ }), q && /* @__PURE__ */ p("button", {
341
+ type: "button",
342
+ onClick: rt,
343
+ className: "whitespace-nowrap text-sm text-text-secondary hover:text-text-primary",
344
+ children: y("housingvista.properties.nlSearch.clear", "Clear AI search")
345
+ })]
346
+ })]
347
+ }), q && !J && /* @__PURE__ */ m("div", {
348
+ className: "mt-3 flex flex-wrap items-center gap-2 text-xs",
349
+ children: [
350
+ /* @__PURE__ */ p("span", {
351
+ className: e("rounded-full px-2 py-0.5 font-medium", Y === "ai" ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-secondary"),
352
+ children: Y === "ai" ? y("housingvista.properties.nlSearch.methodAi", "AI-parsed") : y("housingvista.properties.nlSearch.methodKeyword", "Keyword baseline (no AI configured)")
353
+ }),
354
+ X?.city && /* @__PURE__ */ p("span", {
355
+ className: "rounded-full bg-bg-sunken px-2 py-0.5 text-text-secondary",
356
+ children: X.city
357
+ }),
358
+ X?.bedroomsMin != null && /* @__PURE__ */ m("span", {
359
+ className: "rounded-full bg-bg-sunken px-2 py-0.5 text-text-secondary",
360
+ children: [X.bedroomsMin, "+ bed"]
361
+ }),
362
+ X?.priceMax != null && /* @__PURE__ */ m("span", {
363
+ className: "rounded-full bg-bg-sunken px-2 py-0.5 text-text-secondary",
364
+ children: ["under ", X.priceMax.toLocaleString()]
365
+ }),
366
+ X?.priceMin != null && /* @__PURE__ */ m("span", {
367
+ className: "rounded-full bg-bg-sunken px-2 py-0.5 text-text-secondary",
368
+ children: ["over ", X.priceMin.toLocaleString()]
369
+ }),
370
+ X?.category && /* @__PURE__ */ p("span", {
371
+ className: "rounded-full bg-bg-sunken px-2 py-0.5 text-text-secondary",
372
+ children: X.category
373
+ }),
374
+ X?.amenities?.map((e) => /* @__PURE__ */ p("span", {
375
+ className: "rounded-full bg-bg-sunken px-2 py-0.5 text-text-secondary",
376
+ children: e
377
+ }, e))
378
+ ]
379
+ })]
380
+ }),
309
381
  /* @__PURE__ */ p(i, {
310
- searchValue: b,
311
- onSearchChange: x,
312
- searchPlaceholder: v("housingvista.properties.search.placeholder", "Search properties by name, city, or neighborhood..."),
382
+ searchValue: x,
383
+ onSearchChange: S,
384
+ searchPlaceholder: y("housingvista.properties.search.placeholder", "Search properties by name, city, or neighborhood..."),
313
385
  filters: /* @__PURE__ */ m("button", {
314
- onClick: () => Ne((e) => !e),
315
- className: e("inline-flex items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium transition-colors", F ? "bg-foreground text-background" : "text-text-primary hover:bg-bg-sunken"),
386
+ onClick: () => Fe((e) => !e),
387
+ className: e("inline-flex items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium transition-colors", Pe ? "bg-foreground text-background" : "text-text-primary hover:bg-bg-sunken"),
316
388
  children: [
317
- /* @__PURE__ */ p(pe, { className: "h-4 w-4" }),
318
- v("housingvista.properties.filters.toggle", "Filters"),
389
+ /* @__PURE__ */ p(me, { className: "h-4 w-4" }),
390
+ y("housingvista.properties.filters.toggle", "Filters"),
319
391
  Q && /* @__PURE__ */ p("span", {
320
392
  className: "flex h-5 w-5 items-center justify-center rounded-full bg-action-primary-bg text-[10px] font-bold text-action-primary-text",
321
393
  children: "!"
@@ -327,106 +399,106 @@ var Se = 9, h = () => {
327
399
  children: [
328
400
  /* @__PURE__ */ p("button", {
329
401
  onClick: () => I("grid"),
330
- className: e("rounded-md p-2 transition-colors", N === "grid" ? "bg-foreground text-background" : "text-text-secondary hover:text-text-primary hover:bg-bg-sunken"),
331
- children: /* @__PURE__ */ p(le, { className: "h-4 w-4" })
402
+ className: e("rounded-md p-2 transition-colors", P === "grid" ? "bg-foreground text-background" : "text-text-secondary hover:text-text-primary hover:bg-bg-sunken"),
403
+ children: /* @__PURE__ */ p(ue, { className: "h-4 w-4" })
332
404
  }),
333
405
  /* @__PURE__ */ p("button", {
334
406
  onClick: () => I("list"),
335
- className: e("rounded-md p-2 transition-colors", N === "list" ? "bg-foreground text-background" : "text-text-secondary hover:text-text-primary hover:bg-bg-sunken"),
336
- children: /* @__PURE__ */ p(ue, { className: "h-4 w-4" })
407
+ className: e("rounded-md p-2 transition-colors", P === "list" ? "bg-foreground text-background" : "text-text-secondary hover:text-text-primary hover:bg-bg-sunken"),
408
+ children: /* @__PURE__ */ p(de, { className: "h-4 w-4" })
337
409
  }),
338
410
  /* @__PURE__ */ p("button", {
339
411
  onClick: () => I("map"),
340
- "aria-label": v("housingvista.properties.viewMode.map", "Map view"),
341
- className: e("rounded-md p-2 transition-colors", N === "map" ? "bg-foreground text-background" : "text-text-secondary hover:text-text-primary hover:bg-bg-sunken"),
342
- children: /* @__PURE__ */ p(de, { className: "h-4 w-4" })
412
+ "aria-label": y("housingvista.properties.viewMode.map", "Map view"),
413
+ className: e("rounded-md p-2 transition-colors", P === "map" ? "bg-foreground text-background" : "text-text-secondary hover:text-text-primary hover:bg-bg-sunken"),
414
+ children: /* @__PURE__ */ p(fe, { className: "h-4 w-4" })
343
415
  })
344
416
  ]
345
417
  })
346
418
  }),
347
- F && /* @__PURE__ */ m("div", {
419
+ Pe && /* @__PURE__ */ m("div", {
348
420
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4",
349
421
  children: [/* @__PURE__ */ m("div", {
350
422
  className: "flex items-center justify-between mb-4",
351
423
  children: [/* @__PURE__ */ p("h3", {
352
424
  className: "text-sm font-medium text-text-primary",
353
- children: v("housingvista.properties.filters.title", "Filters")
425
+ children: y("housingvista.properties.filters.title", "Filters")
354
426
  }), Q && /* @__PURE__ */ m("button", {
355
427
  onClick: $,
356
428
  className: "inline-flex items-center gap-1 text-xs text-text-secondary hover:text-text-primary",
357
- children: [/* @__PURE__ */ p(me, { className: "h-3 w-3" }), v("housingvista.properties.filters.clearAll", "Clear All")]
429
+ children: [/* @__PURE__ */ p(ge, { className: "h-3 w-3" }), y("housingvista.properties.filters.clearAll", "Clear All")]
358
430
  })]
359
431
  }), /* @__PURE__ */ m("div", {
360
432
  className: "grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-6",
361
433
  children: [
362
434
  /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
363
435
  className: "mb-1.5 block text-xs font-medium text-text-secondary",
364
- children: v("housingvista.properties.filters.labels.propertyType", "Property Type")
436
+ children: y("housingvista.properties.filters.labels.propertyType", "Property Type")
365
437
  }), /* @__PURE__ */ p("select", {
366
- value: S,
367
- onChange: (e) => C(e.target.value),
438
+ value: C,
439
+ onChange: (e) => w(e.target.value),
368
440
  className: "h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
369
- children: De.map((e) => /* @__PURE__ */ p("option", {
441
+ children: Oe.map((e) => /* @__PURE__ */ p("option", {
370
442
  value: e.value,
371
443
  children: e.label
372
444
  }, e.value))
373
445
  })] }),
374
446
  /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
375
447
  className: "mb-1.5 block text-xs font-medium text-text-secondary",
376
- children: v("housingvista.properties.filters.labels.status", "Status")
448
+ children: y("housingvista.properties.filters.labels.status", "Status")
377
449
  }), /* @__PURE__ */ p("select", {
378
- value: w,
379
- onChange: (e) => T(e.target.value),
450
+ value: T,
451
+ onChange: (e) => E(e.target.value),
380
452
  className: "h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
381
- children: Oe.map((e) => /* @__PURE__ */ p("option", {
453
+ children: ke.map((e) => /* @__PURE__ */ p("option", {
382
454
  value: e.value,
383
455
  children: e.label
384
456
  }, e.value))
385
457
  })] }),
386
458
  /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
387
459
  className: "mb-1.5 block text-xs font-medium text-text-secondary",
388
- children: v("housingvista.properties.filters.labels.category", "Category")
460
+ children: y("housingvista.properties.filters.labels.category", "Category")
389
461
  }), /* @__PURE__ */ p("select", {
390
- value: E,
391
- onChange: (e) => D(e.target.value),
462
+ value: D,
463
+ onChange: (e) => O(e.target.value),
392
464
  className: "h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
393
- children: ke.map((e) => /* @__PURE__ */ p("option", {
465
+ children: Ae.map((e) => /* @__PURE__ */ p("option", {
394
466
  value: e.value,
395
467
  children: e.label
396
468
  }, e.value))
397
469
  })] }),
398
470
  /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
399
471
  className: "mb-1.5 block text-xs font-medium text-text-secondary",
400
- children: v("housingvista.properties.filters.labels.priceRange", "Price Range")
472
+ children: y("housingvista.properties.filters.labels.priceRange", "Price Range")
401
473
  }), /* @__PURE__ */ p("select", {
402
- value: O,
403
- onChange: (e) => k(e.target.value),
474
+ value: k,
475
+ onChange: (e) => A(e.target.value),
404
476
  className: "h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
405
- children: y.map((e) => /* @__PURE__ */ p("option", {
477
+ children: b.map((e) => /* @__PURE__ */ p("option", {
406
478
  value: e.value,
407
479
  children: e.label
408
480
  }, e.value))
409
481
  })] }),
410
482
  /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
411
483
  className: "mb-1.5 block text-xs font-medium text-text-secondary",
412
- children: v("housingvista.properties.filters.labels.bedrooms", "Bedrooms")
484
+ children: y("housingvista.properties.filters.labels.bedrooms", "Bedrooms")
413
485
  }), /* @__PURE__ */ p("select", {
414
- value: A,
415
- onChange: (e) => j(e.target.value),
486
+ value: j,
487
+ onChange: (e) => M(e.target.value),
416
488
  className: "h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
417
- children: Ae.map((e) => /* @__PURE__ */ p("option", {
489
+ children: je.map((e) => /* @__PURE__ */ p("option", {
418
490
  value: e.value,
419
491
  children: e.label
420
492
  }, e.value))
421
493
  })] }),
422
494
  /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
423
495
  className: "mb-1.5 block text-xs font-medium text-text-secondary",
424
- children: v("housingvista.properties.filters.labels.rera", "RERA")
496
+ children: y("housingvista.properties.filters.labels.rera", "RERA")
425
497
  }), /* @__PURE__ */ p("select", {
426
498
  value: L,
427
- onChange: (e) => R(e.target.value),
499
+ onChange: (e) => Re(e.target.value),
428
500
  className: "h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
429
- children: Fe.map((e) => /* @__PURE__ */ p("option", {
501
+ children: Le.map((e) => /* @__PURE__ */ p("option", {
430
502
  value: e.value,
431
503
  children: e.label
432
504
  }, e.value))
@@ -438,39 +510,48 @@ var Se = 9, h = () => {
438
510
  className: "flex items-center justify-between",
439
511
  children: [/* @__PURE__ */ p("p", {
440
512
  className: "text-sm text-text-secondary",
441
- children: N === "map" ? /* @__PURE__ */ m(f, { children: [
442
- v("housingvista.properties.results.showingOnMap", "Showing"),
513
+ children: q ? /* @__PURE__ */ m(f, { children: [
514
+ y("housingvista.properties.results.showing", "Showing"),
515
+ " ",
516
+ Z.length,
443
517
  " ",
444
- ze.length,
518
+ y("housingvista.properties.results.properties", "properties"),
519
+ " ·",
445
520
  " ",
446
- v("housingvista.properties.results.properties", "properties"),
447
- P ? ` · ${v("housingvista.properties.results.inThisArea", "in this area")}` : ""
521
+ y("housingvista.properties.nlSearch.resultsLabel", "AI search results")
522
+ ] }) : P === "map" ? /* @__PURE__ */ m(f, { children: [
523
+ y("housingvista.properties.results.showingOnMap", "Showing"),
524
+ " ",
525
+ Ge.length,
526
+ " ",
527
+ y("housingvista.properties.results.properties", "properties"),
528
+ F ? ` · ${y("housingvista.properties.results.inThisArea", "in this area")}` : ""
448
529
  ] }) : /* @__PURE__ */ m(f, { children: [
449
- v("housingvista.properties.results.showing", "Showing"),
530
+ y("housingvista.properties.results.showing", "Showing"),
450
531
  " ",
451
- Z.length,
532
+ Ze.length,
452
533
  " ",
453
- v("housingvista.properties.results.properties", "properties"),
454
- H > 1 ? ` · page ${H}` : ""
534
+ y("housingvista.properties.results.properties", "properties"),
535
+ V > 1 ? ` · page ${V}` : ""
455
536
  ] })
456
- }), Q && /* @__PURE__ */ p("button", {
537
+ }), !q && Q && /* @__PURE__ */ p("button", {
457
538
  onClick: $,
458
539
  className: "text-sm text-text-secondary hover:text-text-primary",
459
- children: v("housingvista.properties.results.clearFilters", "Clear Filters")
540
+ children: y("housingvista.properties.results.clearFilters", "Clear Filters")
460
541
  })]
461
542
  }),
462
- N === "map" && /* @__PURE__ */ p(ce, {
463
- properties: ze,
464
- loading: Be,
465
- selectedIds: X,
543
+ !q && P === "map" && /* @__PURE__ */ p(le, {
544
+ properties: Ge,
545
+ loading: Ke,
546
+ selectedIds: G,
466
547
  onSelectProperty: (e) => h(e),
467
- onSearchThisArea: Pe
548
+ onSearchThisArea: Ie
468
549
  }),
469
- N === "map" ? null : q ? /* @__PURE__ */ p(a, {
550
+ !q && P === "map" ? null : it ? /* @__PURE__ */ p(a, {
470
551
  variant: "card",
471
552
  count: 6
472
553
  }) : Z.length > 0 ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("div", {
473
- className: e(N === "grid" ? "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3" : "space-y-4"),
554
+ className: e(q || P === "grid" ? "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3" : "space-y-4"),
474
555
  children: Z.map((e) => /* @__PURE__ */ p(ee, {
475
556
  id: e.id,
476
557
  title: e.title,
@@ -486,27 +567,27 @@ var Se = 9, h = () => {
486
567
  status: e.status.replace("_", " "),
487
568
  type: e.category,
488
569
  onClick: () => h(e.id),
489
- isShortlisted: X.has(e.id),
490
- onToggleShortlist: () => Ue(e.id),
570
+ isShortlisted: G.has(e.id),
571
+ onToggleShortlist: () => Xe(e.id),
491
572
  reraStatus: e.reraVerificationStatus
492
573
  }, e.id))
493
- }), /* @__PURE__ */ p(ye, {
494
- page: H,
495
- pageSize: U,
496
- hasNextPage: We,
497
- hasPreviousPage: H > 1,
498
- loading: q,
499
- onPageChange: W,
500
- onPageSizeChange: Re
574
+ }), !q && /* @__PURE__ */ p(xe, {
575
+ page: V,
576
+ pageSize: Be,
577
+ hasNextPage: at,
578
+ hasPreviousPage: V > 1,
579
+ loading: We,
580
+ onPageChange: H,
581
+ onPageSizeChange: He
501
582
  })] }) : /* @__PURE__ */ p(r, {
502
583
  illustration: "empty-search",
503
584
  icon: /* @__PURE__ */ p(d, { className: "h-12 w-12" }),
504
- title: v("housingvista.properties.empty.title", "No properties found"),
505
- description: v("housingvista.properties.empty.description", "Try adjusting your search criteria or filters to find more properties."),
585
+ title: y("housingvista.properties.empty.title", "No properties found"),
586
+ description: q ? y("housingvista.properties.nlSearch.emptyDescription", "No properties matched that search. Try rephrasing your query.") : y("housingvista.properties.empty.description", "Try adjusting your search criteria or filters to find more properties."),
506
587
  action: /* @__PURE__ */ p("button", {
507
- onClick: $,
588
+ onClick: q ? rt : $,
508
589
  className: "rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background transition-colors hover:bg-foreground/90",
509
- children: v("housingvista.properties.empty.clearAllFilters", "Clear All Filters")
590
+ children: q ? y("housingvista.properties.nlSearch.clear", "Clear AI search") : y("housingvista.properties.empty.clearAllFilters", "Clear All Filters")
510
591
  })
511
592
  })
512
593
  ]