kupos-ui-components-lib 9.8.3 → 9.8.4

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