@lanaco/lnc-react-ui 4.0.139 → 4.0.140

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.
@@ -1,475 +0,0 @@
1
- import { jsxs as o, jsx as r, Fragment as S } from "react/jsx-runtime";
2
- import { forwardRef as V, useState as x, Suspense as ee } from "react";
3
- import { p as re, t as I, o as u, l as oe, q as D, G as j } from "./utils-BdsZgOUE.js";
4
- import { s as w } from "./emotion-styled.browser.esm-BNN1dTl3.js";
5
- import { P as ne } from "./index-CF3HhgvN.js";
6
- import v from "./Badge.js";
7
- import ae from "./Popover.js";
8
- import te from "./PopoverTrigger.js";
9
- import ie from "./PopoverContent.js";
10
- import { u as se } from "./useDetectMobile-Bkvj0VMa.js";
11
- import { M as W } from "./consts-BuFChS64.js";
12
- const G = w.div`
13
- display: flex;
14
- flex-direction: column;
15
- gap: 0.5rem;
16
- cursor: pointer;
17
-
18
- & .wrapper-card-1 {
19
- display: flex;
20
- flex-direction: column;
21
- gap: 0.38rem;
22
- }
23
-
24
- & .wrapper-card-2 {
25
- display: flex;
26
- flex-direction: column;
27
- gap: 0;
28
- }
29
-
30
- & .wrapper-card-3 {
31
- display: flex;
32
- flex-wrap: wrap;
33
- gap: 0.25rem;
34
- }
35
-
36
- & .tag {
37
- height: 1.5rem;
38
- gap: 0.25rem;
39
- padding: 0.25rem 0.375rem;
40
- border-radius: 0.375rem;
41
- background: #f9fafb;
42
- border: 1px solid var(--gray-95012, #14161a1f);
43
- font-weight: 400;
44
- font-size: 0.75rem;
45
- line-height: 1rem;
46
- letter-spacing: 0.025rem;
47
- color: var(--gray-950, #14161a);
48
-
49
- &.tag-sponsored {
50
- & i {
51
- color: var(--yellow-500, #f59e0b);
52
- }
53
- }
54
- }
55
-
56
- & .tag-mobile {
57
- font-weight: 400;
58
- font-size: 0.75rem;
59
- line-height: 1rem;
60
- letter-spacing: 0.025rem;
61
- color: var(--gray-600, #676e79);
62
- }
63
-
64
- & .card-title {
65
- font-size: 0.875rem;
66
- font-weight: 600;
67
- ${re(2)}
68
- }
69
-
70
- & .price-text {
71
- font-size: 1rem;
72
- font-weight: 600;
73
- ${I()}
74
- display: flex;
75
- align-items: end;
76
- gap: 0.5rem;
77
-
78
- & .full-price {
79
- text-decoration: line-through;
80
- font-size: 0.75rem;
81
- font-weight: 400;
82
- padding-bottom: 0.125rem;
83
- color: var(--danger-600, #e11d48);
84
- }
85
- }
86
-
87
- & .location-text {
88
- font-size: 0.75rem;
89
- font-weight: 400;
90
- color: var(--gray-600, #676e79);
91
- ${I()}
92
- }
93
-
94
- & .tags-wrapper {
95
- display: flex;
96
- gap: 0.5rem;
97
- }
98
-
99
- & .skeleton-img {
100
- background-color: ${u("-90deg")};
101
- border-radius: 0.75rem;
102
- border: 1px solid white;
103
- }
104
-
105
- & .skeleton-title {
106
- background-color: ${u("-90deg")};
107
- width: 100%;
108
- height: 2.5rem;
109
- }
110
-
111
- & .skeleton-tags {
112
- background-color: ${u("-90deg")};
113
- width: 80%;
114
- height: 1.5rem;
115
- }
116
-
117
- & .skeleton-price {
118
- background-color: ${u("-90deg")};
119
- width: 50%;
120
- height: 2.5rem;
121
- }
122
-
123
- & .skeleton-sponsored {
124
- background-color: ${u("-90deg")};
125
- width: 50%;
126
- height: 1rem;
127
- }
128
-
129
- & .tags-popover__trigger {
130
- display: flex;
131
- flex-wrap: wrap;
132
- gap: 0.25rem;
133
- }
134
-
135
- @media (max-width: ${W + "px"}) {
136
- & .price-text {
137
- font-size: 0.875rem;
138
- font-weight: 600;
139
-
140
- & .full-price {
141
- display: none;
142
- }
143
- }
144
- }
145
-
146
- &:hover .product-image-wrapper img {
147
- transform: scale(1.1);
148
- }
149
- `, ce = w.div`
150
- position: relative;
151
- overflow: hidden;
152
- border-radius: 0.75rem;
153
- width: 100%;
154
- aspect-ratio: 1 / 1;
155
- border: 1px solid #0c15201f;
156
-
157
- & img {
158
- display: block;
159
- width: 100%;
160
- height: 100%;
161
- object-fit: cover;
162
- border-radius: 0.75rem;
163
- transition: var(--transition, all 0.3s ease);
164
- }
165
-
166
- @media (max-width: ${W + "px"}) {
167
- & img {
168
- width: 8.875rem;
169
- height: 8.875rem;
170
- min-width: 8.875rem;
171
- min-height: 8.875rem;
172
- object-fit: cover;
173
- }
174
- }
175
- `, le = w.div`
176
- background: var(--white, #fff);
177
- z-index: 1;
178
-
179
- border: 1px solid var(--gray-200, #dddfe4);
180
- border-radius: 0.5rem;
181
- line-height: 1rem;
182
- position: absolute;
183
- padding: 0.5rem 0.75rem;
184
- top: 0.5rem;
185
- left: 25%;
186
- transform: translateX(-50%);
187
- min-width: 10rem;
188
-
189
- &::before,
190
- &::after {
191
- content: "";
192
- position: absolute;
193
- left: 50%;
194
- transform: translateX(-50%);
195
- border-style: solid;
196
- border-width: 0.625rem;
197
- }
198
-
199
- &::after {
200
- top: -1.1875rem;
201
- border-color: transparent transparent var(--white, #fff) transparent;
202
- }
203
-
204
- &::before {
205
- top: -1.25rem;
206
- border-color: transparent transparent var(--gray-200, #dddfe4) transparent;
207
- }
208
-
209
- & .tags-popover__content {
210
- display: flex;
211
- flex-wrap: wrap;
212
- flex-direction: column;
213
- gap: 0.375rem;
214
- font-size: 0.75rem;
215
- font-weight: 400;
216
-
217
- & .tags-popover__name {
218
- color: var(--gray-600, #676e79);
219
- }
220
-
221
- & .tags-popover__value {
222
- color: var(--gray-950, #14161a);
223
- }
224
- }
225
- `, de = w.div`
226
- display: flex;
227
- align-items: center;
228
- gap: 0.25rem;
229
- color: var(--gray-500);
230
- font-size: 0.75rem;
231
- font-weight: 500;
232
-
233
- & i {
234
- font-size: 1rem;
235
- color: var(--warning-500, #F59E0B);
236
- }
237
- `, me = V(({ sponsoredText: a = "Sponsored" }, i) => /* @__PURE__ */ o(de, { ref: i, className: "sponsored-line", children: [
238
- /* @__PURE__ */ r("i", { className: "mng-lnc-paw2" }),
239
- /* @__PURE__ */ r("span", { children: a })
240
- ] })), pe = "Vehicles_Cars", ge = "Vehicles_Motorcycles", ue = "Vehicles_Trucks", he = "Vehicles_AgriculturalMachines_Tractors", fe = "Vehicles_ConstructionMachines", ve = "Vehicles_Bus", we = "Vehicles_Campers", ye = "RealEstates_", n = {
241
- Mileage: {
242
- icon: "mng-lnc-road",
243
- measure: "km"
244
- },
245
- YearOfProduction: {
246
- icon: "mng-lnc-calendar",
247
- measure: ""
248
- },
249
- Fuel: {
250
- icon: "mng-lnc-gas-station",
251
- measure: ""
252
- },
253
- EnginePowerKW: {
254
- icon: "mng-lnc-engine",
255
- measure: "kW"
256
- },
257
- Transmission: {
258
- icon: "mng-lnc-transmission",
259
- measure: ""
260
- },
261
- Model: {
262
- icon: "mng-lnc-application",
263
- measure: ""
264
- },
265
- Brand: {
266
- icon: "mng-lnc-car--front",
267
- measure: ""
268
- },
269
- SurfaceArea: {
270
- icon: "mng-lnc-right-angle",
271
- measure: ""
272
- },
273
- Floor: {
274
- icon: "mng-lnc-elevator",
275
- measure: ""
276
- },
277
- FurnishedCondition: {
278
- icon: "mng-lnc-sofa-01",
279
- measure: ""
280
- },
281
- AdType: {
282
- icon: "mng-lnc-notes",
283
- measure: ""
284
- },
285
- NumberOfRooms: {
286
- icon: "mng-lnc-meeting-room",
287
- measure: ""
288
- },
289
- HeatingType: {
290
- icon: "mng-lnc-heat",
291
- measure: ""
292
- },
293
- AirConditioning: {
294
- icon: "mng-lnc-air-conditioner",
295
- measure: ""
296
- },
297
- Type: {
298
- icon: "mng-lnc-house-building",
299
- measure: ""
300
- },
301
- Parking: {
302
- icon: "mng-lnc-parking-area-circle",
303
- measure: ""
304
- },
305
- Internet: {
306
- icon: "mng-lnc-wifi-02",
307
- measure: ""
308
- },
309
- State: {
310
- icon: "mng-lnc-settings-1",
311
- measure: ""
312
- },
313
- NumberOfPremises: {
314
- icon: "mng-lnc-meeting-room",
315
- measure: ""
316
- },
317
- Pool: {
318
- icon: "mng-lnc-pool",
319
- measure: ""
320
- },
321
- Approach: {
322
- icon: "mng-lnc-driveway",
323
- measure: ""
324
- },
325
- NumberOfBeds: {
326
- icon: "mng-lnc-bed",
327
- measure: ""
328
- },
329
- Kitchen: {
330
- icon: "mng-lnc-fridge",
331
- measure: ""
332
- },
333
- BathroomToilet: {
334
- icon: "mng-lnc-bath",
335
- measure: ""
336
- },
337
- default: {
338
- icon: " mng-lnc-clock--filled",
339
- measure: ""
340
- }
341
- }, Be = V((a, i) => {
342
- const {
343
- title: s,
344
- price: c = 0,
345
- sellingPrice: t,
346
- currency: h,
347
- isNegotiable: y,
348
- isFree: b,
349
- imageUrl: X,
350
- location: q,
351
- isSponsored: E,
352
- imageComponent: M,
353
- onSelectCard: U = () => {
354
- },
355
- freeText: Y = "Free",
356
- negotiableText: A = "Negotiable",
357
- tags: l = [],
358
- categoryCode: _,
359
- condition: C,
360
- quantity: N,
361
- trade: k
362
- } = a, P = se(), T = [
363
- pe,
364
- ge,
365
- ue,
366
- he,
367
- fe,
368
- ve,
369
- we,
370
- ye
371
- ].some(
372
- (e) => _ == null ? void 0 : _.includes(e)
373
- ), [K, z] = x(!1), L = () => {
374
- z(!0);
375
- }, H = () => {
376
- z(!1);
377
- }, Z = () => /* @__PURE__ */ r("div", { className: "tags-popover__trigger", children: l == null ? void 0 : l.map((e, d) => {
378
- var m, p, g, R, F;
379
- const $ = ((m = n == null ? void 0 : n[e == null ? void 0 : e.code]) == null ? void 0 : m.icon) ?? ((p = n == null ? void 0 : n.default) == null ? void 0 : p.icon) ?? "", O = ((g = e == null ? void 0 : e.measurementUnit) == null ? void 0 : g.symbol) ?? ((R = n == null ? void 0 : n[e == null ? void 0 : e.code]) == null ? void 0 : R.measure) ?? "", f = [(e == null ? void 0 : e.value) ?? ((F = e == null ? void 0 : e.multiOptions) == null ? void 0 : F[0]) ?? "", O].filter(Boolean).join(" ");
380
- return P ? /* @__PURE__ */ o("div", { className: "tag-mobile", children: [
381
- f,
382
- d === 0 ? " · " : ""
383
- ] }) : /* @__PURE__ */ o(
384
- v,
385
- {
386
- className: `tag ${E ? "tag-sponsored" : ""}`,
387
- children: [
388
- /* @__PURE__ */ r("i", { className: $ }),
389
- f
390
- ]
391
- },
392
- `detailed-products-section-tag__${d + 1}`
393
- );
394
- }) }), J = () => /* @__PURE__ */ r("div", { className: "tags-popover__content", children: l == null ? void 0 : l.map((e, d) => {
395
- var m, p, g;
396
- const $ = ((m = e == null ? void 0 : e.measurementUnit) == null ? void 0 : m.symbol) ?? ((p = n == null ? void 0 : n[e == null ? void 0 : e.code]) == null ? void 0 : p.measure) ?? "", B = [(e == null ? void 0 : e.value) ?? ((g = e == null ? void 0 : e.multiOptions) == null ? void 0 : g[0]) ?? "", $].filter(Boolean).join(" "), f = e == null ? void 0 : e.name;
397
- return /* @__PURE__ */ o("div", { children: [
398
- /* @__PURE__ */ r("span", { className: "tags-popover__name", children: `${f}: ` }),
399
- /* @__PURE__ */ r("span", { className: "tags-popover__value", children: B })
400
- ] }, `detailed-products-section-tag-dropdown__${d + 1}`);
401
- }) }), Q = () => P ? [C, N, k].map((e, d) => /* @__PURE__ */ o("div", { className: "tag-mobile", children: [
402
- e,
403
- d === 0 ? " · " : ""
404
- ] })) : /* @__PURE__ */ o(S, { children: [
405
- C && /* @__PURE__ */ r(v, { className: "tag", children: C }, "detailed-products-section-tag__condition"),
406
- N && /* @__PURE__ */ r(v, { className: "tag", children: N }, "detailed-products-section-tag__quantity"),
407
- k && /* @__PURE__ */ r(v, { className: "tag", children: k }, "detailed-products-section-tag__trade")
408
- ] });
409
- return (
410
- // <LandingPageProductCardSkeleton />
411
- /* @__PURE__ */ o(G, { ref: i, className: "product-card", onClick: U, children: [
412
- /* @__PURE__ */ r(ce, { className: "product-image-wrapper", children: oe(M) ? M : /* @__PURE__ */ r(ne, { src: X }) }),
413
- /* @__PURE__ */ r("div", { className: "wrapper-card-1", children: /* @__PURE__ */ r("div", { className: "card-title", children: s }) }),
414
- /* @__PURE__ */ o("div", { className: "wrapper-card-3", children: [
415
- T && /* @__PURE__ */ r(
416
- "div",
417
- {
418
- ...P ? {} : {
419
- onMouseEnter: L,
420
- onMouseLeave: H
421
- },
422
- children: /* @__PURE__ */ o(ae, { placement: "bottom", open: K, children: [
423
- /* @__PURE__ */ r(te, { children: Z() }),
424
- /* @__PURE__ */ r(ie, { style: { all: "unset" }, children: /* @__PURE__ */ r(le, { children: J() }) })
425
- ] })
426
- }
427
- ),
428
- !T && Q()
429
- ] }),
430
- /* @__PURE__ */ o("div", { className: "wrapper-card-2", children: [
431
- /* @__PURE__ */ o("div", { className: "price-text", children: [
432
- t > 0 && h && y !== !0 && b !== !0 && /* @__PURE__ */ r("div", { children: `${D(t)} ${j(h)}` }),
433
- c > 0 && h && y !== !0 && b !== !0 && c !== t && /* @__PURE__ */ r("div", { className: `${t > 0 ? "full-price" : ""}`, children: `${D(c)} ${j(h)}` }),
434
- y && A,
435
- b && Y
436
- ] }),
437
- /* @__PURE__ */ r("div", { className: "location-text", children: q })
438
- ] }),
439
- E === !0 && /* @__PURE__ */ r(me, {})
440
- ] })
441
- );
442
- }), be = V(({}, a) => /* @__PURE__ */ o(G, { className: "product-card", children: [
443
- /* @__PURE__ */ r("img", { className: "skeleton-img" }),
444
- /* @__PURE__ */ o("div", { className: "wrapper-card-1", children: [
445
- /* @__PURE__ */ r("div", { className: "skeleton-title" }),
446
- /* @__PURE__ */ r("div", { className: "skeleton-tags" })
447
- ] }),
448
- /* @__PURE__ */ o("div", { className: "wrapper-card-1", children: [
449
- /* @__PURE__ */ r("div", { className: "skeleton-price" }),
450
- /* @__PURE__ */ r("div", { className: "skeleton-sponsored" })
451
- ] })
452
- ] })), _e = ({ limit: a = 5, isLoading: i = !1, keyPrefix: s }) => /* @__PURE__ */ r(S, { children: Array.from({ length: a }, (c, t) => /* @__PURE__ */ r(
453
- be,
454
- {
455
- isLoading: i
456
- },
457
- `${s}-skeleton-product-card-${t}`
458
- )) }), Re = ({
459
- children: a,
460
- fallbackComponent: i = /* @__PURE__ */ r(S, {}),
461
- isLoading: s = !1,
462
- limit: c,
463
- keyPrefix: t
464
- }) => /* @__PURE__ */ r(ee, { fallbackComponent: i, children: s === !0 ? /* @__PURE__ */ r(
465
- _e,
466
- {
467
- isLoading: s,
468
- limit: c,
469
- keyPrefix: t
470
- }
471
- ) : a });
472
- export {
473
- Be as D,
474
- Re as S
475
- };
@@ -1,226 +0,0 @@
1
- "use strict";const e=require("react/jsx-runtime"),u=require("react"),n=require("./utils-Dl9xPH4c.cjs"),w=require("./emotion-styled.browser.esm-BtEseadx.cjs"),Y=require("./index-BueKsXT8.cjs"),v=require("./Badge.cjs"),K=require("./Popover.cjs"),Z=require("./PopoverTrigger.cjs"),H=require("./PopoverContent.cjs"),J=require("./useDetectMobile-zkbzoOGV.cjs"),q=require("./consts-goSZX3xP.cjs"),O=w.styled.div`
2
- display: flex;
3
- flex-direction: column;
4
- gap: 0.5rem;
5
- cursor: pointer;
6
-
7
- & .wrapper-card-1 {
8
- display: flex;
9
- flex-direction: column;
10
- gap: 0.38rem;
11
- }
12
-
13
- & .wrapper-card-2 {
14
- display: flex;
15
- flex-direction: column;
16
- gap: 0;
17
- }
18
-
19
- & .wrapper-card-3 {
20
- display: flex;
21
- flex-wrap: wrap;
22
- gap: 0.25rem;
23
- }
24
-
25
- & .tag {
26
- height: 1.5rem;
27
- gap: 0.25rem;
28
- padding: 0.25rem 0.375rem;
29
- border-radius: 0.375rem;
30
- background: #f9fafb;
31
- border: 1px solid var(--gray-95012, #14161a1f);
32
- font-weight: 400;
33
- font-size: 0.75rem;
34
- line-height: 1rem;
35
- letter-spacing: 0.025rem;
36
- color: var(--gray-950, #14161a);
37
-
38
- &.tag-sponsored {
39
- & i {
40
- color: var(--yellow-500, #f59e0b);
41
- }
42
- }
43
- }
44
-
45
- & .tag-mobile {
46
- font-weight: 400;
47
- font-size: 0.75rem;
48
- line-height: 1rem;
49
- letter-spacing: 0.025rem;
50
- color: var(--gray-600, #676e79);
51
- }
52
-
53
- & .card-title {
54
- font-size: 0.875rem;
55
- font-weight: 600;
56
- ${n.truncateTextInRows(2)}
57
- }
58
-
59
- & .price-text {
60
- font-size: 1rem;
61
- font-weight: 600;
62
- ${n.truncateText()}
63
- display: flex;
64
- align-items: end;
65
- gap: 0.5rem;
66
-
67
- & .full-price {
68
- text-decoration: line-through;
69
- font-size: 0.75rem;
70
- font-weight: 400;
71
- padding-bottom: 0.125rem;
72
- color: var(--danger-600, #e11d48);
73
- }
74
- }
75
-
76
- & .location-text {
77
- font-size: 0.75rem;
78
- font-weight: 400;
79
- color: var(--gray-600, #676e79);
80
- ${n.truncateText()}
81
- }
82
-
83
- & .tags-wrapper {
84
- display: flex;
85
- gap: 0.5rem;
86
- }
87
-
88
- & .skeleton-img {
89
- background-color: ${n.linearGradientAnimation("-90deg")};
90
- border-radius: 0.75rem;
91
- border: 1px solid white;
92
- }
93
-
94
- & .skeleton-title {
95
- background-color: ${n.linearGradientAnimation("-90deg")};
96
- width: 100%;
97
- height: 2.5rem;
98
- }
99
-
100
- & .skeleton-tags {
101
- background-color: ${n.linearGradientAnimation("-90deg")};
102
- width: 80%;
103
- height: 1.5rem;
104
- }
105
-
106
- & .skeleton-price {
107
- background-color: ${n.linearGradientAnimation("-90deg")};
108
- width: 50%;
109
- height: 2.5rem;
110
- }
111
-
112
- & .skeleton-sponsored {
113
- background-color: ${n.linearGradientAnimation("-90deg")};
114
- width: 50%;
115
- height: 1rem;
116
- }
117
-
118
- & .tags-popover__trigger {
119
- display: flex;
120
- flex-wrap: wrap;
121
- gap: 0.25rem;
122
- }
123
-
124
- @media (max-width: ${q.MOBILE_SIZE_PX+"px"}) {
125
- & .price-text {
126
- font-size: 0.875rem;
127
- font-weight: 600;
128
-
129
- & .full-price {
130
- display: none;
131
- }
132
- }
133
- }
134
-
135
- &:hover .product-image-wrapper img {
136
- transform: scale(1.1);
137
- }
138
- `,Q=w.styled.div`
139
- position: relative;
140
- overflow: hidden;
141
- border-radius: 0.75rem;
142
- width: 100%;
143
- aspect-ratio: 1 / 1;
144
- border: 1px solid #0c15201f;
145
-
146
- & img {
147
- display: block;
148
- width: 100%;
149
- height: 100%;
150
- object-fit: cover;
151
- border-radius: 0.75rem;
152
- transition: var(--transition, all 0.3s ease);
153
- }
154
-
155
- @media (max-width: ${q.MOBILE_SIZE_PX+"px"}) {
156
- & img {
157
- width: 8.875rem;
158
- height: 8.875rem;
159
- min-width: 8.875rem;
160
- min-height: 8.875rem;
161
- object-fit: cover;
162
- }
163
- }
164
- `,ee=w.styled.div`
165
- background: var(--white, #fff);
166
- z-index: 1;
167
-
168
- border: 1px solid var(--gray-200, #dddfe4);
169
- border-radius: 0.5rem;
170
- line-height: 1rem;
171
- position: absolute;
172
- padding: 0.5rem 0.75rem;
173
- top: 0.5rem;
174
- left: 25%;
175
- transform: translateX(-50%);
176
- min-width: 10rem;
177
-
178
- &::before,
179
- &::after {
180
- content: "";
181
- position: absolute;
182
- left: 50%;
183
- transform: translateX(-50%);
184
- border-style: solid;
185
- border-width: 0.625rem;
186
- }
187
-
188
- &::after {
189
- top: -1.1875rem;
190
- border-color: transparent transparent var(--white, #fff) transparent;
191
- }
192
-
193
- &::before {
194
- top: -1.25rem;
195
- border-color: transparent transparent var(--gray-200, #dddfe4) transparent;
196
- }
197
-
198
- & .tags-popover__content {
199
- display: flex;
200
- flex-wrap: wrap;
201
- flex-direction: column;
202
- gap: 0.375rem;
203
- font-size: 0.75rem;
204
- font-weight: 400;
205
-
206
- & .tags-popover__name {
207
- color: var(--gray-600, #676e79);
208
- }
209
-
210
- & .tags-popover__value {
211
- color: var(--gray-950, #14161a);
212
- }
213
- }
214
- `,re=w.styled.div`
215
- display: flex;
216
- align-items: center;
217
- gap: 0.25rem;
218
- color: var(--gray-500);
219
- font-size: 0.75rem;
220
- font-weight: 500;
221
-
222
- & i {
223
- font-size: 1rem;
224
- color: var(--warning-500, #F59E0B);
225
- }
226
- `,ne=u.forwardRef(({sponsoredText:t="Sponsored"},a)=>e.jsxs(re,{ref:a,className:"sponsored-line",children:[e.jsx("i",{className:"mng-lnc-paw2"}),e.jsx("span",{children:t})]})),oe="Vehicles_Cars",te="Vehicles_Motorcycles",se="Vehicles_Trucks",ae="Vehicles_AgriculturalMachines_Tractors",ie="Vehicles_ConstructionMachines",ce="Vehicles_Bus",le="Vehicles_Campers",de="RealEstates_",o={Mileage:{icon:"mng-lnc-road",measure:"km"},YearOfProduction:{icon:"mng-lnc-calendar",measure:""},Fuel:{icon:"mng-lnc-gas-station",measure:""},EnginePowerKW:{icon:"mng-lnc-engine",measure:"kW"},Transmission:{icon:"mng-lnc-transmission",measure:""},Model:{icon:"mng-lnc-application",measure:""},Brand:{icon:"mng-lnc-car--front",measure:""},SurfaceArea:{icon:"mng-lnc-right-angle",measure:""},Floor:{icon:"mng-lnc-elevator",measure:""},FurnishedCondition:{icon:"mng-lnc-sofa-01",measure:""},AdType:{icon:"mng-lnc-notes",measure:""},NumberOfRooms:{icon:"mng-lnc-meeting-room",measure:""},HeatingType:{icon:"mng-lnc-heat",measure:""},AirConditioning:{icon:"mng-lnc-air-conditioner",measure:""},Type:{icon:"mng-lnc-house-building",measure:""},Parking:{icon:"mng-lnc-parking-area-circle",measure:""},Internet:{icon:"mng-lnc-wifi-02",measure:""},State:{icon:"mng-lnc-settings-1",measure:""},NumberOfPremises:{icon:"mng-lnc-meeting-room",measure:""},Pool:{icon:"mng-lnc-pool",measure:""},Approach:{icon:"mng-lnc-driveway",measure:""},NumberOfBeds:{icon:"mng-lnc-bed",measure:""},Kitchen:{icon:"mng-lnc-fridge",measure:""},BathroomToilet:{icon:"mng-lnc-bath",measure:""},default:{icon:" mng-lnc-clock--filled",measure:""}},me=u.forwardRef((t,a)=>{const{title:i,price:c=0,sellingPrice:s,currency:h,isNegotiable:y,isFree:j,imageUrl:z,location:B,isSponsored:P,imageComponent:$,onSelectCard:F=()=>{},freeText:I="Free",negotiableText:D="Negotiable",tags:l=[],categoryCode:b,condition:_,quantity:x,trade:C}=t,N=J.useDetectMobile(),S=[oe,te,se,ae,ie,ce,le,de].some(r=>b==null?void 0:b.includes(r)),[G,E]=u.useState(!1),A=()=>{E(!0)},W=()=>{E(!1)},X=()=>e.jsx("div",{className:"tags-popover__trigger",children:l==null?void 0:l.map((r,d)=>{var m,p,g,R,T;const k=((m=o==null?void 0:o[r==null?void 0:r.code])==null?void 0:m.icon)??((p=o==null?void 0:o.default)==null?void 0:p.icon)??"",V=((g=r==null?void 0:r.measurementUnit)==null?void 0:g.symbol)??((R=o==null?void 0:o[r==null?void 0:r.code])==null?void 0:R.measure)??"",f=[(r==null?void 0:r.value)??((T=r==null?void 0:r.multiOptions)==null?void 0:T[0])??"",V].filter(Boolean).join(" ");return N?e.jsxs("div",{className:"tag-mobile",children:[f,d===0?" · ":""]}):e.jsxs(v,{className:`tag ${P?"tag-sponsored":""}`,children:[e.jsx("i",{className:k}),f]},`detailed-products-section-tag__${d+1}`)})}),L=()=>e.jsx("div",{className:"tags-popover__content",children:l==null?void 0:l.map((r,d)=>{var m,p,g;const k=((m=r==null?void 0:r.measurementUnit)==null?void 0:m.symbol)??((p=o==null?void 0:o[r==null?void 0:r.code])==null?void 0:p.measure)??"",M=[(r==null?void 0:r.value)??((g=r==null?void 0:r.multiOptions)==null?void 0:g[0])??"",k].filter(Boolean).join(" "),f=r==null?void 0:r.name;return e.jsxs("div",{children:[e.jsx("span",{className:"tags-popover__name",children:`${f}: `}),e.jsx("span",{className:"tags-popover__value",children:M})]},`detailed-products-section-tag-dropdown__${d+1}`)})}),U=()=>N?[_,x,C].map((r,d)=>e.jsxs("div",{className:"tag-mobile",children:[r,d===0?" · ":""]})):e.jsxs(e.Fragment,{children:[_&&e.jsx(v,{className:"tag",children:_},"detailed-products-section-tag__condition"),x&&e.jsx(v,{className:"tag",children:x},"detailed-products-section-tag__quantity"),C&&e.jsx(v,{className:"tag",children:C},"detailed-products-section-tag__trade")]});return e.jsxs(O,{ref:a,className:"product-card",onClick:F,children:[e.jsx(Q,{className:"product-image-wrapper",children:n.isDefined($)?$:e.jsx(Y.ProductImageWrapper,{src:z})}),e.jsx("div",{className:"wrapper-card-1",children:e.jsx("div",{className:"card-title",children:i})}),e.jsxs("div",{className:"wrapper-card-3",children:[S&&e.jsx("div",{...N?{}:{onMouseEnter:A,onMouseLeave:W},children:e.jsxs(K,{placement:"bottom",open:G,children:[e.jsx(Z,{children:X()}),e.jsx(H,{style:{all:"unset"},children:e.jsx(ee,{children:L()})})]})}),!S&&U()]}),e.jsxs("div",{className:"wrapper-card-2",children:[e.jsxs("div",{className:"price-text",children:[s>0&&h&&y!==!0&&j!==!0&&e.jsx("div",{children:`${n.formatPrice(s)} ${n.GetCurrencySymbol(h)}`}),c>0&&h&&y!==!0&&j!==!0&&c!==s&&e.jsx("div",{className:`${s>0?"full-price":""}`,children:`${n.formatPrice(c)} ${n.GetCurrencySymbol(h)}`}),y&&D,j&&I]}),e.jsx("div",{className:"location-text",children:B})]}),P===!0&&e.jsx(ne,{})]})}),pe=u.forwardRef(({},t)=>e.jsxs(O,{className:"product-card",children:[e.jsx("img",{className:"skeleton-img"}),e.jsxs("div",{className:"wrapper-card-1",children:[e.jsx("div",{className:"skeleton-title"}),e.jsx("div",{className:"skeleton-tags"})]}),e.jsxs("div",{className:"wrapper-card-1",children:[e.jsx("div",{className:"skeleton-price"}),e.jsx("div",{className:"skeleton-sponsored"})]})]})),ge=({limit:t=5,isLoading:a=!1,keyPrefix:i})=>e.jsx(e.Fragment,{children:Array.from({length:t},(c,s)=>e.jsx(pe,{isLoading:a},`${i}-skeleton-product-card-${s}`))}),ue=({children:t,fallbackComponent:a=e.jsx(e.Fragment,{}),isLoading:i=!1,limit:c,keyPrefix:s})=>e.jsx(u.Suspense,{fallbackComponent:a,children:i===!0?e.jsx(ge,{isLoading:i,limit:c,keyPrefix:s}):t});exports.DetailedProductCard=me;exports.SuspenseDetailedProductCard=ue;