@burdenoff/microfe-housingvista 2026.930.2 → 2026.1001.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/housingvista/pages/offers/OffersPage.d.ts.map +1 -1
- package/dist/housingvista/pages/offers/OffersPage.js +159 -139
- package/dist/housingvista/pages/offers/OffersPage.js.map +1 -1
- package/dist/housingvista/pages/properties/AddPropertyPage.d.ts.map +1 -1
- package/dist/housingvista/pages/properties/AddPropertyPage.js +273 -253
- package/dist/housingvista/pages/properties/AddPropertyPage.js.map +1 -1
- package/dist/housingvista/pages/properties/PropertyDetailPage.d.ts.map +1 -1
- package/dist/housingvista/pages/properties/PropertyDetailPage.js +290 -265
- package/dist/housingvista/pages/properties/PropertyDetailPage.js.map +1 -1
- package/dist/housingvista/utils/propertyOptions.d.ts +11 -1
- package/dist/housingvista/utils/propertyOptions.d.ts.map +1 -1
- package/dist/housingvista/utils/propertyOptions.js +22 -1
- package/dist/housingvista/utils/propertyOptions.js.map +1 -1
- package/package.json +1 -1
|
@@ -8,58 +8,58 @@ 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
10
|
import { amenityOptions as l } from "../../utils/amenities.js";
|
|
11
|
-
import { currencyOptions as u, facingOptions as d, furnishingOptions as f,
|
|
12
|
-
import { useCallback as
|
|
13
|
-
import { Bath as
|
|
14
|
-
import { useNavigate as
|
|
15
|
-
import { jsx as
|
|
16
|
-
import { EmphasisPanel as
|
|
11
|
+
import { currencyOptions as u, facingOptions as d, furnishingOptions as f, imageTypeOptions as p, propertyCategoryOptions as m, propertyTypeOptions as h } from "../../utils/propertyOptions.js";
|
|
12
|
+
import { useCallback as g, useState as _ } from "react";
|
|
13
|
+
import { Bath as v, Bed as y, Calendar as b, Car as x, CheckCircle as S, ChevronLeft as C, ChevronRight as w, DollarSign as T, Home as E, MapPin as D, Maximize as O, Upload as k, Wifi as A } from "lucide-react";
|
|
14
|
+
import { useNavigate as j } from "react-router";
|
|
15
|
+
import { jsx as M, jsxs as N } from "react/jsx-runtime";
|
|
16
|
+
import { EmphasisPanel as P } from "@burdenoff/fe-libs/ui";
|
|
17
17
|
//#region src/housingvista/pages/properties/AddPropertyPage.tsx
|
|
18
|
-
var
|
|
18
|
+
var F = {
|
|
19
19
|
sale: "for_sale",
|
|
20
20
|
rent: "for_rent",
|
|
21
21
|
lease: "for_rent"
|
|
22
|
-
},
|
|
22
|
+
}, I = {
|
|
23
23
|
sale: "sale",
|
|
24
24
|
rent: "rent",
|
|
25
25
|
lease: "lease"
|
|
26
|
-
},
|
|
26
|
+
}, L = [
|
|
27
27
|
{
|
|
28
28
|
id: "basic",
|
|
29
29
|
label: "Basic Info",
|
|
30
|
-
icon:
|
|
30
|
+
icon: E
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
id: "location",
|
|
34
34
|
label: "Location",
|
|
35
|
-
icon:
|
|
35
|
+
icon: D
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
id: "specs",
|
|
39
39
|
label: "Specifications",
|
|
40
|
-
icon:
|
|
40
|
+
icon: O
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
id: "amenities",
|
|
44
44
|
label: "Amenities",
|
|
45
|
-
icon:
|
|
45
|
+
icon: A
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
id: "pricing",
|
|
49
49
|
label: "Pricing",
|
|
50
|
-
icon:
|
|
50
|
+
icon: T
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
id: "images",
|
|
54
54
|
label: "Images",
|
|
55
|
-
icon:
|
|
55
|
+
icon: k
|
|
56
56
|
}
|
|
57
|
-
],
|
|
57
|
+
], R = [{
|
|
58
58
|
label: "Properties",
|
|
59
59
|
href: "../"
|
|
60
|
-
}, { label: "Add New" }],
|
|
60
|
+
}, { label: "Add New" }], z = () => {
|
|
61
61
|
i("housingvista.property.create_viewed");
|
|
62
|
-
let
|
|
62
|
+
let E = j(), { createProperty: A, loading: z } = a(), { emitResource: B } = r(), [V, H] = _(0), [U, W] = _({
|
|
63
63
|
title: "",
|
|
64
64
|
description: "",
|
|
65
65
|
propertyType: "residential",
|
|
@@ -85,133 +85,137 @@ var P = {
|
|
|
85
85
|
currency: "USD",
|
|
86
86
|
negotiable: !1,
|
|
87
87
|
images: []
|
|
88
|
-
}),
|
|
89
|
-
|
|
88
|
+
}), G = g((e) => {
|
|
89
|
+
W((t) => {
|
|
90
90
|
let n = new Set(t.images.map((e) => e.id)), r = [...t.images, ...e.filter((e) => !n.has(e.id))];
|
|
91
91
|
return {
|
|
92
92
|
...t,
|
|
93
93
|
images: r
|
|
94
94
|
};
|
|
95
95
|
});
|
|
96
|
-
}, []),
|
|
97
|
-
|
|
96
|
+
}, []), [K, q] = _({}), J = (e) => K[e] ?? "exterior", Y = g((e) => {
|
|
97
|
+
W((t) => ({
|
|
98
98
|
...t,
|
|
99
99
|
images: t.images.filter((t) => t.id !== e)
|
|
100
|
-
}))
|
|
101
|
-
|
|
100
|
+
})), q((t) => {
|
|
101
|
+
let n = { ...t };
|
|
102
|
+
return delete n[e], n;
|
|
103
|
+
});
|
|
104
|
+
}, []), X = g((e) => {
|
|
102
105
|
let { name: t, value: n, type: r } = e.target;
|
|
103
|
-
|
|
106
|
+
W((i) => ({
|
|
104
107
|
...i,
|
|
105
108
|
[t]: r === "checkbox" ? e.target.checked : n
|
|
106
109
|
}));
|
|
107
|
-
}, []),
|
|
108
|
-
|
|
110
|
+
}, []), Z = g((e) => {
|
|
111
|
+
W((t) => ({
|
|
109
112
|
...t,
|
|
110
113
|
amenities: t.amenities.includes(e) ? t.amenities.filter((t) => t !== e) : [...t.amenities, e]
|
|
111
114
|
}));
|
|
112
|
-
}, []),
|
|
113
|
-
switch (
|
|
114
|
-
case 0: return
|
|
115
|
-
case 1: return
|
|
116
|
-
case 2: return
|
|
115
|
+
}, []), Q = () => {
|
|
116
|
+
switch (V) {
|
|
117
|
+
case 0: return U.title.trim() !== "" && U.description.trim() !== "";
|
|
118
|
+
case 1: return U.address.trim() !== "" && U.city.trim() !== "" && U.state.trim() !== "";
|
|
119
|
+
case 2: return U.area.trim() !== "";
|
|
117
120
|
case 3: return !0;
|
|
118
|
-
case 4: return
|
|
121
|
+
case 4: return U.price.trim() !== "";
|
|
119
122
|
case 5: return !0;
|
|
120
123
|
default: return !1;
|
|
121
124
|
}
|
|
122
|
-
},
|
|
125
|
+
}, $ = async () => {
|
|
123
126
|
let e = {
|
|
124
|
-
title:
|
|
125
|
-
description:
|
|
126
|
-
status:
|
|
127
|
-
type:
|
|
128
|
-
category:
|
|
129
|
-
address:
|
|
130
|
-
city:
|
|
131
|
-
state:
|
|
132
|
-
country:
|
|
133
|
-
pincode:
|
|
134
|
-
neighborhood:
|
|
135
|
-
coordinates:
|
|
136
|
-
price: Number(
|
|
137
|
-
currency:
|
|
138
|
-
priceType:
|
|
139
|
-
negotiable:
|
|
140
|
-
bedrooms: Number(
|
|
141
|
-
bathrooms: Number(
|
|
142
|
-
totalArea: Number(
|
|
143
|
-
floors:
|
|
144
|
-
parking:
|
|
145
|
-
furnishingStatus:
|
|
146
|
-
ageOfProperty:
|
|
147
|
-
facing:
|
|
148
|
-
amenities:
|
|
127
|
+
title: U.title.trim(),
|
|
128
|
+
description: U.description.trim() || void 0,
|
|
129
|
+
status: F[U.listingType] ?? "for_sale",
|
|
130
|
+
type: U.propertyType,
|
|
131
|
+
category: U.category,
|
|
132
|
+
address: U.address.trim() || void 0,
|
|
133
|
+
city: U.city.trim(),
|
|
134
|
+
state: U.state.trim(),
|
|
135
|
+
country: U.country || void 0,
|
|
136
|
+
pincode: U.zipCode.trim() || void 0,
|
|
137
|
+
neighborhood: U.neighborhood.trim() || void 0,
|
|
138
|
+
coordinates: U.coordinates ?? void 0,
|
|
139
|
+
price: Number(U.price) || 0,
|
|
140
|
+
currency: U.currency,
|
|
141
|
+
priceType: I[U.listingType] ?? "sale",
|
|
142
|
+
negotiable: U.negotiable,
|
|
143
|
+
bedrooms: Number(U.bedrooms) || 0,
|
|
144
|
+
bathrooms: Number(U.bathrooms) || 0,
|
|
145
|
+
totalArea: Number(U.area) || 0,
|
|
146
|
+
floors: U.floors ? Number(U.floors) : void 0,
|
|
147
|
+
parking: U.parking ? Number(U.parking) : void 0,
|
|
148
|
+
furnishingStatus: U.furnishing,
|
|
149
|
+
ageOfProperty: U.yearBuilt ? Math.max(0, (/* @__PURE__ */ new Date()).getFullYear() - Number(U.yearBuilt)) : void 0,
|
|
150
|
+
facing: U.facing,
|
|
151
|
+
amenities: U.amenities.map((e) => ({
|
|
149
152
|
name: l.find((t) => t.id === e)?.label ?? e,
|
|
150
153
|
category: "general",
|
|
151
154
|
available: !0
|
|
152
155
|
})),
|
|
153
|
-
images:
|
|
156
|
+
images: U.images.map((e, t) => ({
|
|
154
157
|
url: e.url,
|
|
158
|
+
type: J(e.id),
|
|
155
159
|
isPrimary: t === 0,
|
|
156
160
|
order: t
|
|
157
161
|
}))
|
|
158
162
|
};
|
|
159
163
|
try {
|
|
160
|
-
let t = await
|
|
161
|
-
|
|
164
|
+
let t = await A(e);
|
|
165
|
+
B("housingvista.property.created", t.id), o.success("Property created", `${t.title} has been added to your listings.`), E(`../properties/${t.id}`);
|
|
162
166
|
} catch (e) {
|
|
163
167
|
o.error("Could not create property", e.message);
|
|
164
168
|
}
|
|
165
|
-
},
|
|
166
|
-
return /* @__PURE__ */
|
|
169
|
+
}, ee = V === L.length - 1;
|
|
170
|
+
return /* @__PURE__ */ N(t, {
|
|
167
171
|
title: "Add New Property",
|
|
168
172
|
description: "List your property for sale or rent",
|
|
169
173
|
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.",
|
|
170
174
|
children: [
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
-
/* @__PURE__ */
|
|
175
|
+
/* @__PURE__ */ M(n, { items: R }),
|
|
176
|
+
/* @__PURE__ */ N(P, {
|
|
173
177
|
className: "p-5",
|
|
174
178
|
children: [
|
|
175
|
-
/* @__PURE__ */
|
|
179
|
+
/* @__PURE__ */ N("div", {
|
|
176
180
|
className: "mb-3 flex items-center justify-between",
|
|
177
|
-
children: [/* @__PURE__ */
|
|
181
|
+
children: [/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ N("p", {
|
|
178
182
|
className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
|
|
179
183
|
children: [
|
|
180
184
|
"Step ",
|
|
181
|
-
|
|
185
|
+
V + 1,
|
|
182
186
|
" of ",
|
|
183
|
-
|
|
187
|
+
L.length
|
|
184
188
|
]
|
|
185
|
-
}), /* @__PURE__ */
|
|
189
|
+
}), /* @__PURE__ */ M("p", {
|
|
186
190
|
className: "text-base font-semibold text-text-primary",
|
|
187
|
-
children:
|
|
188
|
-
})] }), /* @__PURE__ */
|
|
191
|
+
children: L[V].label
|
|
192
|
+
})] }), /* @__PURE__ */ N("span", {
|
|
189
193
|
className: "text-sm font-semibold text-text-primary",
|
|
190
|
-
children: [Math.round((
|
|
194
|
+
children: [Math.round((V + 1) / L.length * 100), "%"]
|
|
191
195
|
})]
|
|
192
196
|
}),
|
|
193
|
-
/* @__PURE__ */
|
|
197
|
+
/* @__PURE__ */ M("div", {
|
|
194
198
|
className: "h-1.5 w-full overflow-hidden rounded-full bg-bg-sunken",
|
|
195
|
-
children: /* @__PURE__ */
|
|
199
|
+
children: /* @__PURE__ */ M("div", {
|
|
196
200
|
className: "h-full rounded-full bg-action-primary-bg transition-[width] duration-300",
|
|
197
|
-
style: { width: `${(
|
|
201
|
+
style: { width: `${(V + 1) / L.length * 100}%` }
|
|
198
202
|
})
|
|
199
203
|
}),
|
|
200
|
-
/* @__PURE__ */
|
|
204
|
+
/* @__PURE__ */ M("div", {
|
|
201
205
|
className: "mt-4 flex items-center gap-1 overflow-x-auto pb-1",
|
|
202
|
-
children:
|
|
203
|
-
let r = t.icon, i = n ===
|
|
204
|
-
return /* @__PURE__ */
|
|
205
|
-
onClick: () => 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 >
|
|
207
|
-
disabled: n >
|
|
206
|
+
children: L.map((t, n) => {
|
|
207
|
+
let r = t.icon, i = n === V, a = n < V;
|
|
208
|
+
return /* @__PURE__ */ N("button", {
|
|
209
|
+
onClick: () => n <= V && H(n),
|
|
210
|
+
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 > V && "cursor-not-allowed"),
|
|
211
|
+
disabled: n > V,
|
|
208
212
|
children: [
|
|
209
|
-
|
|
210
|
-
/* @__PURE__ */
|
|
213
|
+
M(a ? S : r, { className: "h-4 w-4" }),
|
|
214
|
+
/* @__PURE__ */ M("span", {
|
|
211
215
|
className: "hidden sm:inline",
|
|
212
216
|
children: t.label
|
|
213
217
|
}),
|
|
214
|
-
/* @__PURE__ */
|
|
218
|
+
/* @__PURE__ */ M("span", {
|
|
215
219
|
className: "sm:hidden",
|
|
216
220
|
children: n + 1
|
|
217
221
|
})
|
|
@@ -221,97 +225,97 @@ var P = {
|
|
|
221
225
|
})
|
|
222
226
|
]
|
|
223
227
|
}),
|
|
224
|
-
/* @__PURE__ */
|
|
228
|
+
/* @__PURE__ */ N("div", {
|
|
225
229
|
className: "max-w-3xl",
|
|
226
|
-
children: [/* @__PURE__ */
|
|
230
|
+
children: [/* @__PURE__ */ N("div", {
|
|
227
231
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
|
|
228
232
|
children: [
|
|
229
|
-
|
|
233
|
+
V === 0 && /* @__PURE__ */ N("div", {
|
|
230
234
|
className: "space-y-4",
|
|
231
235
|
children: [
|
|
232
|
-
/* @__PURE__ */
|
|
236
|
+
/* @__PURE__ */ M("h3", {
|
|
233
237
|
className: "text-lg font-semibold text-text-primary",
|
|
234
238
|
children: "Basic Information"
|
|
235
239
|
}),
|
|
236
|
-
/* @__PURE__ */
|
|
240
|
+
/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("label", {
|
|
237
241
|
htmlFor: "title",
|
|
238
242
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
239
243
|
children: "Property Title *"
|
|
240
|
-
}), /* @__PURE__ */
|
|
244
|
+
}), /* @__PURE__ */ M("input", {
|
|
241
245
|
id: "title",
|
|
242
246
|
name: "title",
|
|
243
|
-
value:
|
|
244
|
-
onChange:
|
|
247
|
+
value: U.title,
|
|
248
|
+
onChange: X,
|
|
245
249
|
placeholder: "e.g., Luxury 3BHK Apartment in Downtown",
|
|
246
250
|
required: !0,
|
|
247
251
|
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)]"
|
|
248
252
|
})] }),
|
|
249
|
-
/* @__PURE__ */
|
|
253
|
+
/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("label", {
|
|
250
254
|
htmlFor: "description",
|
|
251
255
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
252
256
|
children: "Description *"
|
|
253
|
-
}), /* @__PURE__ */
|
|
257
|
+
}), /* @__PURE__ */ M("textarea", {
|
|
254
258
|
id: "description",
|
|
255
259
|
name: "description",
|
|
256
|
-
value:
|
|
257
|
-
onChange:
|
|
260
|
+
value: U.description,
|
|
261
|
+
onChange: X,
|
|
258
262
|
placeholder: "Describe your property in detail...",
|
|
259
263
|
required: !0,
|
|
260
264
|
rows: 4,
|
|
261
265
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
262
266
|
})] }),
|
|
263
|
-
/* @__PURE__ */
|
|
267
|
+
/* @__PURE__ */ N("div", {
|
|
264
268
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
265
|
-
children: [/* @__PURE__ */
|
|
269
|
+
children: [/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("label", {
|
|
266
270
|
htmlFor: "propertyType",
|
|
267
271
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
268
272
|
children: "Property Type *"
|
|
269
|
-
}), /* @__PURE__ */
|
|
273
|
+
}), /* @__PURE__ */ M("select", {
|
|
270
274
|
id: "propertyType",
|
|
271
275
|
name: "propertyType",
|
|
272
|
-
value:
|
|
273
|
-
onChange:
|
|
276
|
+
value: U.propertyType,
|
|
277
|
+
onChange: X,
|
|
274
278
|
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)]",
|
|
275
|
-
children:
|
|
279
|
+
children: h.map((e) => /* @__PURE__ */ M("option", {
|
|
276
280
|
value: e.value,
|
|
277
281
|
children: e.label
|
|
278
282
|
}, e.value))
|
|
279
|
-
})] }), /* @__PURE__ */
|
|
283
|
+
})] }), /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("label", {
|
|
280
284
|
htmlFor: "category",
|
|
281
285
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
282
286
|
children: "Category *"
|
|
283
|
-
}), /* @__PURE__ */
|
|
287
|
+
}), /* @__PURE__ */ M("select", {
|
|
284
288
|
id: "category",
|
|
285
289
|
name: "category",
|
|
286
|
-
value:
|
|
287
|
-
onChange:
|
|
290
|
+
value: U.category,
|
|
291
|
+
onChange: X,
|
|
288
292
|
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)]",
|
|
289
|
-
children:
|
|
293
|
+
children: m.map((e) => /* @__PURE__ */ M("option", {
|
|
290
294
|
value: e.value,
|
|
291
295
|
children: e.label
|
|
292
296
|
}, e.value))
|
|
293
297
|
})] })]
|
|
294
298
|
}),
|
|
295
|
-
/* @__PURE__ */
|
|
299
|
+
/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("label", {
|
|
296
300
|
htmlFor: "listingType",
|
|
297
301
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
298
302
|
children: "Listing Type *"
|
|
299
|
-
}), /* @__PURE__ */
|
|
303
|
+
}), /* @__PURE__ */ N("select", {
|
|
300
304
|
id: "listingType",
|
|
301
305
|
name: "listingType",
|
|
302
|
-
value:
|
|
303
|
-
onChange:
|
|
306
|
+
value: U.listingType,
|
|
307
|
+
onChange: X,
|
|
304
308
|
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",
|
|
305
309
|
children: [
|
|
306
|
-
/* @__PURE__ */
|
|
310
|
+
/* @__PURE__ */ M("option", {
|
|
307
311
|
value: "sale",
|
|
308
312
|
children: "For Sale"
|
|
309
313
|
}),
|
|
310
|
-
/* @__PURE__ */
|
|
314
|
+
/* @__PURE__ */ M("option", {
|
|
311
315
|
value: "rent",
|
|
312
316
|
children: "For Rent"
|
|
313
317
|
}),
|
|
314
|
-
/* @__PURE__ */
|
|
318
|
+
/* @__PURE__ */ M("option", {
|
|
315
319
|
value: "lease",
|
|
316
320
|
children: "For Lease"
|
|
317
321
|
})
|
|
@@ -319,230 +323,230 @@ var P = {
|
|
|
319
323
|
})] })
|
|
320
324
|
]
|
|
321
325
|
}),
|
|
322
|
-
|
|
326
|
+
V === 1 && /* @__PURE__ */ N("div", {
|
|
323
327
|
className: "space-y-4",
|
|
324
328
|
children: [
|
|
325
|
-
/* @__PURE__ */
|
|
329
|
+
/* @__PURE__ */ N("h3", {
|
|
326
330
|
className: "flex items-center gap-2 text-lg font-semibold text-text-primary",
|
|
327
|
-
children: [/* @__PURE__ */
|
|
331
|
+
children: [/* @__PURE__ */ M(D, { className: "h-5 w-5" }), "Location Details"]
|
|
328
332
|
}),
|
|
329
|
-
/* @__PURE__ */
|
|
333
|
+
/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("label", {
|
|
330
334
|
htmlFor: "address",
|
|
331
335
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
332
336
|
children: "Street Address *"
|
|
333
|
-
}), /* @__PURE__ */
|
|
337
|
+
}), /* @__PURE__ */ M("input", {
|
|
334
338
|
id: "address",
|
|
335
339
|
name: "address",
|
|
336
|
-
value:
|
|
337
|
-
onChange:
|
|
340
|
+
value: U.address,
|
|
341
|
+
onChange: X,
|
|
338
342
|
placeholder: "e.g., 123 Main Street, Unit 2504",
|
|
339
343
|
required: !0,
|
|
340
344
|
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)]"
|
|
341
345
|
})] }),
|
|
342
|
-
/* @__PURE__ */
|
|
346
|
+
/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("label", {
|
|
343
347
|
htmlFor: "neighborhood",
|
|
344
348
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
345
349
|
children: "Neighborhood"
|
|
346
|
-
}), /* @__PURE__ */
|
|
350
|
+
}), /* @__PURE__ */ M("input", {
|
|
347
351
|
id: "neighborhood",
|
|
348
352
|
name: "neighborhood",
|
|
349
|
-
value:
|
|
350
|
-
onChange:
|
|
353
|
+
value: U.neighborhood,
|
|
354
|
+
onChange: X,
|
|
351
355
|
placeholder: "e.g., Midtown",
|
|
352
356
|
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)]"
|
|
353
357
|
})] }),
|
|
354
|
-
/* @__PURE__ */
|
|
358
|
+
/* @__PURE__ */ N("div", {
|
|
355
359
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
|
|
356
360
|
children: [
|
|
357
|
-
/* @__PURE__ */
|
|
361
|
+
/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("label", {
|
|
358
362
|
htmlFor: "city",
|
|
359
363
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
360
364
|
children: "City *"
|
|
361
|
-
}), /* @__PURE__ */
|
|
365
|
+
}), /* @__PURE__ */ M("input", {
|
|
362
366
|
id: "city",
|
|
363
367
|
name: "city",
|
|
364
|
-
value:
|
|
365
|
-
onChange:
|
|
368
|
+
value: U.city,
|
|
369
|
+
onChange: X,
|
|
366
370
|
placeholder: "City",
|
|
367
371
|
required: !0,
|
|
368
372
|
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)]"
|
|
369
373
|
})] }),
|
|
370
|
-
/* @__PURE__ */
|
|
374
|
+
/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("label", {
|
|
371
375
|
htmlFor: "state",
|
|
372
376
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
373
377
|
children: "State *"
|
|
374
|
-
}), /* @__PURE__ */
|
|
378
|
+
}), /* @__PURE__ */ M("input", {
|
|
375
379
|
id: "state",
|
|
376
380
|
name: "state",
|
|
377
|
-
value:
|
|
378
|
-
onChange:
|
|
381
|
+
value: U.state,
|
|
382
|
+
onChange: X,
|
|
379
383
|
placeholder: "State",
|
|
380
384
|
required: !0,
|
|
381
385
|
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)]"
|
|
382
386
|
})] }),
|
|
383
|
-
/* @__PURE__ */
|
|
387
|
+
/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("label", {
|
|
384
388
|
htmlFor: "zipCode",
|
|
385
389
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
386
390
|
children: "ZIP Code *"
|
|
387
|
-
}), /* @__PURE__ */
|
|
391
|
+
}), /* @__PURE__ */ M("input", {
|
|
388
392
|
id: "zipCode",
|
|
389
393
|
name: "zipCode",
|
|
390
|
-
value:
|
|
391
|
-
onChange:
|
|
394
|
+
value: U.zipCode,
|
|
395
|
+
onChange: X,
|
|
392
396
|
placeholder: "ZIP Code",
|
|
393
397
|
required: !0,
|
|
394
398
|
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)]"
|
|
395
399
|
})] })
|
|
396
400
|
]
|
|
397
401
|
}),
|
|
398
|
-
/* @__PURE__ */
|
|
402
|
+
/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("label", {
|
|
399
403
|
htmlFor: "country",
|
|
400
404
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
401
405
|
children: "Country"
|
|
402
|
-
}), /* @__PURE__ */
|
|
406
|
+
}), /* @__PURE__ */ N("select", {
|
|
403
407
|
id: "country",
|
|
404
408
|
name: "country",
|
|
405
|
-
value:
|
|
406
|
-
onChange:
|
|
409
|
+
value: U.country,
|
|
410
|
+
onChange: X,
|
|
407
411
|
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",
|
|
408
412
|
children: [
|
|
409
|
-
/* @__PURE__ */
|
|
413
|
+
/* @__PURE__ */ M("option", {
|
|
410
414
|
value: "USA",
|
|
411
415
|
children: "United States"
|
|
412
416
|
}),
|
|
413
|
-
/* @__PURE__ */
|
|
417
|
+
/* @__PURE__ */ M("option", {
|
|
414
418
|
value: "Canada",
|
|
415
419
|
children: "Canada"
|
|
416
420
|
}),
|
|
417
|
-
/* @__PURE__ */
|
|
421
|
+
/* @__PURE__ */ M("option", {
|
|
418
422
|
value: "UK",
|
|
419
423
|
children: "United Kingdom"
|
|
420
424
|
}),
|
|
421
|
-
/* @__PURE__ */
|
|
425
|
+
/* @__PURE__ */ M("option", {
|
|
422
426
|
value: "India",
|
|
423
427
|
children: "India"
|
|
424
428
|
})
|
|
425
429
|
]
|
|
426
430
|
})] }),
|
|
427
|
-
/* @__PURE__ */
|
|
431
|
+
/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("label", {
|
|
428
432
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
429
433
|
children: "Map location (optional)"
|
|
430
|
-
}), /* @__PURE__ */
|
|
431
|
-
value:
|
|
432
|
-
onChange: (e) =>
|
|
434
|
+
}), /* @__PURE__ */ M(c, {
|
|
435
|
+
value: U.coordinates,
|
|
436
|
+
onChange: (e) => W((t) => ({
|
|
433
437
|
...t,
|
|
434
438
|
coordinates: e
|
|
435
439
|
}))
|
|
436
440
|
})] })
|
|
437
441
|
]
|
|
438
442
|
}),
|
|
439
|
-
|
|
443
|
+
V === 2 && /* @__PURE__ */ N("div", {
|
|
440
444
|
className: "space-y-4",
|
|
441
445
|
children: [
|
|
442
|
-
/* @__PURE__ */
|
|
446
|
+
/* @__PURE__ */ M("h3", {
|
|
443
447
|
className: "text-lg font-semibold text-text-primary",
|
|
444
448
|
children: "Property Specifications"
|
|
445
449
|
}),
|
|
446
|
-
/* @__PURE__ */
|
|
450
|
+
/* @__PURE__ */ N("div", {
|
|
447
451
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
448
|
-
children: [/* @__PURE__ */
|
|
452
|
+
children: [/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ N("label", {
|
|
449
453
|
htmlFor: "area",
|
|
450
454
|
className: "mb-1.5 flex items-center gap-1.5 text-sm font-medium text-text-primary",
|
|
451
|
-
children: [/* @__PURE__ */
|
|
452
|
-
}), /* @__PURE__ */
|
|
455
|
+
children: [/* @__PURE__ */ M(O, { className: "h-4 w-4" }), "Total Area (sq ft) *"]
|
|
456
|
+
}), /* @__PURE__ */ M("input", {
|
|
453
457
|
id: "area",
|
|
454
458
|
name: "area",
|
|
455
459
|
type: "number",
|
|
456
|
-
value:
|
|
457
|
-
onChange:
|
|
460
|
+
value: U.area,
|
|
461
|
+
onChange: X,
|
|
458
462
|
placeholder: "Enter area",
|
|
459
463
|
required: !0,
|
|
460
464
|
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
|
-
})] }), /* @__PURE__ */
|
|
465
|
+
})] }), /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ N("label", {
|
|
462
466
|
htmlFor: "yearBuilt",
|
|
463
467
|
className: "mb-1.5 flex items-center gap-1.5 text-sm font-medium text-text-primary",
|
|
464
|
-
children: [/* @__PURE__ */
|
|
465
|
-
}), /* @__PURE__ */
|
|
468
|
+
children: [/* @__PURE__ */ M(b, { className: "h-4 w-4" }), "Year Built"]
|
|
469
|
+
}), /* @__PURE__ */ M("input", {
|
|
466
470
|
id: "yearBuilt",
|
|
467
471
|
name: "yearBuilt",
|
|
468
472
|
type: "number",
|
|
469
|
-
value:
|
|
470
|
-
onChange:
|
|
473
|
+
value: U.yearBuilt,
|
|
474
|
+
onChange: X,
|
|
471
475
|
placeholder: "YYYY",
|
|
472
476
|
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)]"
|
|
473
477
|
})] })]
|
|
474
478
|
}),
|
|
475
|
-
/* @__PURE__ */
|
|
479
|
+
/* @__PURE__ */ N("div", {
|
|
476
480
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
|
|
477
481
|
children: [
|
|
478
|
-
/* @__PURE__ */
|
|
482
|
+
/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ N("label", {
|
|
479
483
|
htmlFor: "bedrooms",
|
|
480
484
|
className: "mb-1.5 flex items-center gap-1.5 text-sm font-medium text-text-primary",
|
|
481
|
-
children: [/* @__PURE__ */
|
|
482
|
-
}), /* @__PURE__ */
|
|
485
|
+
children: [/* @__PURE__ */ M(y, { className: "h-4 w-4" }), "Bedrooms"]
|
|
486
|
+
}), /* @__PURE__ */ M("input", {
|
|
483
487
|
id: "bedrooms",
|
|
484
488
|
name: "bedrooms",
|
|
485
489
|
type: "number",
|
|
486
|
-
value:
|
|
487
|
-
onChange:
|
|
490
|
+
value: U.bedrooms,
|
|
491
|
+
onChange: X,
|
|
488
492
|
placeholder: "0",
|
|
489
493
|
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)]"
|
|
490
494
|
})] }),
|
|
491
|
-
/* @__PURE__ */
|
|
495
|
+
/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ N("label", {
|
|
492
496
|
htmlFor: "bathrooms",
|
|
493
497
|
className: "mb-1.5 flex items-center gap-1.5 text-sm font-medium text-text-primary",
|
|
494
|
-
children: [/* @__PURE__ */
|
|
495
|
-
}), /* @__PURE__ */
|
|
498
|
+
children: [/* @__PURE__ */ M(v, { className: "h-4 w-4" }), "Bathrooms"]
|
|
499
|
+
}), /* @__PURE__ */ M("input", {
|
|
496
500
|
id: "bathrooms",
|
|
497
501
|
name: "bathrooms",
|
|
498
502
|
type: "number",
|
|
499
|
-
value:
|
|
500
|
-
onChange:
|
|
503
|
+
value: U.bathrooms,
|
|
504
|
+
onChange: X,
|
|
501
505
|
placeholder: "0",
|
|
502
506
|
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)]"
|
|
503
507
|
})] }),
|
|
504
|
-
/* @__PURE__ */
|
|
508
|
+
/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ N("label", {
|
|
505
509
|
htmlFor: "parking",
|
|
506
510
|
className: "mb-1.5 flex items-center gap-1.5 text-sm font-medium text-text-primary",
|
|
507
|
-
children: [/* @__PURE__ */
|
|
508
|
-
}), /* @__PURE__ */
|
|
511
|
+
children: [/* @__PURE__ */ M(x, { className: "h-4 w-4" }), "Parking Spots"]
|
|
512
|
+
}), /* @__PURE__ */ M("input", {
|
|
509
513
|
id: "parking",
|
|
510
514
|
name: "parking",
|
|
511
515
|
type: "number",
|
|
512
|
-
value:
|
|
513
|
-
onChange:
|
|
516
|
+
value: U.parking,
|
|
517
|
+
onChange: X,
|
|
514
518
|
placeholder: "0",
|
|
515
519
|
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)]"
|
|
516
520
|
})] })
|
|
517
521
|
]
|
|
518
522
|
}),
|
|
519
|
-
/* @__PURE__ */
|
|
523
|
+
/* @__PURE__ */ N("div", {
|
|
520
524
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
521
|
-
children: [/* @__PURE__ */
|
|
525
|
+
children: [/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("label", {
|
|
522
526
|
htmlFor: "furnishing",
|
|
523
527
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
524
528
|
children: "Furnishing Status"
|
|
525
|
-
}), /* @__PURE__ */
|
|
529
|
+
}), /* @__PURE__ */ M("select", {
|
|
526
530
|
id: "furnishing",
|
|
527
531
|
name: "furnishing",
|
|
528
|
-
value:
|
|
529
|
-
onChange:
|
|
532
|
+
value: U.furnishing,
|
|
533
|
+
onChange: X,
|
|
530
534
|
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)]",
|
|
531
|
-
children: f.map((e) => /* @__PURE__ */
|
|
535
|
+
children: f.map((e) => /* @__PURE__ */ M("option", {
|
|
532
536
|
value: e.value,
|
|
533
537
|
children: e.label
|
|
534
538
|
}, e.value))
|
|
535
|
-
})] }), /* @__PURE__ */
|
|
539
|
+
})] }), /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("label", {
|
|
536
540
|
htmlFor: "facing",
|
|
537
541
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
538
542
|
children: "Facing Direction"
|
|
539
|
-
}), /* @__PURE__ */
|
|
543
|
+
}), /* @__PURE__ */ M("select", {
|
|
540
544
|
id: "facing",
|
|
541
545
|
name: "facing",
|
|
542
|
-
value:
|
|
543
|
-
onChange:
|
|
546
|
+
value: U.facing,
|
|
547
|
+
onChange: X,
|
|
544
548
|
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)]",
|
|
545
|
-
children: d.map((e) => /* @__PURE__ */
|
|
549
|
+
children: d.map((e) => /* @__PURE__ */ M("option", {
|
|
546
550
|
value: e,
|
|
547
551
|
children: e
|
|
548
552
|
}, e))
|
|
@@ -550,83 +554,83 @@ var P = {
|
|
|
550
554
|
})
|
|
551
555
|
]
|
|
552
556
|
}),
|
|
553
|
-
|
|
557
|
+
V === 3 && /* @__PURE__ */ N("div", {
|
|
554
558
|
className: "space-y-4",
|
|
555
559
|
children: [
|
|
556
|
-
/* @__PURE__ */
|
|
560
|
+
/* @__PURE__ */ M("h3", {
|
|
557
561
|
className: "text-lg font-semibold text-text-primary",
|
|
558
562
|
children: "Property Amenities"
|
|
559
563
|
}),
|
|
560
|
-
/* @__PURE__ */
|
|
564
|
+
/* @__PURE__ */ M("p", {
|
|
561
565
|
className: "text-sm text-text-secondary",
|
|
562
566
|
children: "Select all amenities available at this property."
|
|
563
567
|
}),
|
|
564
|
-
/* @__PURE__ */
|
|
568
|
+
/* @__PURE__ */ M("div", {
|
|
565
569
|
className: "grid grid-cols-2 gap-3 sm:grid-cols-4",
|
|
566
570
|
children: l.map((t) => {
|
|
567
|
-
let n = t.icon, r =
|
|
568
|
-
return /* @__PURE__ */
|
|
571
|
+
let n = t.icon, r = U.amenities.includes(t.id);
|
|
572
|
+
return /* @__PURE__ */ N("button", {
|
|
569
573
|
type: "button",
|
|
570
|
-
onClick: () =>
|
|
574
|
+
onClick: () => Z(t.id),
|
|
571
575
|
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"),
|
|
572
576
|
children: [
|
|
573
|
-
/* @__PURE__ */
|
|
574
|
-
/* @__PURE__ */
|
|
575
|
-
r && /* @__PURE__ */
|
|
577
|
+
/* @__PURE__ */ M(n, { className: "h-6 w-6" }),
|
|
578
|
+
/* @__PURE__ */ M("span", { children: t.label }),
|
|
579
|
+
r && /* @__PURE__ */ M(S, { className: "h-4 w-4 text-status-success-text" })
|
|
576
580
|
]
|
|
577
581
|
}, t.id);
|
|
578
582
|
})
|
|
579
583
|
})
|
|
580
584
|
]
|
|
581
585
|
}),
|
|
582
|
-
|
|
586
|
+
V === 4 && /* @__PURE__ */ N("div", {
|
|
583
587
|
className: "space-y-4",
|
|
584
588
|
children: [
|
|
585
|
-
/* @__PURE__ */
|
|
589
|
+
/* @__PURE__ */ N("h3", {
|
|
586
590
|
className: "flex items-center gap-2 text-lg font-semibold text-text-primary",
|
|
587
|
-
children: [/* @__PURE__ */
|
|
591
|
+
children: [/* @__PURE__ */ M(T, { className: "h-5 w-5" }), "Pricing Details"]
|
|
588
592
|
}),
|
|
589
|
-
/* @__PURE__ */
|
|
593
|
+
/* @__PURE__ */ N("div", {
|
|
590
594
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
591
|
-
children: [/* @__PURE__ */
|
|
595
|
+
children: [/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("label", {
|
|
592
596
|
htmlFor: "price",
|
|
593
597
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
594
598
|
children: "Price *"
|
|
595
|
-
}), /* @__PURE__ */
|
|
599
|
+
}), /* @__PURE__ */ M("input", {
|
|
596
600
|
id: "price",
|
|
597
601
|
name: "price",
|
|
598
602
|
type: "number",
|
|
599
|
-
value:
|
|
600
|
-
onChange:
|
|
603
|
+
value: U.price,
|
|
604
|
+
onChange: X,
|
|
601
605
|
placeholder: "Enter price",
|
|
602
606
|
required: !0,
|
|
603
607
|
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)]"
|
|
604
|
-
})] }), /* @__PURE__ */
|
|
608
|
+
})] }), /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("label", {
|
|
605
609
|
htmlFor: "currency",
|
|
606
610
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
607
611
|
children: "Currency"
|
|
608
|
-
}), /* @__PURE__ */
|
|
612
|
+
}), /* @__PURE__ */ M("select", {
|
|
609
613
|
id: "currency",
|
|
610
614
|
name: "currency",
|
|
611
|
-
value:
|
|
612
|
-
onChange:
|
|
615
|
+
value: U.currency,
|
|
616
|
+
onChange: X,
|
|
613
617
|
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)]",
|
|
614
|
-
children: u.map((e) => /* @__PURE__ */
|
|
618
|
+
children: u.map((e) => /* @__PURE__ */ M("option", {
|
|
615
619
|
value: e.value,
|
|
616
620
|
children: e.label
|
|
617
621
|
}, e.value))
|
|
618
622
|
})] })]
|
|
619
623
|
}),
|
|
620
|
-
/* @__PURE__ */
|
|
624
|
+
/* @__PURE__ */ N("div", {
|
|
621
625
|
className: "flex items-center gap-2",
|
|
622
|
-
children: [/* @__PURE__ */
|
|
626
|
+
children: [/* @__PURE__ */ M("input", {
|
|
623
627
|
type: "checkbox",
|
|
624
628
|
id: "negotiable",
|
|
625
629
|
name: "negotiable",
|
|
626
|
-
checked:
|
|
627
|
-
onChange:
|
|
630
|
+
checked: U.negotiable,
|
|
631
|
+
onChange: X,
|
|
628
632
|
className: "h-4 w-4 rounded border-border-subtle"
|
|
629
|
-
}), /* @__PURE__ */
|
|
633
|
+
}), /* @__PURE__ */ M("label", {
|
|
630
634
|
htmlFor: "negotiable",
|
|
631
635
|
className: "text-sm text-text-primary",
|
|
632
636
|
children: "Price is negotiable"
|
|
@@ -634,62 +638,78 @@ var P = {
|
|
|
634
638
|
})
|
|
635
639
|
]
|
|
636
640
|
}),
|
|
637
|
-
|
|
641
|
+
V === 5 && /* @__PURE__ */ N("div", {
|
|
638
642
|
className: "space-y-4",
|
|
639
643
|
children: [
|
|
640
|
-
/* @__PURE__ */
|
|
644
|
+
/* @__PURE__ */ N("h3", {
|
|
641
645
|
className: "flex items-center gap-2 text-lg font-semibold text-text-primary",
|
|
642
|
-
children: [/* @__PURE__ */
|
|
646
|
+
children: [/* @__PURE__ */ M(k, { className: "h-5 w-5" }), "Property Images"]
|
|
643
647
|
}),
|
|
644
|
-
/* @__PURE__ */
|
|
648
|
+
/* @__PURE__ */ M("p", {
|
|
645
649
|
className: "text-sm text-text-secondary",
|
|
646
650
|
children: "Upload photos of the property (JPG, PNG). The first image becomes the cover."
|
|
647
651
|
}),
|
|
648
|
-
/* @__PURE__ */
|
|
652
|
+
/* @__PURE__ */ M(s, {
|
|
649
653
|
accept: "image/*",
|
|
650
654
|
multiple: !0,
|
|
651
655
|
label: "Upload property images",
|
|
652
|
-
value:
|
|
653
|
-
onUploaded:
|
|
654
|
-
onRemove:
|
|
656
|
+
value: U.images,
|
|
657
|
+
onUploaded: G,
|
|
658
|
+
onRemove: Y
|
|
655
659
|
}),
|
|
656
|
-
|
|
660
|
+
U.images.length > 0 && /* @__PURE__ */ M("div", {
|
|
657
661
|
className: "grid grid-cols-3 gap-3 sm:grid-cols-4",
|
|
658
|
-
children:
|
|
662
|
+
children: U.images.map((e, t) => /* @__PURE__ */ N("div", {
|
|
659
663
|
className: "relative aspect-square overflow-hidden rounded-lg border border-border-subtle bg-bg-sunken/50",
|
|
660
|
-
children: [
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
664
|
+
children: [
|
|
665
|
+
/* @__PURE__ */ M("img", {
|
|
666
|
+
src: e.url,
|
|
667
|
+
alt: e.name,
|
|
668
|
+
className: "h-full w-full object-cover"
|
|
669
|
+
}),
|
|
670
|
+
t === 0 && /* @__PURE__ */ M("span", {
|
|
671
|
+
className: "absolute left-1.5 top-1.5 rounded bg-action-primary-bg px-1.5 py-0.5 text-[10px] font-semibold text-action-primary-text",
|
|
672
|
+
children: "Cover"
|
|
673
|
+
}),
|
|
674
|
+
/* @__PURE__ */ M("select", {
|
|
675
|
+
"aria-label": `Image type for ${e.name}`,
|
|
676
|
+
value: J(e.id),
|
|
677
|
+
onChange: (t) => q((n) => ({
|
|
678
|
+
...n,
|
|
679
|
+
[e.id]: t.target.value
|
|
680
|
+
})),
|
|
681
|
+
className: "absolute inset-x-1 bottom-1 h-6 rounded border border-border-subtle bg-bg-surface px-1 text-[10px] text-text-primary",
|
|
682
|
+
children: p.map((e) => /* @__PURE__ */ M("option", {
|
|
683
|
+
value: e.value,
|
|
684
|
+
children: e.label
|
|
685
|
+
}, e.value))
|
|
686
|
+
})
|
|
687
|
+
]
|
|
668
688
|
}, e.id))
|
|
669
689
|
})
|
|
670
690
|
]
|
|
671
691
|
})
|
|
672
692
|
]
|
|
673
|
-
}), /* @__PURE__ */
|
|
693
|
+
}), /* @__PURE__ */ N("div", {
|
|
674
694
|
className: "mt-6 flex items-center justify-between",
|
|
675
|
-
children: [/* @__PURE__ */
|
|
695
|
+
children: [/* @__PURE__ */ N("button", {
|
|
676
696
|
type: "button",
|
|
677
|
-
onClick: () =>
|
|
678
|
-
disabled:
|
|
697
|
+
onClick: () => V === 0 ? E("../properties") : H((e) => e - 1),
|
|
698
|
+
disabled: z,
|
|
679
699
|
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",
|
|
680
|
-
children: [/* @__PURE__ */
|
|
681
|
-
}),
|
|
700
|
+
children: [/* @__PURE__ */ M(C, { className: "h-4 w-4" }), V === 0 ? "Cancel" : "Previous"]
|
|
701
|
+
}), ee ? /* @__PURE__ */ M("button", {
|
|
682
702
|
type: "button",
|
|
683
|
-
onClick:
|
|
684
|
-
disabled: !
|
|
703
|
+
onClick: $,
|
|
704
|
+
disabled: !Q() || z,
|
|
685
705
|
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",
|
|
686
|
-
children:
|
|
687
|
-
}) : /* @__PURE__ */
|
|
706
|
+
children: z ? "Adding Property..." : "Submit Property"
|
|
707
|
+
}) : /* @__PURE__ */ N("button", {
|
|
688
708
|
type: "button",
|
|
689
|
-
onClick: () =>
|
|
690
|
-
disabled: !
|
|
709
|
+
onClick: () => H((e) => e + 1),
|
|
710
|
+
disabled: !Q(),
|
|
691
711
|
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",
|
|
692
|
-
children: ["Next", /* @__PURE__ */
|
|
712
|
+
children: ["Next", /* @__PURE__ */ M(w, { className: "h-4 w-4" })]
|
|
693
713
|
})]
|
|
694
714
|
})]
|
|
695
715
|
})
|
|
@@ -697,6 +717,6 @@ var P = {
|
|
|
697
717
|
});
|
|
698
718
|
};
|
|
699
719
|
//#endregion
|
|
700
|
-
export {
|
|
720
|
+
export { z as AddPropertyPage };
|
|
701
721
|
|
|
702
722
|
//# sourceMappingURL=AddPropertyPage.js.map
|