@burdenoff/microfe-housingvista 2026.1123.1 → 2026.1127.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.
@@ -15,13 +15,13 @@ import { notify as i } from "../../lib/toast.js";
15
15
  import { cn as a, formatNumber as fe } from "../../utils/helpers.js";
16
16
  import { PropertyMapView as pe } from "../../components/maps/PropertyMapView.js";
17
17
  import { amenityOptions as o } from "../../utils/amenities.js";
18
- import { useEffect as s, useMemo as c, useState as l } from "react";
19
- import { Building as me, Grid as he, List as ge, Map as _e, Plus as ve, SlidersHorizontal as ye, Sparkles as be, X as xe } from "lucide-react";
20
- import { useNavigate as Se, useSearchParams as Ce } from "react-router";
21
- import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
22
- import { EmphasisPanel as we, Pagination as Te } from "@burdenoff/fe-libs/ui";
18
+ import { useEffect as s, useMemo as me, useState as c } from "react";
19
+ import { Building as he, Grid as ge, List as _e, Map as ve, Plus as ye, SlidersHorizontal as be, Sparkles as xe, X as Se } from "lucide-react";
20
+ import { useNavigate as Ce, useSearchParams as we } from "react-router";
21
+ import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
22
+ import { EmphasisPanel as Te, Pagination as Ee } from "@burdenoff/fe-libs/ui";
23
23
  // src/housingvista/pages/properties/PropertiesPage.tsx
