@burdenoff/microfe-housingvista 2026.925.1 → 2026.928.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.
@@ -7,8 +7,10 @@ import { notify as o } from "../../lib/toast.js";
7
7
  import { FileUploader as s } from "../../components/FileUploader.js";
8
8
  import "../../components/index.js";
9
9
  import { CoordinatePicker as c } from "../../components/maps/CoordinatePicker.js";
10
- import { useCallback as l, useState as u } from "react";
11
- import { Bath as d, Bed as f, Calendar as p, Car as m, CheckCircle as h, ChevronLeft as g, ChevronRight as _, DollarSign as v, Dumbbell as y, Flame as b, Home as x, MapPin as S, Maximize as C, Shield as w, TreePine as T, Upload as E, Waves as D, Wifi as O, Wind as k } from "lucide-react";
10
+ import { amenityOptions as l } from "../../utils/amenities.js";
11
+ import { currencyOptions as u, facingOptions as d, furnishingOptions as f, propertyCategoryOptions as p, propertyTypeOptions as m } from "../../utils/propertyOptions.js";
12
+ import { useCallback as h, useState as g } from "react";
13
+ import { Bath as _, Bed as v, Calendar as y, Car as b, CheckCircle as x, ChevronLeft as S, ChevronRight as C, DollarSign as w, Home as T, MapPin as E, Maximize as D, Upload as O, Wifi as k } from "lucide-react";
12
14
  import { useNavigate as A } from "react-router";
13
15
  import { jsx as j, jsxs as M } from "react/jsx-runtime";
14
16
  import { EmphasisPanel as N } from "@burdenoff/fe-libs/ui";
