kupos-ui-components-lib 9.7.8 → 9.7.10

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.
Files changed (26) hide show
  1. package/dist/KuposUIComponent.d.ts +3 -0
  2. package/dist/components/ServiceItem/PeruServiceItemDesktop.d.ts +1 -1
  3. package/dist/components/ServiceItem/PeruServiceItemDesktop.js +134 -188
  4. package/dist/components/ServiceItem/ServiceItemDesktop.d.ts +1 -1
  5. package/dist/components/ServiceItem/ServiceItemDesktop.js +16 -2
  6. package/dist/components/ServiceItem/ServiceItemMobile.d.ts +1 -1
  7. package/dist/components/ServiceItem/ServiceItemMobile.js +16 -7
  8. package/dist/components/ServiceItem/mobileTypes.d.ts +32 -0
  9. package/dist/components/ServiceItem/types.d.ts +22 -0
  10. package/dist/styles.css +221 -0
  11. package/dist/ui/FeaturServiceUiMobile/FeatureServiceUiMobile.js +13 -11
  12. package/dist/ui/FeatureServiceUI/FeatureServiceUi.js +9 -9
  13. package/dist/utils/CommonService.js +11 -1
  14. package/package.json +1 -1
  15. package/src/KuposUIComponent.tsx +3 -0
  16. package/src/assets/images/anims/service_list/thunder_icon.json +1 -0
  17. package/src/assets/images/anims/service_list/users_anim.json +1 -0
  18. package/src/components/ServiceItem/PeruServiceItemDesktop.tsx +254 -345
  19. package/src/components/ServiceItem/ServiceItemDesktop.tsx +50 -5
  20. package/src/components/ServiceItem/ServiceItemMobile.tsx +340 -286
  21. package/src/components/ServiceItem/mobileTypes.ts +29 -1
  22. package/src/components/ServiceItem/types.ts +23 -1
  23. package/src/styles.css +15 -0
  24. package/src/ui/FeaturServiceUiMobile/FeatureServiceUiMobile.tsx +525 -0
  25. package/src/ui/FeatureServiceUI/FeatureServiceUi.tsx +555 -0
  26. package/src/utils/CommonService.ts +13 -1
@@ -9,6 +9,7 @@ import SeatSectionMobile from "../../ui/mobileweb/SeatSectionMobile";
9
9
  import DateTimeSectionMobile from "../../ui/mobileweb/DateTimeSectionMobile";
10
10
  import ExpandedDropdownMobile from "../../ui/mobileweb/ExpandedDropdownMobile";
11
11
  import ServiceBadgesMobile from "../../ui/mobileweb/ServiceBadgesMobile";
12
+ import FeatureServiceUiMobile from "../../ui/FeaturServiceUiMobile/FeatureServiceUiMobile";
12
13
 
13
14
  const SEAT_EXCEPTIONS = ["Asiento mascota"];
14
15
 