24
- function Ee(e) {
24
+ function De(e) {
25
25
  return [
26
26
  e.neLat,
27
27
  e.neLng,
@@ -29,7 +29,7 @@ function Ee(e) {
29
29
  e.swLng
30
30
  ].map((e) => e.toFixed(5)).join(",");
31
31
  }
32
- function De(e) {
32
+ function Oe(e) {
33
33
  if (!e) return;
34
34
  let t = e.split(",").map(Number);
35
35
  if (t.length !== 4 || t.some((e) => Number.isNaN(e))) return;
@@ -41,135 +41,135 @@ function De(e) {
41
41
  swLng: te
42
42
  };
43
43
  }
44
- var Oe = 9, p = () => {
45
- let p = Se(), [m, ke] = Ce(), h = e(), { emit: Ae, emitResource: je, emitSearch: Me } = ue();
44
+ var ke = 9, f = () => {
45
+ let f = Ce(), [p, Ae] = we(), m = e(), { emit: je, emitResource: Me, emitSearch: Ne } = ue();
46
46
  de("housingvista.property.viewed");
47
- let Ne = [
47
+ let Pe = [
48
48
  {
49
49
  value: "all",
50
- label: h("housingvista.properties.filters.propertyTypes.all", "All Types")
50
+ label: m("housingvista.properties.filters.propertyTypes.all", "All Types")
51
51
  },
52
52
  {
53
53
  value: "residential",
54
- label: h("housingvista.properties.filters.propertyTypes.residential", "Residential")
54
+ label: m("housingvista.properties.filters.propertyTypes.residential", "Residential")
55
55
  },
56
56
  {
57
57
  value: "commercial",
58
- label: h("housingvista.properties.filters.propertyTypes.commercial", "Commercial")
58
+ label: m("housingvista.properties.filters.propertyTypes.commercial", "Commercial")
59
59
  },
60
60
  {
61
61
  value: "industrial",
62
- label: h("housingvista.properties.filters.propertyTypes.industrial", "Industrial")
62
+ label: m("housingvista.properties.filters.propertyTypes.industrial", "Industrial")
63
63
  },
64
64
  {
65
65
  value: "agricultural",
66
- label: h("housingvista.properties.filters.propertyTypes.agricultural", "Agricultural")
66
+ label: m("housingvista.properties.filters.propertyTypes.agricultural", "Agricultural")
67
67
  },
68
68
  {
69
69
  value: "mixed_use",
70
- label: h("housingvista.properties.filters.propertyTypes.mixedUse", "Mixed Use")
70
+ label: m("housingvista.properties.filters.propertyTypes.mixedUse", "Mixed Use")
71
71
  }
72
- ], Pe = [
72
+ ], Fe = [
73
73
  {
74
74
  value: "all",
75
- label: h("housingvista.properties.filters.propertyStatuses.all", "All Status")
75
+ label: m("housingvista.properties.filters.propertyStatuses.all", "All Status")
76
76
  },
77
77
  {
78
78
  value: "for_sale",
79
- label: h("housingvista.properties.filters.propertyStatuses.forSale", "For Sale")
79
+ label: m("housingvista.properties.filters.propertyStatuses.forSale", "For Sale")
80
80
  },
81
81
  {
82
82
  value: "for_rent",
83
- label: h("housingvista.properties.filters.propertyStatuses.forRent", "For Rent")
83
+ label: m("housingvista.properties.filters.propertyStatuses.forRent", "For Rent")
84
84
  },
85
85
  {
86
86
  value: "sold",
87
- label: h("housingvista.properties.filters.propertyStatuses.sold", "Sold")
87
+ label: m("housingvista.properties.filters.propertyStatuses.sold", "Sold")
88
88
  },
89
89
  {
90
90
  value: "rented",
91
- label: h("housingvista.properties.filters.propertyStatuses.rented", "Rented")
91
+ label: m("housingvista.properties.filters.propertyStatuses.rented", "Rented")
92
92
  },
93
93
  {
94
94
  value: "under_contract",
95
- label: h("housingvista.properties.filters.propertyStatuses.underContract", "Under Contract")
95
+ label: m("housingvista.properties.filters.propertyStatuses.underContract", "Under Contract")
96
96
  },
97
97
  {
98
98
  value: "off_market",
99
- label: h("housingvista.properties.filters.propertyStatuses.offMarket", "Off Market")
99
+ label: m("housingvista.properties.filters.propertyStatuses.offMarket", "Off Market")
100
100
  }
101
- ], Fe = [
101
+ ], Ie = [
102
102
  {
103
103
  value: "all",
104
- label: h("housingvista.properties.filters.propertyCategories.all", "All Categories")
104
+ label: m("housingvista.properties.filters.propertyCategories.all", "All Categories")
105
105
  },
106
106
  {
107
107
  value: "apartment",
108
- label: h("housingvista.properties.filters.propertyCategories.apartment", "Apartment")
108
+ label: m("housingvista.properties.filters.propertyCategories.apartment", "Apartment")
109
109
  },
110
110
  {
111
111
  value: "house",
112
- label: h("housingvista.properties.filters.propertyCategories.house", "House")
112
+ label: m("housingvista.properties.filters.propertyCategories.house", "House")
113
113
  },
114
114
  {
115
115
  value: "villa",
116
- label: h("housingvista.properties.filters.propertyCategories.villa", "Villa")
116
+ label: m("housingvista.properties.filters.propertyCategories.villa", "Villa")
117
117
  },
118
118
  {
119
119
  value: "office",
120
- label: h("housingvista.properties.filters.propertyCategories.office", "Office")
120
+ label: m("housingvista.properties.filters.propertyCategories.office", "Office")
121
121
  },
122
122
  {
123
123
  value: "retail",
124
- label: h("housingvista.properties.filters.propertyCategories.retail", "Retail")
124
+ label: m("housingvista.properties.filters.propertyCategories.retail", "Retail")
125
125
  },
126
126
  {
127
127
  value: "warehouse",
128
- label: h("housingvista.properties.filters.propertyCategories.warehouse", "Warehouse")
128
+ label: m("housingvista.properties.filters.propertyCategories.warehouse", "Warehouse")
129
129
  },
130
130
  {
131
131
  value: "land",
132
- label: h("housingvista.properties.filters.propertyCategories.land", "Land")
132
+ label: m("housingvista.properties.filters.propertyCategories.land", "Land")
133
133
  },
134
134
  {
135
135
  value: "plot",
136
- label: h("housingvista.properties.filters.propertyCategories.plot", "Plot")
136
+ label: m("housingvista.properties.filters.propertyCategories.plot", "Plot")
137
137
  }
138
- ], g = [
138
+ ], h = [
139
139
  {
140
140
  value: "all",
141
- label: h("housingvista.properties.filters.priceRanges.all", "Any Price"),
141
+ label: m("housingvista.properties.filters.priceRanges.all", "Any Price"),
142
142
  min: 0,
143
143
  max: Infinity
144
144
  },
145
145
  {
146
146
  value: "under_100k",
147
- label: h("housingvista.properties.filters.priceRanges.under100k", "Under $100K"),
147
+ label: m("housingvista.properties.filters.priceRanges.under100k", "Under $100K"),
148
148
  min: 0,
149
149
  max: 1e5
150
150
  },
151
151
  {
152
152
  value: "100k_500k",
153
- label: h("housingvista.properties.filters.priceRanges.100kTo500k", "$100K - $500K"),
153
+ label: m("housingvista.properties.filters.priceRanges.100kTo500k", "$100K - $500K"),
154
154
  min: 1e5,
155
155
  max: 5e5
156
156
  },
157
157
  {
158
158
  value: "500k_1m",
159
- label: h("housingvista.properties.filters.priceRanges.500kTo1m", "$500K - $1M"),
159
+ label: m("housingvista.properties.filters.priceRanges.500kTo1m", "$500K - $1M"),
160
160
  min: 5e5,
161
161
  max: 1e6
162
162
  },
163
163
  {
164
164
  value: "over_1m",
165
- label: h("housingvista.properties.filters.priceRanges.over1m", "Over $1M"),
165
+ label: m("housingvista.properties.filters.priceRanges.over1m", "Over $1M"),
166
166
  min: 1e6,
167
167
  max: Infinity
168
168
  }
169
- ], Ie = [
169
+ ], Le = [
170
170
  {
171
171
  value: "all",
172
- label: h("housingvista.properties.filters.bedrooms.all", "Any Bedrooms")
172
+ label: m("housingvista.properties.filters.bedrooms.all", "Any Bedrooms")
173
173
  },
174
174
  {
175
175
  value: "1",
@@ -191,52 +191,58 @@ var Oe = 9, p = () => {
191
191
  value: "5",
192
192
  label: "5+"
193
193
  }
194
- ], [_, Le] = l(""), [v, y] = l("all"), [b, x] = l("all"), [S, Re] = l("all"), [ze, C] = l("all"), [w, T] = l("all"), E = m.get("view"), [D, Be] = l(E === "map" || E === "list" ? E : "grid"), [O, Ve] = l(() => De(m.get("bounds"))), [He, Ue] = l(!1), k = (e) => {
195
- Be(e);
196
- let t = new URLSearchParams(m);
197
- e === "grid" ? t.delete("view") : t.set("view", e), e !== "map" && t.delete("bounds"), ke(t, { replace: !0 });
198
- }, We = (e) => {
199
- Ve(e);
200
- let t = new URLSearchParams(m);
201
- t.set("view", "map"), t.set("bounds", Ee(e)), ke(t, { replace: !0 });
194
+ ], [g, Re] = c(""), [_, v] = c("all"), [y, b] = c("all"), [x, S] = c("all"), [ze, Be] = c("all"), [C, w] = c("all"), [Ve, T] = c(null), E = p.get("view"), [D, He] = c(E === "map" || E === "list" ? E : "grid"), [O, Ue] = c(() => Oe(p.get("bounds"))), [We, Ge] = c(!1), k = (e) => {
195
+ He(e);
196
+ let t = new URLSearchParams(p);
197
+ e === "grid" ? t.delete("view") : t.set("view", e), e !== "map" && t.delete("bounds"), Ae(t, { replace: !0 });
198
+ }, Ke = (e) => {
199
+ Ue(e);
200
+ let t = new URLSearchParams(p);
201
+ t.set("view", "map"), t.set("bounds", De(e)), Ae(t, { replace: !0 });
202
202
  }, A = [
203
203
  {
204
204
  value: "all",
205
- label: h("housingvista.properties.filters.rera.all", "Any RERA status")
205
+ label: m("housingvista.properties.filters.rera.all", "Any RERA status")
206
206
  },
207
207
  {
208
208
  value: "verified",
209
- label: h("housingvista.properties.filters.rera.verified", "RERA Verified")
209
+ label: m("housingvista.properties.filters.rera.verified", "RERA Verified")
210
210
  },
211
211
  {
212
212
  value: "pending",
213
- label: h("housingvista.properties.filters.rera.pending", "RERA Pending")
213
+ label: m("housingvista.properties.filters.rera.pending", "RERA Pending")
214
214
  },
215
215
  {
216
216
  value: "not_applicable",
217
- label: h("housingvista.properties.filters.rera.notApplicable", "Not RERA-applicable")
217
+ label: m("housingvista.properties.filters.rera.notApplicable", "Not RERA-applicable")
218
218
  },
219
219
  {
220
220
  value: "rejected",
221
- label: h("housingvista.properties.filters.rera.rejected", "RERA Rejected")
221
+ label: m("housingvista.properties.filters.rera.rejected", "RERA Rejected")
222
222
  }
223
- ], [j, M] = l("all"), [N, P] = l([]), Ge = (e) => {
223
+ ], [j, M] = c("all"), [N, P] = c([]), qe = (e) => {
224
224
  P((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
225
- }, F = g.find((e) => e.value === ze) ?? g[0], I = w === "all" ? 0 : Number(w), [L, Ke] = l("");
225
+ }, F = h.find((e) => e.value === ze) ?? h[0], I = C === "all" ? 0 : Number(C), [L, Je] = c("");
226
226
  s(() => {
227
- let e = setTimeout(() => Ke(_), 300);
227
+ let e = setTimeout(() => Je(g), 300);
228
228
  return () => clearTimeout(e);
229
- }, [_]), s(() => {
230
- L.trim() && Me("properties");
229
+ }, [g]), s(() => {
230
+ L.trim() && Ne("properties");
231
231
  }, [L]);
232
- let { page: R, pageSize: qe, pagination: Je, setPage: z, setPageSize: Ye } = le(Oe), [B, V] = l(null), H = c(() => {
232
+ let { page: R, pageSize: Ye, pagination: Xe, setPage: z, setPageSize: Ze } = le(ke), [B, V] = c(null), H = Ve ?? B?.city ?? "", [U, Qe] = c("");
233
+ s(() => {
234
+ let e = setTimeout(() => Qe(H.trim()), 300);
235
+ return () => clearTimeout(e);
236
+ }, [H]);
237
+ let W = me(() => {
233
238
  let e = {};
234
- return L.trim() && (e.search = L.trim()), b !== "all" && (e.status = b), v !== "all" && (e.type = v), S !== "all" && (e.category = S), F.min > 0 && (e.priceMin = F.min), Number.isFinite(F.max) && (e.priceMax = F.max), I > 0 && (e.bedroomsMin = I), j !== "all" && (e.reraVerificationStatus = j), N.length > 0 && (e.amenities = N.map((e) => o.find((t) => t.id === e)?.label ?? e)), B && (e.status == null && B.status != null && (e.status = B.status), e.type == null && B.type != null && (e.type = B.type), e.category == null && B.category != null && (e.category = B.category), e.bedroomsMin == null && B.bedroomsMin != null && (e.bedroomsMin = B.bedroomsMin), e.reraVerificationStatus == null && B.reraVerificationStatus != null && (e.reraVerificationStatus = B.reraVerificationStatus), e.priceMin == null && e.priceMax == null && (B.priceMin != null && (e.priceMin = B.priceMin), B.priceMax != null && (e.priceMax = B.priceMax)), B.city && (e.city = B.city), e.amenities == null && B.amenities?.length && (e.amenities = B.amenities)), Object.keys(e).length > 0 ? e : void 0;
239
+ return L.trim() && (e.search = L.trim()), U && (e.city = U), y !== "all" && (e.status = y), _ !== "all" && (e.type = _), x !== "all" && (e.category = x), F.min > 0 && (e.priceMin = F.min), Number.isFinite(F.max) && (e.priceMax = F.max), I > 0 && (e.bedroomsMin = I), j !== "all" && (e.reraVerificationStatus = j), N.length > 0 && (e.amenities = N.map((e) => o.find((t) => t.id === e)?.label ?? e)), B && (e.status == null && B.status != null && (e.status = B.status), e.type == null && B.type != null && (e.type = B.type), e.category == null && B.category != null && (e.category = B.category), e.bedroomsMin == null && B.bedroomsMin != null && (e.bedroomsMin = B.bedroomsMin), e.reraVerificationStatus == null && B.reraVerificationStatus != null && (e.reraVerificationStatus = B.reraVerificationStatus), e.priceMin == null && e.priceMax == null && (B.priceMin != null && (e.priceMin = B.priceMin), B.priceMax != null && (e.priceMax = B.priceMax)), e.amenities == null && B.amenities?.length && (e.amenities = B.amenities)), Object.keys(e).length > 0 ? e : void 0;
235
240
  }, [
236
241
  L,
237
- b,
238
- v,
239
- S,
242
+ U,
243
+ y,
244
+ _,
245
+ x,
240
246
  F,
241
247
  I,
242
248
  j,
@@ -245,108 +251,111 @@ var Oe = 9, p = () => {
245
251
  ]);
246
252
  s(() => {
247
253
  z(1);
248
- }, [H, z]);
249
- let { data: Xe, loading: Ze } = ae({
250
- filter: H,
251
- pagination: Je,
254
+ }, [W, z]);
255
+ let { data: $e, loading: et } = ae({
256
+ filter: W,
257
+ pagination: Xe,
252
258
  skip: D === "map"
253
- }), Qe = c(() => O ? {
254
- ...H ?? {},
259
+ }), tt = me(() => O ? {
260
+ ...W ?? {},
255
261
  bounds: O
256
- } : H, [H, O]), { data: $e, loading: et } = ae({
257
- filter: Qe,
262
+ } : W, [W, O]), { data: nt, loading: rt } = ae({
263
+ filter: tt,
258
264
  pagination: {
259
265
  limit: 200,
260
266
  offset: 0
261
267
  },
262
268
  skip: D !== "map"
263
- }), { data: U } = re(), { data: tt } = ce(), { saveShortlist: nt } = se(), { removeShortlist: rt } = oe(), W = c(() => new Set(tt.map((e) => e.propertyId)), [tt]), it = async (e) => {
269
+ }), { data: G } = re(), { data: it } = ce(), { saveShortlist: at } = se(), { removeShortlist: ot } = oe(), K = me(() => new Set(it.map((e) => e.propertyId)), [it]), st = async (e) => {
264
270
  try {
265
- W.has(e) ? (await rt(e), i.success("Removed from shortlist")) : (await nt(e), je("housingvista.shortlist.property_added", e), i.success("Saved to shortlist"));
271
+ K.has(e) ? (await ot(e), i.success("Removed from shortlist")) : (await at(e), Me("housingvista.shortlist.property_added", e), i.success("Saved to shortlist"));
266
272
  } catch (e) {
267
273
  i.error("Could not update shortlist", e.message);
268
274
  }
269
- }, at = Xe, [G, ot] = l(""), [K, q] = l(!1), { search: st, loading: J, method: Y, fallbackReason: ct, filter: X, properties: lt } = ie();
275
+ }, ct = $e, [q, lt] = c(""), [J, ut] = c(!1), { search: dt, loading: Y, method: X, fallbackReason: ft, filter: Z, properties: pt } = ie();
270
276
  s(() => {
271
- K && Y && Ae(Y === "ai" ? "housingvista.nlsearch.ai_used" : "housingvista.nlsearch.fallback_used");
272
- }, [Y]);
273
- let ut = (e) => {
277
+ J && X && je(X === "ai" ? "housingvista.nlsearch.ai_used" : "housingvista.nlsearch.fallback_used");
278
+ }, [X]);
279
+ let mt = (e) => {
274
280
  e.preventDefault();
275
- let t = G.trim();
276
- t && (q(!0), Me("properties.natural_language"), st(t));
277
- }, dt = () => {
278
- q(!1), ot(""), V(null);
279
- }, Z = (e, t) => e.find((e) => e.value === t)?.label ?? t.replace(/[-_]/g, " "), ft = (e) => {
281
+ let t = q.trim();
282
+ t && (ut(!0), Ne("properties.natural_language"), dt(t));
283
+ }, ht = () => {
284
+ ut(!1), lt(""), V(null);
285
+ }, Q = (e, t) => e.find((e) => e.value === t)?.label ?? t.replace(/[-_]/g, " "), gt = (e) => {
280
286
  if (!e) return [];
281
287
  let t = [];
282
288
  e.city && t.push({
283
289
  key: "city",
284
- label: h("housingvista.properties.chips.city", "City"),
290
+ label: m("housingvista.properties.chips.city", "City"),
285
291
  value: e.city
286
292
  }), e.bedroomsMin != null && t.push({
287
293
  key: "bedroomsMin",
288
- label: h("housingvista.properties.chips.bedrooms", "Bedrooms"),
294
+ label: m("housingvista.properties.chips.bedrooms", "Bedrooms"),
289
295
  value: `${e.bedroomsMin}+`
290
296
  }), e.priceMin != null && t.push({
291
297
  key: "priceMin",
292
- label: h("housingvista.properties.chips.minPrice", "Min price"),
298
+ label: m("housingvista.properties.chips.minPrice", "Min price"),
293
299
  value: fe(e.priceMin)
294
300
  }), e.priceMax != null && t.push({
295
301
  key: "priceMax",
296
- label: h("housingvista.properties.chips.maxPrice", "Max price"),
302
+ label: m("housingvista.properties.chips.maxPrice", "Max price"),
297
303
  value: fe(e.priceMax)
298
304
  }), e.type && t.push({
299
305
  key: "type",
300
- label: h("housingvista.properties.chips.type", "Type"),
301
- value: Z(Ne, e.type)
306
+ label: m("housingvista.properties.chips.type", "Type"),
307
+ value: Q(Pe, e.type)
302
308
  }), e.category && t.push({
303
309
  key: "category",
304
- label: h("housingvista.properties.chips.category", "Category"),
305
- value: Z(Fe, e.category)
310
+ label: m("housingvista.properties.chips.category", "Category"),
311
+ value: Q(Ie, e.category)
306
312
  }), e.status && t.push({
307
313
  key: "status",
308
- label: h("housingvista.properties.chips.status", "Status"),
309
- value: Z(Pe, e.status)
314
+ label: m("housingvista.properties.chips.status", "Status"),
315
+ value: Q(Fe, e.status)
310
316
  }), e.reraVerificationStatus && t.push({
311
317
  key: "reraVerificationStatus",
312
- label: h("housingvista.properties.chips.rera", "RERA"),
313
- value: Z(A, e.reraVerificationStatus)
318
+ label: m("housingvista.properties.chips.rera", "RERA"),
319
+ value: Q(A, e.reraVerificationStatus)
314
320
  });
315
321
  for (let n of e.amenities ?? []) t.push({
316
322
  key: `amenity:${n}`,
317
- label: h("housingvista.properties.chips.amenity", "Amenity"),
323
+ label: m("housingvista.properties.chips.amenity", "Amenity"),
318
324
  value: n
319
325
  });
320
326
  return t;
321
- }, pt = (e, t) => {
327
+ }, _t = (e, t) => {
322
328
  let n = {};
323
- if (e.city && t !== "city" && (n.city = e.city), e.type && t !== "type" && (n.type = e.type), e.status && t !== "status" && (n.status = e.status), e.category && t !== "category" && (n.category = e.category), e.priceMin != null && t !== "priceMin" && (n.priceMin = e.priceMin), e.priceMax != null && t !== "priceMax" && (n.priceMax = e.priceMax), e.bedroomsMin != null && t !== "bedroomsMin" && (n.bedroomsMin = e.bedroomsMin), t !== "reraVerificationStatus") {
329
+ if (T(t === "city" ? "" : (e) => e?.trim() ? e : null), e.city && t !== "city" && (n.city = e.city), e.type && t !== "type" && (n.type = e.type), e.status && t !== "status" && (n.status = e.status), e.category && t !== "category" && (n.category = e.category), e.priceMin != null && t !== "priceMin" && (n.priceMin = e.priceMin), e.priceMax != null && t !== "priceMax" && (n.priceMax = e.priceMax), e.bedroomsMin != null && t !== "bedroomsMin" && (n.bedroomsMin = e.bedroomsMin), t !== "reraVerificationStatus") {
324
330
  let t = A.find((t) => t.value === e.reraVerificationStatus);
325
331
  t && t.value !== "all" && (n.reraVerificationStatus = t.value);
326
332
  }
327
333
  let r = (e.amenities ?? []).filter((e) => t !== `amenity:${e}`);
328
- r.length > 0 && (n.amenities = r), V(Object.keys(n).length > 0 ? n : null), q(!1), Ue(!0);
329
- }, mt = (e) => {
330
- if (K && X) pt(X, e);
334
+ r.length > 0 && (n.amenities = r), V(Object.keys(n).length > 0 ? n : null), ut(!1), Ge(!0);
335
+ }, vt = (e) => {
336
+ if (J && Z) _t(Z, e);
331
337
  else {
332
338
  switch (e) {
339
+ case "city":
340
+ T("");
341
+ break;
333
342
  case "type":
334
- y("all");
343
+ v("all");
335
344
  break;
336
345
  case "status":
337
- x("all");
346
+ b("all");
338
347
  break;
339
348
  case "category":
340
- Re("all");
349
+ S("all");
341
350
  break;
342
351
  case "bedroomsMin":
343
- T("all");
352
+ w("all");
344
353
  break;
345
354
  case "reraVerificationStatus":
346
355
  M("all");
347
356
  break;
348
357
  case "priceMin":
349
- case "priceMax": C("all");
358
+ case "priceMax": Be("all");
350
359
  }
351
360
  if (e.startsWith("amenity:")) {
352
361
  let t = e.slice(8);
@@ -363,337 +372,350 @@ var Oe = 9, p = () => {
363
372
  return Object.keys(n).length > 0 ? n : null;
364
373
  });
365
374
  }
366
- }, ht = (e) => e.map((e) => `${e.label.toLowerCase()} ${e.value}`).join(", "), Q = ft(K ? X : H), gt = (K && !J || B !== null) && Q.length > 0, $ = K ? lt : at, _t = K ? J : Ze, vt = Xe.length >= qe, yt = _ || v !== "all" || b !== "all" || S !== "all" || ze !== "all" || w !== "all" || j !== "all" || N.length > 0 || B !== null, bt = () => {
367
- Le(""), y("all"), x("all"), Re("all"), C("all"), T("all"), M("all"), P([]), V(null);
375
+ }, yt = (e) => e.map((e) => `${e.label.toLowerCase()} ${e.value}`).join(", "), $ = gt(J ? Z : W), bt = (J && !Y || B !== null) && $.length > 0, xt = J ? pt : ct, St = J ? Y : et, Ct = $e.length >= Ye, wt = g || H.trim() || _ !== "all" || y !== "all" || x !== "all" || ze !== "all" || C !== "all" || j !== "all" || N.length > 0 || B !== null, Tt = () => {
376
+ Re(""), T(null), v("all"), b("all"), S("all"), Be("all"), w("all"), M("all"), P([]), V(null);
368
377
  };
369
- return /* @__PURE__ */ f(t, {
370
- title: h("housingvista.properties.title", "Properties"),
371
- description: h("housingvista.properties.description", "Discover your perfect property from our comprehensive listings"),
372
- purpose: h("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."),
373
- actions: /* @__PURE__ */ f("button", {
378
+ return /* @__PURE__ */ d(t, {
379
+ title: m("housingvista.properties.title", "Properties"),
380
+ description: m("housingvista.properties.description", "Discover your perfect property from our comprehensive listings"),
381
+ purpose: m("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."),
382
+ actions: /* @__PURE__ */ d("button", {
374
383
  onClick: () => {
375
- Ae("housingvista.property.create_clicked"), p("new");
384
+ je("housingvista.property.create_clicked"), f("new");
376
385
  },
377
386
  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",
378
- children: [/* @__PURE__ */ d(ve, { className: "h-4 w-4" }), h("housingvista.properties.actions.addProperty", "Add Property")]
387
+ children: [/* @__PURE__ */ u(ye, { className: "h-4 w-4" }), m("housingvista.properties.actions.addProperty", "Add Property")]
379
388
  }),
380
389
  children: [
381
- /* @__PURE__ */ d(we, {
390
+ /* @__PURE__ */ u(Te, {
382
391
  className: "p-4",
383
- children: /* @__PURE__ */ f("div", {
392
+ children: /* @__PURE__ */ d("div", {
384
393
  className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
385
394
  children: [
386
- /* @__PURE__ */ d(n, {
387
- label: h("housingvista.properties.stats.totalProperties", "Total Properties"),
388
- value: U.totalProperties,
389
- icon: /* @__PURE__ */ d(me, { className: "h-5 w-5" })
395
+ /* @__PURE__ */ u(n, {
396
+ label: m("housingvista.properties.stats.totalProperties", "Total Properties"),
397
+ value: G.totalProperties,
398
+ icon: /* @__PURE__ */ u(he, { className: "h-5 w-5" })
390
399
  }),
391
- /* @__PURE__ */ d(n, {
392
- label: h("housingvista.properties.stats.portfolioValue", "Portfolio Value"),
393
- value: U.totalValue,
400
+ /* @__PURE__ */ u(n, {
401
+ label: m("housingvista.properties.stats.portfolioValue", "Portfolio Value"),
402
+ value: G.totalValue,
394
403
  prefix: "$"
395
404
  }),
396
- /* @__PURE__ */ d(n, {
397
- label: h("housingvista.properties.stats.occupancyRate", "Occupancy Rate"),
398
- value: U.occupancyRate,
405
+ /* @__PURE__ */ u(n, {
406
+ label: m("housingvista.properties.stats.occupancyRate", "Occupancy Rate"),
407
+ value: G.occupancyRate,
399
408
  unit: "%"
400
409
  }),
401
- /* @__PURE__ */ d(n, {
402
- label: h("housingvista.properties.stats.monthlyRevenue", "Monthly Revenue"),
403
- value: U.monthlyRevenue,
410
+ /* @__PURE__ */ u(n, {
411
+ label: m("housingvista.properties.stats.monthlyRevenue", "Monthly Revenue"),
412
+ value: G.monthlyRevenue,
404
413
  prefix: "$"
405
414
  })
406
415
  ]
407
416
  })
408
417
  }),
409
- /* @__PURE__ */ f("div", {
418
+ /* @__PURE__ */ d("div", {
410
419
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4",
411
420
  children: [
412
- /* @__PURE__ */ f("form", {
413
- onSubmit: ut,
421
+ /* @__PURE__ */ d("form", {
422
+ onSubmit: mt,
414
423
  className: "flex flex-col gap-2 sm:flex-row sm:items-center",
415
- children: [/* @__PURE__ */ f("div", {
424
+ children: [/* @__PURE__ */ d("div", {
416
425
  className: "flex flex-1 items-center gap-2",
417
- children: [/* @__PURE__ */ d(be, { className: "h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ d("input", {
426
+ children: [/* @__PURE__ */ u(xe, { className: "h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ u("input", {
418
427
  type: "text",
419
- value: G,
420
- onChange: (e) => ot(e.target.value),
421
- placeholder: h("housingvista.properties.nlSearch.placeholder", "Try \"2 bedroom apartment near downtown under $2000 with parking\""),
428
+ value: q,
429
+ onChange: (e) => lt(e.target.value),
430
+ placeholder: m("housingvista.properties.nlSearch.placeholder", "Try \"2 bedroom apartment near downtown under $2000 with parking\""),
422
431
  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)]"
423
432
  })]
424
- }), /* @__PURE__ */ f("div", {
433
+ }), /* @__PURE__ */ d("div", {
425
434
  className: "flex items-center gap-3",
426
- children: [/* @__PURE__ */ d("button", {
435
+ children: [/* @__PURE__ */ u("button", {
427
436
  type: "submit",
428
- disabled: !G.trim() || J,
437
+ disabled: !q.trim() || Y,
429
438
  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",
430
- children: J ? h("housingvista.properties.nlSearch.searching", "Searching…") : h("housingvista.properties.nlSearch.submit", "AI Search")
431
- }), (K || B !== null) && /* @__PURE__ */ d("button", {
439
+ children: Y ? m("housingvista.properties.nlSearch.searching", "Searching…") : m("housingvista.properties.nlSearch.submit", "AI Search")
440
+ }), (J || B !== null) && /* @__PURE__ */ u("button", {
432
441
  type: "button",
433
- onClick: dt,
442
+ onClick: ht,
434
443
  className: "whitespace-nowrap text-sm text-text-secondary hover:text-text-primary",
435
- children: h("housingvista.properties.nlSearch.clear", "Clear AI search")
444
+ children: m("housingvista.properties.nlSearch.clear", "Clear AI search")
436
445
  })]
437
446
  })]
438
447
  }),
439
- K && !J && /* @__PURE__ */ f("div", {
448
+ J && !Y && /* @__PURE__ */ d("div", {
440
449
  className: "mt-3 flex flex-wrap items-center gap-2 text-xs",
441
- children: [/* @__PURE__ */ d("span", {
442
- className: a("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"),
443
- children: Y === "ai" ? h("housingvista.properties.nlSearch.methodAi", "AI-parsed") : h("housingvista.properties.nlSearch.methodKeyword", "Keyword baseline (no AI configured)")
444
- }), ct && /* @__PURE__ */ d("span", {
450
+ children: [/* @__PURE__ */ u("span", {
451
+ className: a("rounded-full px-2 py-0.5 font-medium", X === "ai" ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-secondary"),
452
+ children: X === "ai" ? m("housingvista.properties.nlSearch.methodAi", "AI-parsed") : m("housingvista.properties.nlSearch.methodKeyword", "Keyword baseline (no AI configured)")
453
+ }), ft && /* @__PURE__ */ u("span", {
445
454
  className: "rounded-full bg-status-warning-bg-subtle px-2 py-0.5 text-status-warning-text",
446
- children: ct
455
+ children: ft
447
456
  })]
448
457
  }),
449
- gt && /* @__PURE__ */ f("div", {
458
+ bt && /* @__PURE__ */ d("div", {
450
459
  className: "mt-3 space-y-2",
451
460
  children: [
452
- /* @__PURE__ */ d("p", {
461
+ /* @__PURE__ */ u("p", {
453
462
  className: "text-xs font-medium text-text-secondary",
454
- children: K ? h("housingvista.properties.nlSearch.chipsHeading", "Filters we read from your sentence") : h("housingvista.properties.nlSearch.chipsHeadingApplied", "Filters applied from your sentence")
463
+ children: J ? m("housingvista.properties.nlSearch.chipsHeading", "Filters we read from your sentence") : m("housingvista.properties.nlSearch.chipsHeadingApplied", "Filters applied from your sentence")
455
464
  }),
456
- /* @__PURE__ */ d("div", {
465
+ /* @__PURE__ */ u("div", {
457
466
  className: "flex flex-wrap items-center gap-2",
458
- children: Q.map((e) => /* @__PURE__ */ f("span", {
467
+ children: $.map((e) => /* @__PURE__ */ d("span", {
459
468
  className: "inline-flex items-center gap-1.5 rounded-full bg-status-info-bg-subtle px-2.5 py-1 text-xs text-status-info-text",
460
469
  children: [
461
- /* @__PURE__ */ f("span", {
470
+ /* @__PURE__ */ d("span", {
462
471
  className: "font-medium",
463
472
  children: [e.label, ":"]
464
473
  }),
465
- /* @__PURE__ */ d("span", { children: e.value }),
466
- /* @__PURE__ */ d("button", {
474
+ /* @__PURE__ */ u("span", { children: e.value }),
475
+ /* @__PURE__ */ u("button", {
467
476
  type: "button",
468
- onClick: () => mt(e.key),
469
- "aria-label": h("housingvista.properties.nlSearch.removeChip", "Remove filter") + `: ${e.label} ${e.value}`,
477
+ onClick: () => vt(e.key),
478
+ "aria-label": m("housingvista.properties.nlSearch.removeChip", "Remove filter") + `: ${e.label} ${e.value}`,
470
479
  className: "rounded-full transition-opacity hover:opacity-70",
471
- children: /* @__PURE__ */ d(xe, { className: "h-3 w-3" })
480
+ children: /* @__PURE__ */ u(Se, { className: "h-3 w-3" })
472
481
  })
473
482
  ]
474
483
  }, e.key))
475
484
  }),
476
- /* @__PURE__ */ f("div", {
485
+ /* @__PURE__ */ d("div", {
477
486
  className: "flex flex-wrap items-center justify-between gap-2",
478
- children: [/* @__PURE__ */ f("p", {
487
+ children: [/* @__PURE__ */ d("p", {
479
488
  className: "text-xs text-text-secondary",
480
489
  children: [
481
- h("housingvista.properties.nlSearch.readAs", "How we read it"),
490
+ m("housingvista.properties.nlSearch.readAs", "How we read it"),
482
491
  ": ",
483
- ht(Q)
492
+ yt($)
484
493
  ]
485
- }), K && X && /* @__PURE__ */ d("button", {
494
+ }), J && Z && /* @__PURE__ */ u("button", {
486
495
  type: "button",
487
- onClick: () => pt(X),
496
+ onClick: () => _t(Z),
488
497
  className: "whitespace-nowrap text-xs font-medium text-primary hover:underline",
489
- children: h("housingvista.properties.nlSearch.switchToManual", "Switch to manual filters")
498
+ children: m("housingvista.properties.nlSearch.switchToManual", "Switch to manual filters")
490
499
  })]
491
500
  })
492
501
  ]
493
502
  }),
494
- K && !J && Q.length === 0 && /* @__PURE__ */ d("p", {
503
+ J && !Y && $.length === 0 && /* @__PURE__ */ u("p", {
495
504
  className: "mt-3 text-xs text-text-secondary",
496
- children: h("housingvista.properties.nlSearch.noFiltersRead", "No filters could be read from that sentence — these are unfiltered listings.")
505
+ children: m("housingvista.properties.nlSearch.noFiltersRead", "No filters could be read from that sentence — these are unfiltered listings.")
497
506
  })
498
507
  ]
499
508
  }),
500
- /* @__PURE__ */ d(ee, {
501
- searchValue: _,
502
- onSearchChange: Le,
503
- searchPlaceholder: h("housingvista.properties.search.placeholder", "Search properties by name, city, or neighborhood..."),
504
- filters: /* @__PURE__ */ f("button", {
505
- onClick: () => Ue((e) => !e),
506
- className: a("inline-flex items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium transition-colors", He ? "bg-foreground text-background" : "text-text-primary hover:bg-bg-sunken"),
509
+ /* @__PURE__ */ u(ee, {
510
+ searchValue: g,
511
+ onSearchChange: Re,
512
+ searchPlaceholder: m("housingvista.properties.search.placeholder", "Search properties by name, city, or neighborhood..."),
513
+ filters: /* @__PURE__ */ d("button", {
514
+ onClick: () => Ge((e) => !e),
515
+ className: a("inline-flex items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium transition-colors", We ? "bg-foreground text-background" : "text-text-primary hover:bg-bg-sunken"),
507
516
  children: [
508
- /* @__PURE__ */ d(ye, { className: "h-4 w-4" }),
509
- h("housingvista.properties.filters.toggle", "Filters"),
510
- yt && /* @__PURE__ */ d("span", {
517
+ /* @__PURE__ */ u(be, { className: "h-4 w-4" }),
518
+ m("housingvista.properties.filters.toggle", "Filters"),
519
+ wt && /* @__PURE__ */ u("span", {
511
520
  className: "flex h-5 w-5 items-center justify-center rounded-full bg-action-primary-bg text-[10px] font-bold text-action-primary-text",
512
521
  children: "!"
513
522
  })
514
523
  ]
515
524
  }),
516
- actions: /* @__PURE__ */ f("div", {
525
+ actions: /* @__PURE__ */ d("div", {
517
526
  className: "flex items-center gap-1",
518
527
  children: [
519
- /* @__PURE__ */ d("button", {
528
+ /* @__PURE__ */ u("button", {
520
529
  onClick: () => k("grid"),
521
530
  className: a("rounded-md p-2 transition-colors", D === "grid" ? "bg-foreground text-background" : "text-text-secondary hover:text-text-primary hover:bg-bg-sunken"),
522
- children: /* @__PURE__ */ d(he, { className: "h-4 w-4" })
531
+ children: /* @__PURE__ */ u(ge, { className: "h-4 w-4" })
523
532
  }),
524
- /* @__PURE__ */ d("button", {
533
+ /* @__PURE__ */ u("button", {
525
534
  onClick: () => k("list"),
526
535
  className: a("rounded-md p-2 transition-colors", D === "list" ? "bg-foreground text-background" : "text-text-secondary hover:text-text-primary hover:bg-bg-sunken"),
527
- children: /* @__PURE__ */ d(ge, { className: "h-4 w-4" })
536
+ children: /* @__PURE__ */ u(_e, { className: "h-4 w-4" })
528
537
  }),
529
- /* @__PURE__ */ d("button", {
538
+ /* @__PURE__ */ u("button", {
530
539
  onClick: () => k("map"),
531
- "aria-label": h("housingvista.properties.viewMode.map", "Map view"),
540
+ "aria-label": m("housingvista.properties.viewMode.map", "Map view"),
532
541
  className: a("rounded-md p-2 transition-colors", D === "map" ? "bg-foreground text-background" : "text-text-secondary hover:text-text-primary hover:bg-bg-sunken"),
533
- children: /* @__PURE__ */ d(_e, { className: "h-4 w-4" })
542
+ children: /* @__PURE__ */ u(ve, { className: "h-4 w-4" })
534
543
  })
535
544
  ]
536
545
  })
537
546
  }),
538
- He && /* @__PURE__ */ f("div", {
547
+ We && /* @__PURE__ */ d("div", {
539
548
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4",
540
549
  children: [
541
- /* @__PURE__ */ f("div", {
550
+ /* @__PURE__ */ d("div", {
542
551
  className: "flex items-center justify-between mb-4",
543
- children: [/* @__PURE__ */ d("h3", {
552
+ children: [/* @__PURE__ */ u("h3", {
544
553
  className: "text-sm font-medium text-text-primary",
545
- children: h("housingvista.properties.filters.title", "Filters")
546
- }), yt && /* @__PURE__ */ f("button", {
547
- onClick: bt,
554
+ children: m("housingvista.properties.filters.title", "Filters")
555
+ }), wt && /* @__PURE__ */ d("button", {
556
+ onClick: Tt,
548
557
  className: "inline-flex items-center gap-1 text-xs text-text-secondary hover:text-text-primary",
549
- children: [/* @__PURE__ */ d(xe, { className: "h-3 w-3" }), h("housingvista.properties.filters.clearAll", "Clear All")]
558
+ children: [/* @__PURE__ */ u(Se, { className: "h-3 w-3" }), m("housingvista.properties.filters.clearAll", "Clear All")]
550
559
  })]
551
560
  }),
552
- /* @__PURE__ */ f("div", {
561
+ /* @__PURE__ */ d("div", {
553
562
  className: "grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-6",
554
563
  children: [
555
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
564
+ /* @__PURE__ */ d("label", {
565
+ className: "block",
566
+ children: [/* @__PURE__ */ u("span", {
567
+ className: "mb-1.5 block text-xs font-medium text-text-secondary",
568
+ children: m("housingvista.properties.chips.city", "City")
569
+ }), /* @__PURE__ */ u("input", {
570
+ type: "text",
571
+ value: H,
572
+ onChange: (e) => T(e.target.value),
573
+ placeholder: m("housingvista.properties.filters.cityPlaceholder", "Exact city name"),
574
+ 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)]"
575
+ })]
576
+ }),
577
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
556
578
  className: "mb-1.5 block text-xs font-medium text-text-secondary",
557
- children: h("housingvista.properties.filters.labels.propertyType", "Property Type")
558
- }), /* @__PURE__ */ d("select", {
559
- value: v,
560
- onChange: (e) => y(e.target.value),
579
+ children: m("housingvista.properties.filters.labels.propertyType", "Property Type")
580
+ }), /* @__PURE__ */ u("select", {
581
+ value: _,
582
+ onChange: (e) => v(e.target.value),
561
583
  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)]",
562
- children: Ne.map((e) => /* @__PURE__ */ d("option", {
584
+ children: Pe.map((e) => /* @__PURE__ */ u("option", {
563
585
  value: e.value,
564
586
  children: e.label
565
587
  }, e.value))
566
588
  })] }),
567
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
589
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
568
590
  className: "mb-1.5 block text-xs font-medium text-text-secondary",
569
- children: h("housingvista.properties.filters.labels.status", "Status")
570
- }), /* @__PURE__ */ d("select", {
571
- value: b,
572
- onChange: (e) => x(e.target.value),
591
+ children: m("housingvista.properties.filters.labels.status", "Status")
592
+ }), /* @__PURE__ */ u("select", {
593
+ value: y,
594
+ onChange: (e) => b(e.target.value),
573
595
  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)]",
574
- children: Pe.map((e) => /* @__PURE__ */ d("option", {
596
+ children: Fe.map((e) => /* @__PURE__ */ u("option", {
575
597
  value: e.value,
576
598
  children: e.label
577
599
  }, e.value))
578
600
  })] }),
579
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
601
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
580
602
  className: "mb-1.5 block text-xs font-medium text-text-secondary",
581
- children: h("housingvista.properties.filters.labels.category", "Category")
582
- }), /* @__PURE__ */ d("select", {
583
- value: S,
584
- onChange: (e) => Re(e.target.value),
603
+ children: m("housingvista.properties.filters.labels.category", "Category")
604
+ }), /* @__PURE__ */ u("select", {
605
+ value: x,
606
+ onChange: (e) => S(e.target.value),
585
607
  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)]",
586
- children: Fe.map((e) => /* @__PURE__ */ d("option", {
608
+ children: Ie.map((e) => /* @__PURE__ */ u("option", {
587
609
  value: e.value,
588
610
  children: e.label
589
611
  }, e.value))
590
612
  })] }),
591
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
613
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
592
614
  className: "mb-1.5 block text-xs font-medium text-text-secondary",
593
- children: h("housingvista.properties.filters.labels.priceRange", "Price Range")
594
- }), /* @__PURE__ */ d("select", {
615
+ children: m("housingvista.properties.filters.labels.priceRange", "Price Range")
616
+ }), /* @__PURE__ */ u("select", {
595
617
  value: ze,
596
- onChange: (e) => C(e.target.value),
618
+ onChange: (e) => Be(e.target.value),
597
619
  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)]",
598
- children: g.map((e) => /* @__PURE__ */ d("option", {
620
+ children: h.map((e) => /* @__PURE__ */ u("option", {
599
621
  value: e.value,
600
622
  children: e.label
601
623
  }, e.value))
602
624
  })] }),
603
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
625
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
604
626
  className: "mb-1.5 block text-xs font-medium text-text-secondary",
605
- children: h("housingvista.properties.filters.labels.bedrooms", "Bedrooms")
606
- }), /* @__PURE__ */ d("select", {
607
- value: w,
608
- onChange: (e) => T(e.target.value),
627
+ children: m("housingvista.properties.filters.labels.bedrooms", "Bedrooms")
628
+ }), /* @__PURE__ */ u("select", {
629
+ value: C,
630
+ onChange: (e) => w(e.target.value),
609
631
  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)]",
610
- children: Ie.map((e) => /* @__PURE__ */ d("option", {
632
+ children: Le.map((e) => /* @__PURE__ */ u("option", {
611
633
  value: e.value,
612
634
  children: e.label
613
635
  }, e.value))
614
636
  })] }),
615
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
637
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
616
638
  className: "mb-1.5 block text-xs font-medium text-text-secondary",
617
- children: h("housingvista.properties.filters.labels.rera", "RERA")
618
- }), /* @__PURE__ */ d("select", {
639
+ children: m("housingvista.properties.filters.labels.rera", "RERA")
640
+ }), /* @__PURE__ */ u("select", {
619
641
  value: j,
620
642
  onChange: (e) => M(e.target.value),
621
643
  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)]",
622
- children: A.map((e) => /* @__PURE__ */ d("option", {
644
+ children: A.map((e) => /* @__PURE__ */ u("option", {
623
645
  value: e.value,
624
646
  children: e.label
625
647
  }, e.value))
626
648
  })] })
627
649
  ]
628
650
  }),
629
- /* @__PURE__ */ f("div", {
651
+ /* @__PURE__ */ d("div", {
630
652
  className: "mt-4",
631
- children: [/* @__PURE__ */ d("label", {
653
+ children: [/* @__PURE__ */ u("label", {
632
654
  className: "mb-1.5 block text-xs font-medium text-text-secondary",
633
- children: h("housingvista.properties.filters.labels.amenities", "Amenities")
634
- }), /* @__PURE__ */ d("div", {
655
+ children: m("housingvista.properties.filters.labels.amenities", "Amenities")
656
+ }), /* @__PURE__ */ u("div", {
635
657
  className: "flex flex-wrap gap-2",
636
658
  children: o.map((e) => {
637
659
  let t = e.icon, n = N.includes(e.id);
638
- return /* @__PURE__ */ f("button", {
660
+ return /* @__PURE__ */ d("button", {
639
661
  type: "button",
640
- onClick: () => Ge(e.id),
662
+ onClick: () => qe(e.id),
641
663
  "aria-pressed": n,
642
664
  className: a("inline-flex items-center gap-1.5 rounded-full border px-3 py-1.5 text-xs font-medium transition-colors", n ? "border-action-primary-border bg-action-primary-bg/5 text-text-primary" : "border-border-subtle text-text-secondary hover:bg-bg-sunken/50"),
643
- children: [/* @__PURE__ */ d(t, { className: "h-3.5 w-3.5" }), e.label]
665
+ children: [/* @__PURE__ */ u(t, { className: "h-3.5 w-3.5" }), e.label]
644
666
  }, e.id);
645
667
  })
646
668
  })]
647
669
  })
648
670
  ]
649
671
  }),
650
- /* @__PURE__ */ f("div", {
672
+ /* @__PURE__ */ d("div", {
651
673
  className: "flex items-center justify-between",
652
- children: [/* @__PURE__ */ d("p", {
674
+ children: [/* @__PURE__ */ u("p", {
653
675
  className: "text-sm text-text-secondary",
654
- children: K ? /* @__PURE__ */ f(u, { children: [
655
- h("housingvista.properties.results.showing", "Showing"),
676
+ children: J ? /* @__PURE__ */ d(l, { children: [
677
+ m("housingvista.properties.results.showing", "Showing"),
656
678
  " ",
657
- $.length,
679
+ xt.length,
658
680
  " ",
659
- h("housingvista.properties.results.properties", "properties"),
681
+ m("housingvista.properties.results.properties", "properties"),
660
682
  " ·",
661
683
  " ",
662
- h("housingvista.properties.nlSearch.resultsLabel", "AI search results")
663
- ] }) : D === "map" ? /* @__PURE__ */ f(u, { children: [
664
- h("housingvista.properties.results.showingOnMap", "Showing"),
684
+ m("housingvista.properties.nlSearch.resultsLabel", "AI search results")
685
+ ] }) : D === "map" ? /* @__PURE__ */ d(l, { children: [
686
+ m("housingvista.properties.results.showingOnMap", "Showing"),
665
687
  " ",
666
- $e.length,
688
+ nt.length,
667
689
  " ",
668
- h("housingvista.properties.results.properties", "properties"),
669
- O ? ` · ${h("housingvista.properties.results.inThisArea", "in this area")}` : ""
670
- ] }) : /* @__PURE__ */ f(u, { children: [
671
- h("housingvista.properties.results.showing", "Showing"),
690
+ m("housingvista.properties.results.properties", "properties"),
691
+ O ? ` · ${m("housingvista.properties.results.inThisArea", "in this area")}` : ""
692
+ ] }) : /* @__PURE__ */ d(l, { children: [
693
+ m("housingvista.properties.results.showing", "Showing"),
672
694
  " ",
673
- at.length,
695
+ ct.length,
674
696
  " ",
675
- h("housingvista.properties.results.properties", "properties"),
697
+ m("housingvista.properties.results.properties", "properties"),
676
698
  R > 1 ? ` · page ${R}` : ""
677
699
  ] })
678
- }), !K && yt && /* @__PURE__ */ d("button", {
679
- onClick: bt,
700
+ }), !J && wt && /* @__PURE__ */ u("button", {
701
+ onClick: Tt,
680
702
  className: "text-sm text-text-secondary hover:text-text-primary",
681
- children: h("housingvista.properties.results.clearFilters", "Clear Filters")
703
+ children: m("housingvista.properties.results.clearFilters", "Clear Filters")
682
704
  })]
683
705
  }),
684
- !K && D === "map" && /* @__PURE__ */ d(pe, {
685
- properties: $e,
686
- loading: et,
687
- selectedIds: W,
688
- onSelectProperty: (e) => p(e),
689
- onSearchThisArea: We
706
+ !J && D === "map" && /* @__PURE__ */ u(pe, {
707
+ properties: nt,
708
+ loading: rt,
709
+ selectedIds: K,
710
+ onSelectProperty: (e) => f(e),
711
+ onSearchThisArea: Ke
690
712
  }),
691
- !K && D === "map" ? null : _t ? /* @__PURE__ */ d(te, {
713
+ !J && D === "map" ? null : St ? /* @__PURE__ */ u(te, {
692
714
  variant: "card",
693
715
  count: 6
694
- }) : $.length > 0 ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", {
695
- className: a(K || D === "grid" ? "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3" : "space-y-4"),
696
- children: $.map((e) => /* @__PURE__ */ d(ne, {
716
+ }) : xt.length > 0 ? /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", {
717
+ className: a(J || D === "grid" ? "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3" : "space-y-4"),
718
+ children: xt.map((e) => /* @__PURE__ */ u(ne, {
697
719
  id: e.id,
698
720
  title: e.title,
699
721
  price: e.price.amount,
@@ -707,34 +729,34 @@ var Oe = 9, p = () => {
707
729
  imageUrl: e.images[0]?.url,
708
730
  status: e.status.replace("_", " "),
709
731
  type: e.category,
710
- onClick: () => p(e.id),
711
- isShortlisted: W.has(e.id),
712
- onToggleShortlist: () => it(e.id),
732
+ onClick: () => f(e.id),
733
+ isShortlisted: K.has(e.id),
734
+ onToggleShortlist: () => st(e.id),
713
735
  reraStatus: e.reraVerificationStatus,
714
736
  verificationStatus: e.verificationStatus
715
737
  }, e.id))
716
- }), !K && /* @__PURE__ */ d(Te, {
738
+ }), !J && /* @__PURE__ */ u(Ee, {
717
739
  page: R,
718
- pageSize: qe,
719
- hasNextPage: vt,
740
+ pageSize: Ye,
741
+ hasNextPage: Ct,
720
742
  hasPreviousPage: R > 1,
721
- loading: Ze,
743
+ loading: et,
722
744
  onPageChange: z,
723
- onPageSizeChange: Ye
724
- })] }) : /* @__PURE__ */ d(r, {
745
+ onPageSizeChange: Ze
746
+ })] }) : /* @__PURE__ */ u(r, {
725
747
  illustration: "empty-search",
726
- icon: /* @__PURE__ */ d(me, { className: "h-12 w-12" }),
727
- title: h("housingvista.properties.empty.title", "No properties found"),
728
- description: K ? h("housingvista.properties.nlSearch.emptyDescription", "No properties matched that search. Try rephrasing your query.") : h("housingvista.properties.empty.description", "Try adjusting your search criteria or filters to find more properties."),
729
- action: /* @__PURE__ */ d("button", {
730
- onClick: K ? dt : bt,
748
+ icon: /* @__PURE__ */ u(he, { className: "h-12 w-12" }),
749
+ title: m("housingvista.properties.empty.title", "No properties found"),
750
+ description: J ? m("housingvista.properties.nlSearch.emptyDescription", "No properties matched that search. Try rephrasing your query.") : m("housingvista.properties.empty.description", "Try adjusting your search criteria or filters to find more properties."),
751
+ action: /* @__PURE__ */ u("button", {
752
+ onClick: J ? ht : Tt,
731
753
  className: "rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background transition-colors hover:bg-foreground/90",
732
- children: K ? h("housingvista.properties.nlSearch.clear", "Clear AI search") : h("housingvista.properties.empty.clearAllFilters", "Clear All Filters")
754
+ children: J ? m("housingvista.properties.nlSearch.clear", "Clear AI search") : m("housingvista.properties.empty.clearAllFilters", "Clear All Filters")
733
755
  })
734
756
  })
735
757
  ]
736
758
  });
737
759
  };
738
- export { p as PropertiesPage };
760
+ export { f as PropertiesPage };
739
761
 
740
762
  //# sourceMappingURL=PropertiesPage.js.map