@@ -25,80 +27,39 @@ var P = {
25
27
  {
26
28
  id: "basic",
27
29
  label: "Basic Info",
28
- icon: x
30
+ icon: T
29
31
  },
30
32
  {
31
33
  id: "location",
32
34
  label: "Location",
33
- icon: S
35
+ icon: E
34
36
  },
35
37
  {
36
38
  id: "specs",
37
39
  label: "Specifications",
38
- icon: C
40
+ icon: D
39
41
  },
40
42
  {
41
43
  id: "amenities",
42
44
  label: "Amenities",
43
- icon: O
45
+ icon: k
44
46
  },
45
47
  {
46
48
  id: "pricing",
47
49
  label: "Pricing",
48
- icon: v
50
+ icon: w
49
51
  },
50
52
  {
51
53
  id: "images",
52
54
  label: "Images",
53
- icon: E
54
- }
55
- ], L = [
56
- {
57
- id: "swimming_pool",
58
- label: "Swimming Pool",
59
- icon: D
60
- },
61
- {
62
- id: "gym",
63
- label: "Gym / Fitness",
64
- icon: y
65
- },
66
- {
67
- id: "parking",
68
- label: "Parking",
69
- icon: m
70
- },
71
- {
72
- id: "garden",
73
- label: "Garden",
74
- icon: T
75
- },
76
- {
77
- id: "security",
78
- label: "24/7 Security",
79
- icon: w
80
- },
81
- {
82
- id: "wifi",
83
- label: "Wi-Fi",
84
55
  icon: O
85
- },
86
- {
87
- id: "fireplace",
88
- label: "Fireplace",
89
- icon: b
90
- },
91
- {
92
- id: "ac",
93
- label: "Central AC",
94
- icon: k
95
56
  }
96
- ], R = [{
57
+ ], L = [{
97
58
  label: "Properties",
98
59
  href: "../"
99
- }, { label: "Add New" }], z = () => {
60
+ }, { label: "Add New" }], R = () => {
100
61
  i("housingvista.property.create_viewed");
101
- let y = A(), { createProperty: b, loading: x } = a(), { emitResource: w } = r(), [T, D] = u(0), [O, k] = u({
62
+ let T = A(), { createProperty: k, loading: R } = a(), { emitResource: z } = r(), [B, V] = g(0), [H, U] = g({
102
63
  title: "",
103
64
  description: "",
104
65
  propertyType: "residential",
@@ -124,90 +85,90 @@ var P = {
124
85
  currency: "USD",
125
86
  negotiable: !1,
126
87
  images: []
127
- }), z = l((e) => {
128
- k((t) => {
88
+ }), W = h((e) => {
89
+ U((t) => {
129
90
  let n = new Set(t.images.map((e) => e.id)), r = [...t.images, ...e.filter((e) => !n.has(e.id))];
130
91
  return {
131
92
  ...t,
132
93
  images: r
133
94
  };
134
95
  });
135
- }, []), B = l((e) => {
136
- k((t) => ({
96
+ }, []), G = h((e) => {
97
+ U((t) => ({
137
98
  ...t,
138
99
  images: t.images.filter((t) => t.id !== e)
139
100
  }));
140
- }, []), V = l((e) => {
101
+ }, []), K = h((e) => {
141
102
  let { name: t, value: n, type: r } = e.target;
142
- k((i) => ({
103
+ U((i) => ({
143
104
  ...i,
144
105
  [t]: r === "checkbox" ? e.target.checked : n
145
106
  }));
146
- }, []), H = l((e) => {
147
- k((t) => ({
107
+ }, []), q = h((e) => {
108
+ U((t) => ({
148
109
  ...t,
149
110
  amenities: t.amenities.includes(e) ? t.amenities.filter((t) => t !== e) : [...t.amenities, e]
150
111
  }));
151
- }, []), U = () => {
152
- switch (T) {
153
- case 0: return O.title.trim() !== "" && O.description.trim() !== "";
154
- case 1: return O.address.trim() !== "" && O.city.trim() !== "" && O.state.trim() !== "";
155
- case 2: return O.area.trim() !== "";
112
+ }, []), J = () => {
113
+ switch (B) {
114
+ case 0: return H.title.trim() !== "" && H.description.trim() !== "";
115
+ case 1: return H.address.trim() !== "" && H.city.trim() !== "" && H.state.trim() !== "";
116
+ case 2: return H.area.trim() !== "";
156
117
  case 3: return !0;
157
- case 4: return O.price.trim() !== "";
118
+ case 4: return H.price.trim() !== "";
158
119
  case 5: return !0;
159
120
  default: return !1;
160
121
  }
161
- }, W = async () => {
122
+ }, Y = async () => {
162
123
  let e = {
163
- title: O.title.trim(),
164
- description: O.description.trim() || void 0,
165
- status: P[O.listingType] ?? "for_sale",
166
- type: O.propertyType,
167
- category: O.category,
168
- address: O.address.trim() || void 0,
169
- city: O.city.trim(),
170
- state: O.state.trim(),
171
- country: O.country || void 0,
172
- pincode: O.zipCode.trim() || void 0,
173
- neighborhood: O.neighborhood.trim() || void 0,
174
- coordinates: O.coordinates ?? void 0,
175
- price: Number(O.price) || 0,
176
- currency: O.currency,
177
- priceType: F[O.listingType] ?? "sale",
178
- negotiable: O.negotiable,
179
- bedrooms: Number(O.bedrooms) || 0,
180
- bathrooms: Number(O.bathrooms) || 0,
181
- totalArea: Number(O.area) || 0,
182
- floors: O.floors ? Number(O.floors) : void 0,
183
- parking: O.parking ? Number(O.parking) : void 0,
184
- furnishingStatus: O.furnishing,
185
- ageOfProperty: O.yearBuilt ? Math.max(0, (/* @__PURE__ */ new Date()).getFullYear() - Number(O.yearBuilt)) : void 0,
186
- facing: O.facing,
187
- amenities: O.amenities.map((e) => ({
188
- name: L.find((t) => t.id === e)?.label ?? e,
124
+ title: H.title.trim(),
125
+ description: H.description.trim() || void 0,
126
+ status: P[H.listingType] ?? "for_sale",
127
+ type: H.propertyType,
128
+ category: H.category,
129
+ address: H.address.trim() || void 0,
130
+ city: H.city.trim(),
131
+ state: H.state.trim(),
132
+ country: H.country || void 0,
133
+ pincode: H.zipCode.trim() || void 0,
134
+ neighborhood: H.neighborhood.trim() || void 0,
135
+ coordinates: H.coordinates ?? void 0,
136
+ price: Number(H.price) || 0,
137
+ currency: H.currency,
138
+ priceType: F[H.listingType] ?? "sale",
139
+ negotiable: H.negotiable,
140
+ bedrooms: Number(H.bedrooms) || 0,
141
+ bathrooms: Number(H.bathrooms) || 0,
142
+ totalArea: Number(H.area) || 0,
143
+ floors: H.floors ? Number(H.floors) : void 0,
144
+ parking: H.parking ? Number(H.parking) : void 0,
145
+ furnishingStatus: H.furnishing,
146
+ ageOfProperty: H.yearBuilt ? Math.max(0, (/* @__PURE__ */ new Date()).getFullYear() - Number(H.yearBuilt)) : void 0,
147
+ facing: H.facing,
148
+ amenities: H.amenities.map((e) => ({
149
+ name: l.find((t) => t.id === e)?.label ?? e,
189
150
  category: "general",
190
151
  available: !0
191
152
  })),
192
- images: O.images.map((e, t) => ({
153
+ images: H.images.map((e, t) => ({
193
154
  url: e.url,
194
155
  isPrimary: t === 0,
195
156
  order: t
196
157
  }))
197
158
  };
198
159
  try {
199
- let t = await b(e);
200
- w("housingvista.property.created", t.id), o.success("Property created", `${t.title} has been added to your listings.`), y(`../properties/${t.id}`);
160
+ let t = await k(e);
161
+ z("housingvista.property.created", t.id), o.success("Property created", `${t.title} has been added to your listings.`), T(`../properties/${t.id}`);
201
162
  } catch (e) {
202
163
  o.error("Could not create property", e.message);
203
164
  }
204
- }, G = T === I.length - 1;
165
+ }, X = B === I.length - 1;
205
166
  return /* @__PURE__ */ M(t, {
206
167
  title: "Add New Property",
207
168
  description: "List your property for sale or rent",
208
169
  purpose: "Create a complete, market-ready listing in a few guided steps. Fill in the basics, location, specifications, amenities, pricing, and photos — the more detail you add, the more inquiries and stronger offers your property attracts.",
209
170
  children: [
210
- /* @__PURE__ */ j(n, { items: R }),
171
+ /* @__PURE__ */ j(n, { items: L }),
211
172
  /* @__PURE__ */ M(N, {
212
173
  className: "p-5",
213
174
  children: [
@@ -217,35 +178,35 @@ var P = {
217
178
  className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
218
179
  children: [
219
180
  "Step ",
220
- T + 1,
181
+ B + 1,
221
182
  " of ",
222
183
  I.length
223
184
  ]
224
185
  }), /* @__PURE__ */ j("p", {
225
186
  className: "text-base font-semibold text-text-primary",
226
- children: I[T].label
187
+ children: I[B].label
227
188
  })] }), /* @__PURE__ */ M("span", {
228
189
  className: "text-sm font-semibold text-text-primary",
229
- children: [Math.round((T + 1) / I.length * 100), "%"]
190
+ children: [Math.round((B + 1) / I.length * 100), "%"]
230
191
  })]
231
192
  }),
232
193
  /* @__PURE__ */ j("div", {
233
194
  className: "h-1.5 w-full overflow-hidden rounded-full bg-bg-sunken",
234
195
  children: /* @__PURE__ */ j("div", {
235
196
  className: "h-full rounded-full bg-action-primary-bg transition-[width] duration-300",
236
- style: { width: `${(T + 1) / I.length * 100}%` }
197
+ style: { width: `${(B + 1) / I.length * 100}%` }
237
198
  })
238
199
  }),
239
200
  /* @__PURE__ */ j("div", {
240
201
  className: "mt-4 flex items-center gap-1 overflow-x-auto pb-1",
241
202
  children: I.map((t, n) => {
242
- let r = t.icon, i = n === T, a = n < T;
203
+ let r = t.icon, i = n === B, a = n < B;
243
204
  return /* @__PURE__ */ M("button", {
244
- onClick: () => n <= T && D(n),
245
- className: e("flex shrink-0 items-center gap-2 rounded-full px-3 py-1.5 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", i && "bg-action-primary-bg text-action-primary-text", a && "bg-status-success-bg-subtle text-status-success-text", !i && !a && "text-text-secondary hover:bg-bg-sunken/50", n > T && "cursor-not-allowed"),
246
- disabled: n > T,
205
+ onClick: () => n <= B && V(n),
206
+ className: e("flex shrink-0 items-center gap-2 rounded-full px-3 py-1.5 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", i && "bg-action-primary-bg text-action-primary-text", a && "bg-status-success-bg-subtle text-status-success-text", !i && !a && "text-text-secondary hover:bg-bg-sunken/50", n > B && "cursor-not-allowed"),
207
+ disabled: n > B,
247
208
  children: [
248
- j(a ? h : r, { className: "h-4 w-4" }),
209
+ j(a ? x : r, { className: "h-4 w-4" }),
249
210
  /* @__PURE__ */ j("span", {
250
211
  className: "hidden sm:inline",
251
212
  children: t.label
@@ -265,7 +226,7 @@ var P = {
265
226
  children: [/* @__PURE__ */ M("div", {
266
227
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
267
228
  children: [
268
- T === 0 && /* @__PURE__ */ M("div", {
229
+ B === 0 && /* @__PURE__ */ M("div", {
269
230
  className: "space-y-4",
270
231
  children: [
271
232
  /* @__PURE__ */ j("h3", {
@@ -279,8 +240,8 @@ var P = {
279
240
  }), /* @__PURE__ */ j("input", {
280
241
  id: "title",
281
242
  name: "title",
282
- value: O.title,
283
- onChange: V,
243
+ value: H.title,
244
+ onChange: K,
284
245
  placeholder: "e.g., Luxury 3BHK Apartment in Downtown",
285
246
  required: !0,
286
247
  className: "h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
@@ -292,8 +253,8 @@ var P = {
292
253
  }), /* @__PURE__ */ j("textarea", {
293
254
  id: "description",
294
255
  name: "description",
295
- value: O.description,
296
- onChange: V,
256
+ value: H.description,
257
+ onChange: K,
297
258
  placeholder: "Describe your property in detail...",
298
259
  required: !0,
299
260
  rows: 4,
@@ -305,78 +266,30 @@ var P = {
305
266
  htmlFor: "propertyType",
306
267
  className: "mb-1.5 block text-sm font-medium text-text-primary",
307
268
  children: "Property Type *"
308
- }), /* @__PURE__ */ M("select", {
269
+ }), /* @__PURE__ */ j("select", {
309
270
  id: "propertyType",
310
271
  name: "propertyType",
311
- value: O.propertyType,
312
- onChange: V,
272
+ value: H.propertyType,
273
+ onChange: K,
313
274
  className: "h-10 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)]",
314
- children: [
315
- /* @__PURE__ */ j("option", {
316
- value: "residential",
317
- children: "Residential"
318
- }),
319
- /* @__PURE__ */ j("option", {
320
- value: "commercial",
321
- children: "Commercial"
322
- }),
323
- /* @__PURE__ */ j("option", {
324
- value: "industrial",
325
- children: "Industrial"
326
- }),
327
- /* @__PURE__ */ j("option", {
328
- value: "agricultural",
329
- children: "Agricultural"
330
- }),
331
- /* @__PURE__ */ j("option", {
332
- value: "mixed_use",
333
- children: "Mixed Use"
334
- })
335
- ]
275
+ children: m.map((e) => /* @__PURE__ */ j("option", {
276
+ value: e.value,
277
+ children: e.label
278
+ }, e.value))
336
279
  })] }), /* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j("label", {
337
280
  htmlFor: "category",
338
281
  className: "mb-1.5 block text-sm font-medium text-text-primary",
339
282
  children: "Category *"
340
- }), /* @__PURE__ */ M("select", {
283
+ }), /* @__PURE__ */ j("select", {
341
284
  id: "category",
342
285
  name: "category",
343
- value: O.category,
344
- onChange: V,
286
+ value: H.category,
287
+ onChange: K,
345
288
  className: "h-10 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)]",
346
- children: [
347
- /* @__PURE__ */ j("option", {
348
- value: "apartment",
349
- children: "Apartment"
350
- }),
351
- /* @__PURE__ */ j("option", {
352
- value: "house",
353
- children: "House"
354
- }),
355
- /* @__PURE__ */ j("option", {
356
- value: "villa",
357
- children: "Villa"
358
- }),
359
- /* @__PURE__ */ j("option", {
360
- value: "office",
361
- children: "Office"
362
- }),
363
- /* @__PURE__ */ j("option", {
364
- value: "retail",
365
- children: "Retail"
366
- }),
367
- /* @__PURE__ */ j("option", {
368
- value: "warehouse",
369
- children: "Warehouse"
370
- }),
371
- /* @__PURE__ */ j("option", {
372
- value: "land",
373
- children: "Land"
374
- }),
375
- /* @__PURE__ */ j("option", {
376
- value: "plot",
377
- children: "Plot"
378
- })
379
- ]
289
+ children: p.map((e) => /* @__PURE__ */ j("option", {
290
+ value: e.value,
291
+ children: e.label
292
+ }, e.value))
380
293
  })] })]
381
294
  }),
382
295
  /* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j("label", {
@@ -386,8 +299,8 @@ var P = {
386
299
  }), /* @__PURE__ */ M("select", {
387
300
  id: "listingType",
388
301
  name: "listingType",
389
- value: O.listingType,
390
- onChange: V,
302
+ value: H.listingType,
303
+ onChange: K,
391
304
  className: "h-10 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)] sm:max-w-xs",
392
305
  children: [
393
306
  /* @__PURE__ */ j("option", {
@@ -406,12 +319,12 @@ var P = {
406
319
  })] })
407
320
  ]
408
321
  }),
409
- T === 1 && /* @__PURE__ */ M("div", {
322
+ B === 1 && /* @__PURE__ */ M("div", {
410
323
  className: "space-y-4",
411
324
  children: [
412
325
  /* @__PURE__ */ M("h3", {
413
326
  className: "flex items-center gap-2 text-lg font-semibold text-text-primary",
414
- children: [/* @__PURE__ */ j(S, { className: "h-5 w-5" }), "Location Details"]
327
+ children: [/* @__PURE__ */ j(E, { className: "h-5 w-5" }), "Location Details"]
415
328
  }),
416
329
  /* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j("label", {
417
330
  htmlFor: "address",
@@ -420,8 +333,8 @@ var P = {
420
333
  }), /* @__PURE__ */ j("input", {
421
334
  id: "address",
422
335
  name: "address",
423
- value: O.address,
424
- onChange: V,
336
+ value: H.address,
337
+ onChange: K,
425
338
  placeholder: "e.g., 123 Main Street, Unit 2504",
426
339
  required: !0,
427
340
  className: "h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
@@ -433,8 +346,8 @@ var P = {
433
346
  }), /* @__PURE__ */ j("input", {
434
347
  id: "neighborhood",
435
348
  name: "neighborhood",
436
- value: O.neighborhood,
437
- onChange: V,
349
+ value: H.neighborhood,
350
+ onChange: K,
438
351
  placeholder: "e.g., Midtown",
439
352
  className: "h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
440
353
  })] }),
@@ -448,8 +361,8 @@ var P = {
448
361
  }), /* @__PURE__ */ j("input", {
449
362
  id: "city",
450
363
  name: "city",
451
- value: O.city,
452
- onChange: V,
364
+ value: H.city,
365
+ onChange: K,
453
366
  placeholder: "City",
454
367
  required: !0,
455
368
  className: "h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
@@ -461,8 +374,8 @@ var P = {
461
374
  }), /* @__PURE__ */ j("input", {
462
375
  id: "state",
463
376
  name: "state",
464
- value: O.state,
465
- onChange: V,
377
+ value: H.state,
378
+ onChange: K,
466
379
  placeholder: "State",
467
380
  required: !0,
468
381
  className: "h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
@@ -474,8 +387,8 @@ var P = {
474
387
  }), /* @__PURE__ */ j("input", {
475
388
  id: "zipCode",
476
389
  name: "zipCode",
477
- value: O.zipCode,
478
- onChange: V,
390
+ value: H.zipCode,
391
+ onChange: K,
479
392
  placeholder: "ZIP Code",
480
393
  required: !0,
481
394
  className: "h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
@@ -489,8 +402,8 @@ var P = {
489
402
  }), /* @__PURE__ */ M("select", {
490
403
  id: "country",
491
404
  name: "country",
492
- value: O.country,
493
- onChange: V,
405
+ value: H.country,
406
+ onChange: K,
494
407
  className: "h-10 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)] sm:max-w-xs",
495
408
  children: [
496
409
  /* @__PURE__ */ j("option", {
@@ -515,15 +428,15 @@ var P = {
515
428
  className: "mb-1.5 block text-sm font-medium text-text-primary",
516
429
  children: "Map location (optional)"
517
430
  }), /* @__PURE__ */ j(c, {
518
- value: O.coordinates,
519
- onChange: (e) => k((t) => ({
431
+ value: H.coordinates,
432
+ onChange: (e) => U((t) => ({
520
433
  ...t,
521
434
  coordinates: e
522
435
  }))
523
436
  })] })
524
437
  ]
525
438
  }),
526
- T === 2 && /* @__PURE__ */ M("div", {
439
+ B === 2 && /* @__PURE__ */ M("div", {
527
440
  className: "space-y-4",
528
441
  children: [
529
442
  /* @__PURE__ */ j("h3", {
@@ -535,26 +448,26 @@ var P = {
535
448
  children: [/* @__PURE__ */ M("div", { children: [/* @__PURE__ */ M("label", {
536
449
  htmlFor: "area",
537
450
  className: "mb-1.5 flex items-center gap-1.5 text-sm font-medium text-text-primary",
538
- children: [/* @__PURE__ */ j(C, { className: "h-4 w-4" }), "Total Area (sq ft) *"]
451
+ children: [/* @__PURE__ */ j(D, { className: "h-4 w-4" }), "Total Area (sq ft) *"]
539
452
  }), /* @__PURE__ */ j("input", {
540
453
  id: "area",
541
454
  name: "area",
542
455
  type: "number",
543
- value: O.area,
544
- onChange: V,
456
+ value: H.area,
457
+ onChange: K,
545
458
  placeholder: "Enter area",
546
459
  required: !0,
547
460
  className: "h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
548
461
  })] }), /* @__PURE__ */ M("div", { children: [/* @__PURE__ */ M("label", {
549
462
  htmlFor: "yearBuilt",
550
463
  className: "mb-1.5 flex items-center gap-1.5 text-sm font-medium text-text-primary",
551
- children: [/* @__PURE__ */ j(p, { className: "h-4 w-4" }), "Year Built"]
464
+ children: [/* @__PURE__ */ j(y, { className: "h-4 w-4" }), "Year Built"]
552
465
  }), /* @__PURE__ */ j("input", {
553
466
  id: "yearBuilt",
554
467
  name: "yearBuilt",
555
468
  type: "number",
556
- value: O.yearBuilt,
557
- onChange: V,
469
+ value: H.yearBuilt,
470
+ onChange: K,
558
471
  placeholder: "YYYY",
559
472
  className: "h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
560
473
  })] })]
@@ -565,39 +478,39 @@ var P = {
565
478
  /* @__PURE__ */ M("div", { children: [/* @__PURE__ */ M("label", {
566
479
  htmlFor: "bedrooms",
567
480
  className: "mb-1.5 flex items-center gap-1.5 text-sm font-medium text-text-primary",
568
- children: [/* @__PURE__ */ j(f, { className: "h-4 w-4" }), "Bedrooms"]
481
+ children: [/* @__PURE__ */ j(v, { className: "h-4 w-4" }), "Bedrooms"]
569
482
  }), /* @__PURE__ */ j("input", {
570
483
  id: "bedrooms",
571
484
  name: "bedrooms",
572
485
  type: "number",
573
- value: O.bedrooms,
574
- onChange: V,
486
+ value: H.bedrooms,
487
+ onChange: K,
575
488
  placeholder: "0",
576
489
  className: "h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
577
490
  })] }),
578
491
  /* @__PURE__ */ M("div", { children: [/* @__PURE__ */ M("label", {
579
492
  htmlFor: "bathrooms",
580
493
  className: "mb-1.5 flex items-center gap-1.5 text-sm font-medium text-text-primary",
581
- children: [/* @__PURE__ */ j(d, { className: "h-4 w-4" }), "Bathrooms"]
494
+ children: [/* @__PURE__ */ j(_, { className: "h-4 w-4" }), "Bathrooms"]
582
495
  }), /* @__PURE__ */ j("input", {
583
496
  id: "bathrooms",
584
497
  name: "bathrooms",
585
498
  type: "number",
586
- value: O.bathrooms,
587
- onChange: V,
499
+ value: H.bathrooms,
500
+ onChange: K,
588
501
  placeholder: "0",
589
502
  className: "h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
590
503
  })] }),
591
504
  /* @__PURE__ */ M("div", { children: [/* @__PURE__ */ M("label", {
592
505
  htmlFor: "parking",
593
506
  className: "mb-1.5 flex items-center gap-1.5 text-sm font-medium text-text-primary",
594
- children: [/* @__PURE__ */ j(m, { className: "h-4 w-4" }), "Parking Spots"]
507
+ children: [/* @__PURE__ */ j(b, { className: "h-4 w-4" }), "Parking Spots"]
595
508
  }), /* @__PURE__ */ j("input", {
596
509
  id: "parking",
597
510
  name: "parking",
598
511
  type: "number",
599
- value: O.parking,
600
- onChange: V,
512
+ value: H.parking,
513
+ onChange: K,
601
514
  placeholder: "0",
602
515
  className: "h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
603
516
  })] })
@@ -609,75 +522,35 @@ var P = {
609
522
  htmlFor: "furnishing",
610
523
  className: "mb-1.5 block text-sm font-medium text-text-primary",
611
524
  children: "Furnishing Status"
612
- }), /* @__PURE__ */ M("select", {
525
+ }), /* @__PURE__ */ j("select", {
613
526
  id: "furnishing",
614
527
  name: "furnishing",
615
- value: O.furnishing,
616
- onChange: V,
528
+ value: H.furnishing,
529
+ onChange: K,
617
530
  className: "h-10 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)]",
618
- children: [
619
- /* @__PURE__ */ j("option", {
620
- value: "unfurnished",
621
- children: "Unfurnished"
622
- }),
623
- /* @__PURE__ */ j("option", {
624
- value: "semi_furnished",
625
- children: "Semi Furnished"
626
- }),
627
- /* @__PURE__ */ j("option", {
628
- value: "furnished",
629
- children: "Furnished"
630
- })
631
- ]
531
+ children: f.map((e) => /* @__PURE__ */ j("option", {
532
+ value: e.value,
533
+ children: e.label
534
+ }, e.value))
632
535
  })] }), /* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j("label", {
633
536
  htmlFor: "facing",
634
537
  className: "mb-1.5 block text-sm font-medium text-text-primary",
635
538
  children: "Facing Direction"
636
- }), /* @__PURE__ */ M("select", {
539
+ }), /* @__PURE__ */ j("select", {
637
540
  id: "facing",
638
541
  name: "facing",
639
- value: O.facing,
640
- onChange: V,
542
+ value: H.facing,
543
+ onChange: K,
641
544
  className: "h-10 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)]",
642
- children: [
643
- /* @__PURE__ */ j("option", {
644
- value: "North",
645
- children: "North"
646
- }),
647
- /* @__PURE__ */ j("option", {
648
- value: "South",
649
- children: "South"
650
- }),
651
- /* @__PURE__ */ j("option", {
652
- value: "East",
653
- children: "East"
654
- }),
655
- /* @__PURE__ */ j("option", {
656
- value: "West",
657
- children: "West"
658
- }),
659
- /* @__PURE__ */ j("option", {
660
- value: "Northeast",
661
- children: "Northeast"
662
- }),
663
- /* @__PURE__ */ j("option", {
664
- value: "Northwest",
665
- children: "Northwest"
666
- }),
667
- /* @__PURE__ */ j("option", {
668
- value: "Southeast",
669
- children: "Southeast"
670
- }),
671
- /* @__PURE__ */ j("option", {
672
- value: "Southwest",
673
- children: "Southwest"
674
- })
675
- ]
545
+ children: d.map((e) => /* @__PURE__ */ j("option", {
546
+ value: e,
547
+ children: e
548
+ }, e))
676
549
  })] })]
677
550
  })
678
551
  ]
679
552
  }),
680
- T === 3 && /* @__PURE__ */ M("div", {
553
+ B === 3 && /* @__PURE__ */ M("div", {
681
554
  className: "space-y-4",
682
555
  children: [
683
556
  /* @__PURE__ */ j("h3", {
@@ -690,28 +563,28 @@ var P = {
690
563
  }),
691
564
  /* @__PURE__ */ j("div", {
692
565
  className: "grid grid-cols-2 gap-3 sm:grid-cols-4",
693
- children: L.map((t) => {
694
- let n = t.icon, r = O.amenities.includes(t.id);
566
+ children: l.map((t) => {
567
+ let n = t.icon, r = H.amenities.includes(t.id);
695
568
  return /* @__PURE__ */ M("button", {
696
569
  type: "button",
697
- onClick: () => H(t.id),
570
+ onClick: () => q(t.id),
698
571
  className: e("flex flex-col items-center gap-2 rounded-lg border p-4 text-sm 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"),
699
572
  children: [
700
573
  /* @__PURE__ */ j(n, { className: "h-6 w-6" }),
701
574
  /* @__PURE__ */ j("span", { children: t.label }),
702
- r && /* @__PURE__ */ j(h, { className: "h-4 w-4 text-status-success-text" })
575
+ r && /* @__PURE__ */ j(x, { className: "h-4 w-4 text-status-success-text" })
703
576
  ]
704
577
  }, t.id);
705
578
  })
706
579
  })
707
580
  ]
708
581
  }),
709
- T === 4 && /* @__PURE__ */ M("div", {
582
+ B === 4 && /* @__PURE__ */ M("div", {
710
583
  className: "space-y-4",
711
584
  children: [
712
585
  /* @__PURE__ */ M("h3", {
713
586
  className: "flex items-center gap-2 text-lg font-semibold text-text-primary",
714
- children: [/* @__PURE__ */ j(v, { className: "h-5 w-5" }), "Pricing Details"]
587
+ children: [/* @__PURE__ */ j(w, { className: "h-5 w-5" }), "Pricing Details"]
715
588
  }),
716
589
  /* @__PURE__ */ M("div", {
717
590
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
@@ -723,8 +596,8 @@ var P = {
723
596
  id: "price",
724
597
  name: "price",
725
598
  type: "number",
726
- value: O.price,
727
- onChange: V,
599
+ value: H.price,
600
+ onChange: K,
728
601
  placeholder: "Enter price",
729
602
  required: !0,
730
603
  className: "h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
@@ -732,30 +605,16 @@ var P = {
732
605
  htmlFor: "currency",
733
606
  className: "mb-1.5 block text-sm font-medium text-text-primary",
734
607
  children: "Currency"
735
- }), /* @__PURE__ */ M("select", {
608
+ }), /* @__PURE__ */ j("select", {
736
609
  id: "currency",
737
610
  name: "currency",
738
- value: O.currency,
739
- onChange: V,
611
+ value: H.currency,
612
+ onChange: K,
740
613
  className: "h-10 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)]",
741
- children: [
742
- /* @__PURE__ */ j("option", {
743
- value: "USD",
744
- children: "USD ($)"
745
- }),
746
- /* @__PURE__ */ j("option", {
747
- value: "EUR",
748
- children: "EUR"
749
- }),
750
- /* @__PURE__ */ j("option", {
751
- value: "GBP",
752
- children: "GBP"
753
- }),
754
- /* @__PURE__ */ j("option", {
755
- value: "INR",
756
- children: "INR"
757
- })
758
- ]
614
+ children: u.map((e) => /* @__PURE__ */ j("option", {
615
+ value: e.value,
616
+ children: e.label
617
+ }, e.value))
759
618
  })] })]
760
619
  }),
761
620
  /* @__PURE__ */ M("div", {
@@ -764,8 +623,8 @@ var P = {
764
623
  type: "checkbox",
765
624
  id: "negotiable",
766
625
  name: "negotiable",
767
- checked: O.negotiable,
768
- onChange: V,
626
+ checked: H.negotiable,
627
+ onChange: K,
769
628
  className: "h-4 w-4 rounded border-border-subtle"
770
629
  }), /* @__PURE__ */ j("label", {
771
630
  htmlFor: "negotiable",
@@ -775,12 +634,12 @@ var P = {
775
634
  })
776
635
  ]
777
636
  }),
778
- T === 5 && /* @__PURE__ */ M("div", {
637
+ B === 5 && /* @__PURE__ */ M("div", {
779
638
  className: "space-y-4",
780
639
  children: [
781
640
  /* @__PURE__ */ M("h3", {
782
641
  className: "flex items-center gap-2 text-lg font-semibold text-text-primary",
783
- children: [/* @__PURE__ */ j(E, { className: "h-5 w-5" }), "Property Images"]
642
+ children: [/* @__PURE__ */ j(O, { className: "h-5 w-5" }), "Property Images"]
784
643
  }),
785
644
  /* @__PURE__ */ j("p", {
786
645
  className: "text-sm text-text-secondary",
@@ -790,13 +649,13 @@ var P = {
790
649
  accept: "image/*",
791
650
  multiple: !0,
792
651
  label: "Upload property images",
793
- value: O.images,
794
- onUploaded: z,
795
- onRemove: B
652
+ value: H.images,
653
+ onUploaded: W,
654
+ onRemove: G
796
655
  }),
797
- O.images.length > 0 && /* @__PURE__ */ j("div", {
656
+ H.images.length > 0 && /* @__PURE__ */ j("div", {
798
657
  className: "grid grid-cols-3 gap-3 sm:grid-cols-4",
799
- children: O.images.map((e, t) => /* @__PURE__ */ M("div", {
658
+ children: H.images.map((e, t) => /* @__PURE__ */ M("div", {
800
659
  className: "relative aspect-square overflow-hidden rounded-lg border border-border-subtle bg-bg-sunken/50",
801
660
  children: [/* @__PURE__ */ j("img", {
802
661
  src: e.url,
@@ -815,22 +674,22 @@ var P = {
815
674
  className: "mt-6 flex items-center justify-between",
816
675
  children: [/* @__PURE__ */ M("button", {
817
676
  type: "button",
818
- onClick: () => T === 0 ? y("../properties") : D((e) => e - 1),
819
- disabled: x,
677
+ onClick: () => B === 0 ? T("../properties") : V((e) => e - 1),
678
+ disabled: R,
820
679
  className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken disabled:opacity-50",
821
- children: [/* @__PURE__ */ j(g, { className: "h-4 w-4" }), T === 0 ? "Cancel" : "Previous"]
822
- }), G ? /* @__PURE__ */ j("button", {
680
+ children: [/* @__PURE__ */ j(S, { className: "h-4 w-4" }), B === 0 ? "Cancel" : "Previous"]
681
+ }), X ? /* @__PURE__ */ j("button", {
823
682
  type: "button",
824
- onClick: W,
825
- disabled: !U() || x,
683
+ onClick: Y,
684
+ disabled: !J() || R,
826
685
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-6 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg-hover disabled:opacity-50",
827
- children: x ? "Adding Property..." : "Submit Property"
686
+ children: R ? "Adding Property..." : "Submit Property"
828
687
  }) : /* @__PURE__ */ M("button", {
829
688
  type: "button",
830
- onClick: () => D((e) => e + 1),
831
- disabled: !U(),
689
+ onClick: () => V((e) => e + 1),
690
+ disabled: !J(),
832
691
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg-hover disabled:opacity-50",
833
- children: ["Next", /* @__PURE__ */ j(_, { className: "h-4 w-4" })]
692
+ children: ["Next", /* @__PURE__ */ j(C, { className: "h-4 w-4" })]
834
693
  })]
835
694
  })]
836
695
  })
@@ -838,6 +697,6 @@ var P = {
838
697
  });
839
698
  };
840
699
  //#endregion
841
- export { z as AddPropertyPage };
700
+ export { R as AddPropertyPage };
842
701
 
843
702
  //# sourceMappingURL=AddPropertyPage.js.map