@@ -45,6 +46,19 @@ function ServiceItemMobile({
45
46
  removeDuplicateSeats,
46
47
  isLinatal,
47
48
  viewersConfig,
49
+ isFeatureDropDownExpand,
50
+ setIsFeatureDropDownExpand,
51
+ ticketQuantity,
52
+ onIncreaseTicketQuantity,
53
+ onDecreaseTicketQuantity,
54
+ cityOrigin,
55
+ cityDestination,
56
+ isNewUi,
57
+ onRemateUiButtonClick,
58
+ selectedTimeSlot,
59
+ onTimeSlotChange,
60
+ isTimeDropdownOpen,
61
+ onTimeDropdownToggle,
48
62
  }: MobileServiceItemProps): React.ReactElement {
49
63
  const isItemExpanded = serviceItem.id === isExpanded;
50
64
  const isPetSeat = (Object.keys(serviceItem?.pet_seat_info) || []).length > 0;
@@ -153,316 +167,356 @@ function ServiceItemMobile({
153
167
  }
154
168
 
155
169
  return (
156
- <div
157
- className={`relative ${!serviceItem.offer_text || !serviceItem?.is_dp_enabled ? "mb-[14px]" : showTopLabel || serviceItem?.is_direct_trip ? "mb-[20px]" : "mb-[12px]"} ${
158
- serviceItem?.is_direct_trip ||
159
- isConexion ||
160
- serviceItem?.train_type_label === "Tren Express (Nuevo)" ||
161
- showTopLabel
162
- ? "mt-[20px]"
163
- : "mt-[10px]"
164
- } `}
165
- style={{ zIndex: 1 }}
166
- >
167
- <div
168
- className={`z-1 ${
169
- (hasOfferText || serviceItem?.is_dp_enabled) && !isSoldOut
170
- ? "rounded-[18px]"
171
- : "rounded-[10px] border border-[#ccc]"
172
- }`}
173
- style={{ ...serviceCardStyle, backgroundColor: "#fff" }}
174
- >
175
- <div style={{ padding: "12px 12px 8px 12px" }}>
176
- {/* Header with operator info and favorite */}
177
- <div className="flex justify-between items-center mb-[10px]">
178
- <div
179
- className="flex items-center justify-center gap-x-4"
180
- style={{
181
- marginBottom:
182
- serviceItem?.offer_text || hasDiscount ? "10px" : "",
183
- }}
184
- >
185
- <div className="w-[115px] overflow-y-hidden h-[22px]">
186
- <img
187
- src={serviceItem.operator_details[0]}
188
- alt="service logo"
189
- className={`w-[100px] h-auto object-contain ${
190
- isSoldOut ? "grayscale" : ""
191
- }`}
192
- />
193
- </div>
194
- {isCiva ? (
195
- <div className="black-text min-[420]:text-[12px] text-[12px]">
196
- {serviceItem?.operator_details[2]}
197
- </div>
198
- ) : showRating ? (
199
- <div className="flex min-[420]:text-[13px] text-[12px] h-[22px] items-center">
200
- <div className="flex items-center">
201
- <div className="flex items-center">
202
- <img
203
- src={serviceItem.icons.rating}
204
- alt="origin"
205
- className={`w-[12px] h-[12px] mr-[4px] object-contain ${
206
- isSoldOut ? "grayscale" : ""
207
- }`}
208
- />
209
- <span style={{ lineHeight: "normal" }}>
210
- {getServiceStars(serviceItem)}
211
- </span>
170
+ <>
171
+ {isNewUi ? (
172
+ <FeatureServiceUiMobile
173
+ serviceItem={serviceItem}
174
+ showTopLabel={showTopLabel}
175
+ colors={colors}
176
+ isSoldOut={isSoldOut}
177
+ cityOrigin={cityOrigin}
178
+ cityDestination={cityDestination}
179
+ renderIcon={renderIcon}
180
+ viewersConfig={viewersConfig}
181
+ isFeatureDropDownExpand={isFeatureDropDownExpand}
182
+ ticketQuantity={ticketQuantity}
183
+ onIncreaseTicketQuantity={onIncreaseTicketQuantity}
184
+ onDecreaseTicketQuantity={onDecreaseTicketQuantity}
185
+ onBookButtonPress={onRemateUiButtonClick}
186
+ onToggleExpand={() =>
187
+ setIsFeatureDropDownExpand &&
188
+ setIsFeatureDropDownExpand(
189
+ isFeatureDropDownExpand === serviceItem.id ||
190
+ isFeatureDropDownExpand === true
191
+ ? null
192
+ : serviceItem.id,
193
+ )
194
+ }
195
+ selectedTimeSlot={selectedTimeSlot}
196
+ onTimeSlotChange={onTimeSlotChange}
197
+ isTimeDropdownOpen={isTimeDropdownOpen}
198
+ onTimeDropdownToggle={onTimeDropdownToggle}
199
+ />
200
+ ) : (
201
+ <div
202
+ className={`relative ${!serviceItem.offer_text || !serviceItem?.is_dp_enabled ? "mb-[14px]" : showTopLabel || serviceItem?.is_direct_trip ? "mb-[20px]" : "mb-[12px]"} ${
203
+ serviceItem?.is_direct_trip ||
204
+ isConexion ||
205
+ serviceItem?.train_type_label === "Tren Express (Nuevo)" ||
206
+ showTopLabel
207
+ ? "mt-[20px]"
208
+ : "mt-[10px]"
209
+ } `}
210
+ style={{ zIndex: 1 }}
211
+ >
212
+ <div
213
+ className={`z-1 ${
214
+ (hasOfferText || serviceItem?.is_dp_enabled) && !isSoldOut
215
+ ? "rounded-[18px]"
216
+ : "rounded-[10px] border border-[#ccc]"
217
+ }`}
218
+ style={{ ...serviceCardStyle, backgroundColor: "#fff" }}
219
+ >
220
+ <div style={{ padding: "12px 12px 8px 12px" }}>
221
+ {/* Header with operator info and favorite */}
222
+ <div className="flex justify-between items-center mb-[10px]">
223
+ <div
224
+ className="flex items-center justify-center gap-x-4"
225
+ style={{
226
+ marginBottom:
227
+ serviceItem?.offer_text || hasDiscount ? "10px" : "",
228
+ }}
229
+ >
230
+ <div className="w-[115px] overflow-y-hidden h-[22px]">
231
+ <img
232
+ src={serviceItem.operator_details[0]}
233
+ alt="service logo"
234
+ className={`w-[100px] h-auto object-contain ${
235
+ isSoldOut ? "grayscale" : ""
236
+ }`}
237
+ />
238
+ </div>
239
+ {isCiva ? (
240
+ <div className="black-text min-[420]:text-[12px] text-[12px]">
241
+ {serviceItem?.operator_details[2]}
212
242
  </div>
243
+ ) : showRating ? (
244
+ <div className="flex min-[420]:text-[13px] text-[12px] h-[22px] items-center">
245
+ <div className="flex items-center">
246
+ <div className="flex items-center">
247
+ <img
248
+ src={serviceItem.icons.rating}
249
+ alt="origin"
250
+ className={`w-[12px] h-[12px] mr-[4px] object-contain ${
251
+ isSoldOut ? "grayscale" : ""
252
+ }`}
253
+ />
254
+ <span style={{ lineHeight: "normal" }}>
255
+ {getServiceStars(serviceItem)}
256
+ </span>
257
+ </div>
213
258
 
214
- <div
215
- className="flex items-center cursor-pointer "
216
- style={{ color: isSoldOut ? "#bbb" : "text-[#464647]" }}
217
- >
218
- <span className="ml-[3px] min-[420]:text-[13px] text-[12px] text-ellipsis overflow-hidden whitespace-nowrap max-w-[120px]">
219
- {serviceItem.operator_details[2]}
220
- </span>
259
+ <div
260
+ className="flex items-center cursor-pointer "
261
+ style={{
262
+ color: isSoldOut ? "#bbb" : "text-[#464647]",
263
+ }}
264
+ >
265
+ <span className="ml-[3px] min-[420]:text-[13px] text-[12px] text-ellipsis overflow-hidden whitespace-nowrap max-w-[120px]">
266
+ {serviceItem.operator_details[2]}
267
+ </span>
268
+ </div>
269
+ </div>
221
270
  </div>
222
- </div>
271
+ ) : null}
223
272
  </div>
224
- ) : null}
225
- </div>
226
- </div>
273
+ </div>
227
274
 
228
- <DateTimeSectionMobile
229
- onBookButtonPress={onBookButtonPress}
230
- isCiva={isCiva}
231
- isSoldOut={isSoldOut}
232
- isLinatal={isLinatal}
233
- isPeru={isPeru}
234
- orignLabel={orignLabel}
235
- destinationLabel={destinationLabel}
236
- originIcon={serviceItem.icons?.origin}
237
- destinationIcon={serviceItem.icons?.destination}
238
- travelDate={serviceItem.travel_date}
239
- arrivalDate={serviceItem.arrival_date}
240
- depTime={serviceItem.dep_time}
241
- arrTime={serviceItem.arr_time}
242
- seatTypes={serviceItem.seat_types}
243
- seatPriceColor={colors.seatPriceColor}
244
- tooltipBgColor={colors.tooltipBgColor}
245
- currencySign={currencySign}
246
- availableSeats={serviceItem.available_seats}
247
- removeDuplicateSeats={removeDuplicateSeats}
248
- serviceItem={serviceItem}
249
- showLastSeats={showLastSeats}
250
- discountSeatPriceColor={colors.discountSeatPriceColor}
251
- />
275
+ <DateTimeSectionMobile
276
+ onBookButtonPress={onBookButtonPress}
277
+ isCiva={isCiva}
278
+ isSoldOut={isSoldOut}
279
+ isLinatal={isLinatal}
280
+ isPeru={isPeru}
281
+ orignLabel={orignLabel}
282
+ destinationLabel={destinationLabel}
283
+ originIcon={serviceItem.icons?.origin}
284
+ destinationIcon={serviceItem.icons?.destination}
285
+ travelDate={serviceItem.travel_date}
286
+ arrivalDate={serviceItem.arrival_date}
287
+ depTime={serviceItem.dep_time}
288
+ arrTime={serviceItem.arr_time}
289
+ seatTypes={serviceItem.seat_types}
290
+ seatPriceColor={colors.seatPriceColor}
291
+ tooltipBgColor={colors.tooltipBgColor}
292
+ currencySign={currencySign}
293
+ availableSeats={serviceItem.available_seats}
294
+ removeDuplicateSeats={removeDuplicateSeats}
295
+ serviceItem={serviceItem}
296
+ showLastSeats={showLastSeats}
297
+ discountSeatPriceColor={colors.discountSeatPriceColor}
298
+ />
252
299
 
253
- {hasDiscount && (
254
- <div className="flex justify-end">
255
- {isSoldOut ? (
256
- <span className="col-span-2 min-[420]:text-[13px] text-right text-[12px] text-[#ccc]">
257
- Agotado
258
- </span>
259
- ) : null}
260
- </div>
261
- )}
300
+ {hasDiscount && (
301
+ <div className="flex justify-end">
302
+ {isSoldOut ? (
303
+ <span className="col-span-2 min-[420]:text-[13px] text-right text-[12px] text-[#ccc]">
304
+ Agotado
305
+ </span>
306
+ ) : null}
307
+ </div>
308
+ )}
262
309
 
263
- {showLastSeats ? (
264
- <div className="flex justify-end ">
265
- {serviceItem?.available_seats < 10 &&
266
- serviceItem?.available_seats > 0 && (
267
- <div
268
- className="text-[10px] text-center"
269
- style={{
270
- color: colors.tooltipBgColor,
271
- }}
272
- >
273
- ¡Últimos Asientos!
274
- </div>
275
- )}
276
- </div>
277
- ) : null}
310
+ {showLastSeats ? (
311
+ <div className="flex justify-end ">
312
+ {serviceItem?.available_seats < 10 &&
313
+ serviceItem?.available_seats > 0 && (
314
+ <div
315
+ className="text-[10px] text-center"
316
+ style={{
317
+ color: colors.tooltipBgColor,
318
+ }}
319
+ >
320
+ ¡Últimos Asientos!
321
+ </div>
322
+ )}
323
+ </div>
324
+ ) : null}
278
325
 
279
- {/* <div className="bg-[#E6E6E6] -ml-[12px] -mr-[12px] mt-[10px] mb-[10px] h-[1px]"></div> */}
280
- <div className="bg-[#E6E6E6] mt-[10px] mb-[8px] h-[1px]"></div>
326
+ {/* <div className="bg-[#E6E6E6] -ml-[12px] -mr-[12px] mt-[10px] mb-[10px] h-[1px]"></div> */}
327
+ <div className="bg-[#E6E6E6] mt-[10px] mb-[8px] h-[1px]"></div>
281
328
 
282
- <BottomAmenitiesMobile
283
- isSoldOut={isSoldOut}
284
- amenitiesNodes={amenities()}
285
- hoursIcon={renderIcon("hours", "14px")}
286
- duration={serviceItem.duration?.toString()}
287
- isDirectTrip={serviceItem?.is_direct_trip}
288
- directoColor={colors.directoColor}
289
- directoAnim={serviceItem.icons.directoAnim}
290
- isChangeTicket={serviceItem.is_change_ticket}
291
- isPetSeat={isPetSeat}
292
- petSeatInfo={serviceItem.pet_seat_info}
293
- petFriendlyAnim={serviceItem.icons.petFriendlyAnim}
294
- flexibleAnim={serviceItem.icons.flexibleAnim}
295
- isTrackingEnabled={serviceItem?.is_tracking_enabled}
296
- locationAnim={serviceItem.icons.locationAnim}
297
- downArrowIcon={serviceItem.icons.downArrow}
298
- showDropdown={isItemExpanded}
299
- setShowDropdown={() =>
300
- setIsExpanded(isItemExpanded ? null : serviceItem.id)
301
- }
302
- onDropdownToggle={() => {
303
- setIsExpanded(isItemExpanded ? null : serviceItem.id);
304
- }}
305
- isPeru={isPeru}
306
- femaleAnim={serviceItem.icons.femaleAnim}
307
- ladiesBookedSeats={serviceItem.ladies_booked_seats}
308
- isDpEnabled={serviceItem.is_dp_enabled}
309
- />
310
- </div>
329
+ <BottomAmenitiesMobile
330
+ isSoldOut={isSoldOut}
331
+ amenitiesNodes={amenities()}
332
+ hoursIcon={renderIcon("hours", "14px")}
333
+ duration={serviceItem.duration?.toString()}
334
+ isDirectTrip={serviceItem?.is_direct_trip}
335
+ directoColor={colors.directoColor}
336
+ directoAnim={serviceItem.icons.directoAnim}
337
+ isChangeTicket={serviceItem.is_change_ticket}
338
+ isPetSeat={isPetSeat}
339
+ petSeatInfo={serviceItem.pet_seat_info}
340
+ petFriendlyAnim={serviceItem.icons.petFriendlyAnim}
341
+ flexibleAnim={serviceItem.icons.flexibleAnim}
342
+ isTrackingEnabled={serviceItem?.is_tracking_enabled}
343
+ locationAnim={serviceItem.icons.locationAnim}
344
+ downArrowIcon={serviceItem.icons.downArrow}
345
+ showDropdown={isItemExpanded}
346
+ setShowDropdown={() =>
347
+ setIsExpanded(isItemExpanded ? null : serviceItem.id)
348
+ }
349
+ onDropdownToggle={() => {
350
+ setIsExpanded(isItemExpanded ? null : serviceItem.id);
351
+ }}
352
+ isPeru={isPeru}
353
+ femaleAnim={serviceItem.icons.femaleAnim}
354
+ ladiesBookedSeats={serviceItem.ladies_booked_seats}
355
+ isDpEnabled={serviceItem.is_dp_enabled}
356
+ />
357
+ </div>
311
358
 
312
- <ServiceBadgesMobile
313
- showTopLabel={showTopLabel}
314
- isSoldOut={isSoldOut}
315
- colors={colors}
316
- renderIcon={renderIcon}
317
- serviceItem={serviceItem}
318
- isConexion={isConexion}
319
- />
320
- </div>
359
+ <ServiceBadgesMobile
360
+ showTopLabel={showTopLabel}
361
+ isSoldOut={isSoldOut}
362
+ colors={colors}
363
+ renderIcon={renderIcon}
364
+ serviceItem={serviceItem}
365
+ isConexion={isConexion}
366
+ />
367
+ </div>
321
368
 
322
- {/* 🔹 EXPANDABLE DROPDOWN (below the card) */}
323
- {(serviceItem?.offer_text || serviceItem?.is_dp_enabled) &&
324
- !isSoldOut && (
325
- <div
326
- className="px-[12px] pt-[22px] pb-[8px] relative -z-9 -mt-[15px]"
327
- style={{
328
- background: isSoldOut ? offerGradientWithOpacity : offerGradient,
329
- // opacity: isSoldOut ? 0.5 : 1,
330
- borderRadius: "0 0 14px 14px",
331
- zIndex: -1,
332
- }}
333
- >
334
- <div
335
- className="flex flex-col gap-[8px] text-[12px] min-[420px]:text-[12px] text-[#464647]"
336
- style={{ lineHeight: 1.6 }}
337
- >
338
- <div className="flex justify-between items-center">
339
- {serviceItem?.is_dp_enabled &&
340
- Object.keys(serviceItem?.dp_discount_percents ?? {}).length ===
341
- 0 &&
342
- (serviceItem?.dp_discounted_seats ?? []).length === 0 ? (
343
- <div className="flex items-center gap-[6px]">
344
- {/* {renderIcon("whiteFireIcon", "14px")} */}
345
- <LottiePlayer
346
- animationData={serviceItem.icons.starAnimation}
347
- width="14px"
348
- height="14px"
349
- />
369
+ {/* 🔹 EXPANDABLE DROPDOWN (below the card) */}
370
+ {(serviceItem?.offer_text || serviceItem?.is_dp_enabled) &&
371
+ !isSoldOut && (
372
+ <div
373
+ className="px-[12px] pt-[22px] pb-[8px] relative -z-9 -mt-[15px]"
374
+ style={{
375
+ background: isSoldOut
376
+ ? offerGradientWithOpacity
377
+ : offerGradient,
378
+ // opacity: isSoldOut ? 0.5 : 1,
379
+ borderRadius: "0 0 14px 14px",
380
+ zIndex: -1,
381
+ }}
382
+ >
383
+ <div
384
+ className="flex flex-col gap-[8px] text-[12px] min-[420px]:text-[12px] text-[#464647]"
385
+ style={{ lineHeight: 1.6 }}
386
+ >
387
+ <div className="flex justify-between items-center">
388
+ {serviceItem?.is_dp_enabled &&
389
+ Object.keys(serviceItem?.dp_discount_percents ?? {})
390
+ .length === 0 &&
391
+ (serviceItem?.dp_discounted_seats ?? []).length === 0 ? (
392
+ <div className="flex items-center gap-[6px]">
393
+ {/* {renderIcon("whiteFireIcon", "14px")} */}
394
+ <LottiePlayer
395
+ animationData={serviceItem.icons.starAnimation}
396
+ width="14px"
397
+ height="14px"
398
+ />
350
399
 
351
- <span className="text-[#fff]">Más elegido</span>
352
- </div>
353
- ) : (
354
- <div
355
- className={`flex ${(serviceItem?.offer_text || "").length > 10 ? "items-start" : "items-center"}`}
356
- >
357
- <div className={isLongOfferText ? "mt-[2px]" : ""}>
358
- <LottiePlayer
359
- animationData={serviceItem.icons.bombAnim}
360
- width="14px"
361
- height="14px"
362
- />
363
- </div>
400
+ <span className="text-[#fff]">Más elegido</span>
401
+ </div>
402
+ ) : (
403
+ <div
404
+ className={`flex ${(serviceItem?.offer_text || "").length > 10 ? "items-start" : "items-center"}`}
405
+ >
406
+ <div className={isLongOfferText ? "mt-[2px]" : ""}>
407
+ <LottiePlayer
408
+ animationData={serviceItem.icons.bombAnim}
409
+ width="14px"
410
+ height="14px"
411
+ />
412
+ </div>
413
+ <div
414
+ className={`ml-[4px] flex-1 outline-none ${isLongOfferText ? "mt-[2px]" : ""}`}
415
+ style={{
416
+ color: "#fff",
417
+ lineHeight: 1.4,
418
+ }}
419
+ >
420
+ <span className="whitespace-nowrap min-[380px]:text-[12px]">
421
+ Termina en&nbsp;
422
+ <span
423
+ className="bold-text"
424
+ ref={(node) =>
425
+ commonService.startCountdown(node, 599)
426
+ }
427
+ style={{
428
+ fontVariantNumeric: "tabular-nums",
429
+ display: "inline-block",
430
+ }}
431
+ />
432
+ </span>
433
+ </div>
434
+ </div>
435
+ )}
364
436
  <div
365
- className={`ml-[4px] flex-1 outline-none ${isLongOfferText ? "mt-[2px]" : ""}`}
437
+ className="flex flex-col items-end"
366
438
  style={{
367
439
  color: "#fff",
368
- lineHeight: 1.4,
369
440
  }}
370
441
  >
371
- <span className="whitespace-nowrap min-[380px]:text-[12px]">
372
- Termina en&nbsp;
373
- <span
374
- className="bold-text"
375
- ref={(node) =>
376
- commonService.startCountdown(node, 599)
377
- }
378
- style={{
379
- fontVariantNumeric: "tabular-nums",
380
- display: "inline-block",
381
- }}
382
- />
383
- </span>
442
+ <div className="flex items-center">
443
+ <div className="mr-[4px]">
444
+ {" "}
445
+ <LottiePlayer
446
+ animationData={serviceItem.icons.dotAnimation}
447
+ width="12px"
448
+ height="12px"
449
+ />
450
+ </div>
451
+ <span className="flex-1" style={{ lineHeight: 1.4 }}>
452
+ <span
453
+ className="bold-text"
454
+ ref={(node) =>
455
+ commonService.startViewerCount(
456
+ node,
457
+ viewersConfig,
458
+ )
459
+ }
460
+ style={{ fontVariantNumeric: "tabular-nums" }}
461
+ />{" "}
462
+ <span> viendo</span> |{" "}
463
+ <span className="whitespace-nowrap">
464
+ {/* {serviceItem?.is_dp_enabled ? null : "Quedan pocos • "} */}
465
+ <span
466
+ className="bold-text"
467
+ ref={(node) =>
468
+ commonService.startComprandoCount(node, 4, 16)
469
+ }
470
+ style={{ fontVariantNumeric: "tabular-nums" }}
471
+ />{" "}
472
+ comprando
473
+ </span>
474
+ </span>
475
+ </div>
384
476
  </div>
385
477
  </div>
386
- )}
387
- <div
388
- className="flex flex-col items-end"
389
- style={{
390
- color: "#fff",
391
- }}
392
- >
393
- <div className="flex items-center">
394
- <div className="mr-[4px]">
395
- {" "}
396
- <LottiePlayer
397
- animationData={serviceItem.icons.dotAnimation}
398
- width="12px"
399
- height="12px"
400
- />
401
- </div>
402
- <span className="flex-1" style={{ lineHeight: 1.4 }}>
403
- <span
404
- className="bold-text"
405
- ref={(node) =>
406
- commonService.startViewerCount(node, viewersConfig)
407
- }
408
- style={{ fontVariantNumeric: "tabular-nums" }}
409
- />{" "}
410
- <span> viendo</span> |{" "}
411
- <span className="whitespace-nowrap">
412
- {/* {serviceItem?.is_dp_enabled ? null : "Quedan pocos • "} */}
413
- <span
414
- className="bold-text"
415
- ref={(node) =>
416
- commonService.startComprandoCount(node, 4, 16)
417
- }
418
- style={{ fontVariantNumeric: "tabular-nums" }}
419
- />{" "}
420
- comprando
421
- </span>
422
- </span>
423
- </div>
424
478
  </div>
425
479
  </div>
480
+ )}
481
+ <div
482
+ style={{
483
+ display: "grid",
484
+ gridTemplateRows: isItemExpanded ? "1fr" : "0fr",
485
+ opacity: isItemExpanded ? 1 : 0,
486
+ transition:
487
+ "grid-template-rows 0.3s ease-in-out, opacity 0.25s ease-in-out",
488
+ position: "relative",
489
+ zIndex:
490
+ serviceItem?.offer_text || serviceItem?.is_dp_enabled ? -2 : -1,
491
+ }}
492
+ >
493
+ <div
494
+ style={{
495
+ overflow: "hidden",
496
+ minHeight: 0,
497
+ position: serviceItem?.offer_text ? "relative" : undefined,
498
+ zIndex: serviceItem?.offer_text ? -3 : undefined,
499
+ marginTop: serviceItem?.offer_text ? "-15px" : "-10px",
500
+ }}
501
+ >
502
+ <ExpandedDropdownMobile
503
+ serviceItem={serviceItem}
504
+ isPeru={isPeru}
505
+ petSeatInfo={serviceItem.pet_seat_info}
506
+ petFriendlyAnim={serviceItem.icons.petFriendlyAnim}
507
+ isSoldOut={isSoldOut}
508
+ isChangeTicket={serviceItem.is_change_ticket === true}
509
+ ladiesBookedSeats={serviceItem.ladies_booked_seats}
510
+ isDpEnabled={serviceItem.is_dp_enabled}
511
+ femaleAnim={serviceItem.icons.femaleAnim}
512
+ flexibleAnim={serviceItem.icons.flexibleAnim}
513
+ renderIcon={renderIcon}
514
+ />
426
515
  </div>
427
516
  </div>
428
- )}
429
- <div
430
- style={{
431
- display: "grid",
432
- gridTemplateRows: isItemExpanded ? "1fr" : "0fr",
433
- opacity: isItemExpanded ? 1 : 0,
434
- transition:
435
- "grid-template-rows 0.3s ease-in-out, opacity 0.25s ease-in-out",
436
- position: "relative",
437
- zIndex:
438
- serviceItem?.offer_text || serviceItem?.is_dp_enabled ? -2 : -1,
439
- }}
440
- >
441
- <div
442
- style={{
443
- overflow: "hidden",
444
- minHeight: 0,
445
- position: serviceItem?.offer_text ? "relative" : undefined,
446
- zIndex: serviceItem?.offer_text ? -3 : undefined,
447
- marginTop: serviceItem?.offer_text ? "-15px" : "-10px",
448
- }}
449
- >
450
- <ExpandedDropdownMobile
451
- serviceItem={serviceItem}
452
- isPeru={isPeru}
453
- petSeatInfo={serviceItem.pet_seat_info}
454
- petFriendlyAnim={serviceItem.icons.petFriendlyAnim}
455
- isSoldOut={isSoldOut}
456
- isChangeTicket={serviceItem.is_change_ticket === true}
457
- ladiesBookedSeats={serviceItem.ladies_booked_seats}
458
- isDpEnabled={serviceItem.is_dp_enabled}
459
- femaleAnim={serviceItem.icons.femaleAnim}
460
- flexibleAnim={serviceItem.icons.flexibleAnim}
461
- renderIcon={renderIcon}
462
- />
463
517
  </div>
464
- </div>
465
- </div>
518
+ )}
519
+ </>
466
520
  );
467
521
  }
468
522