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