kupos-ui-components-lib 9.9.3 → 9.9.6

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 (35) 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 +156 -176
  4. package/dist/components/ServiceItem/ServiceItemDesktop.d.ts +1 -1
  5. package/dist/components/ServiceItem/ServiceItemDesktop.js +28 -12
  6. package/dist/components/ServiceItem/ServiceItemMobile.d.ts +1 -1
  7. package/dist/components/ServiceItem/ServiceItemMobile.js +43 -17
  8. package/dist/components/ServiceItem/mobileTypes.d.ts +48 -1
  9. package/dist/components/ServiceItem/types.d.ts +27 -1
  10. package/dist/styles.css +219 -13
  11. package/dist/ui/ExpendedDropDown/ExpandedDropdown.d.ts +1 -2
  12. package/dist/ui/ExpendedDropDown/ExpandedDropdown.js +2 -4
  13. package/dist/ui/FeatureServiceUI/FeatureServiceUi.js +19 -4
  14. package/dist/ui/OfferBanner.d.ts +2 -0
  15. package/dist/ui/OfferBanner.js +22 -15
  16. package/dist/ui/SeatSection/SeatSection.js +3 -3
  17. package/dist/utils/CommonService.d.ts +3 -0
  18. package/dist/utils/CommonService.js +18 -1
  19. package/package.json +1 -1
  20. package/src/KuposUIComponent.tsx +3 -0
  21. package/src/assets/images/anims/service_list/flame_anim.json +1 -0
  22. package/src/assets/images/anims/service_list/thunder_icon.json +1 -0
  23. package/src/assets/images/anims/service_list/users_anim.json +1 -0
  24. package/src/components/ServiceItem/PeruServiceItemDesktop.tsx +404 -277
  25. package/src/components/ServiceItem/ServiceItemDesktop.tsx +71 -8
  26. package/src/components/ServiceItem/ServiceItemMobile.tsx +387 -288
  27. package/src/components/ServiceItem/mobileTypes.ts +50 -7
  28. package/src/components/ServiceItem/types.ts +32 -1
  29. package/src/styles.css +15 -0
  30. package/src/ui/ExpendedDropDown/ExpandedDropdown.tsx +2 -4
  31. package/src/ui/FeaturServiceUiMobile/FeatureServiceUiMobile.tsx +575 -0
  32. package/src/ui/FeatureServiceUI/FeatureServiceUi.tsx +634 -0
  33. package/src/ui/OfferBanner.tsx +71 -43
  34. package/src/ui/SeatSection/SeatSection.tsx +3 -3
  35. package/src/utils/CommonService.ts +26 -1
@@ -15,6 +15,9 @@ interface KuposUIComponentProps {
15
15
  orignLabel?: string;
16
16
  destinationLabel?: string;
17
17
  t?: (key: string) => string;
18
+ ticketQuantity?: number;
19
+ onIncreaseTicketQuantity?: (serviceItem: any) => void;
20
+ onDecreaseTicketQuantity?: (serviceItem: any) => void;
18
21
  id?: string;
19
22
  name?: string;
20
23
  description?: string;
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { ServiceItemProps } from "./types";
3
- declare function PeruServiceItemDesktop({ serviceItem, onBookButtonPress, colors, metaData, children, busStage, serviceDetailsLoading, cityOrigin, cityDestination, translation, orignLabel, destinationLabel, currencySign, isCiva, showRating, showLastSeats, removeArrivalTime, removeDuplicateSeats, isSeatIcon, showAvailableSeats, isPeru, siteType, isAllinBus, isFlores, t, }: ServiceItemProps & {
3
+ declare function PeruServiceItemDesktop({ serviceItem, onBookButtonPress, colors, metaData, children, busStage, serviceDetailsLoading, cityOrigin, cityDestination, translation, orignLabel, destinationLabel, currencySign, isCiva, showRating, showLastSeats, removeArrivalTime, removeDuplicateSeats, isSeatIcon, showAvailableSeats, isPeru, siteType, isAllinBus, viewersConfig, isExpand, setIsExpand, coachKey, isLoggedIn, showLoginModal, isFlores, isNewUiEnabled, showLoginOption, t, }: ServiceItemProps & {
4
4
  currencySign?: string;
5
5
  }): React.ReactElement;
6
6
  export default PeruServiceItemDesktop;
@@ -3,7 +3,6 @@ import DateService from "../../utils/DateService";
3
3
  import CommonService from "../../utils/CommonService";
4
4
  import ModalEventManager from "../../utils/ModalEventManager";
5
5
  import InternationalServicePopupBody from "../InternationalServicePopupBody";
6
- import LottiePlayer from "../../assets/LottiePlayer";
7
6
  import promoAnimation from "../../assets/images/anims/service_list/promocion.json";
8
7
  import flexibleAnimation from "../../assets/images/anims/service_list/flexible.json";
9
8
  import locationAnimation from "../../assets/images/anims/service_list/location.json";
@@ -14,73 +13,67 @@ import pullmanFlexibleAnimation from "../../assets/images/anims/service_list/pul
14
13
  import pullmanPetFriendlyAnimation from "../../assets/images/anims/service_list/pullmanPetFriendly.json";
15
14
  import pullmanLocationAnimation from "../../assets/images/anims/service_list/pullmanLocation.json";
16
15
  import pullmanPriorityStageAnimation from "../../assets/images/anims/service_list/pullmanPriorityStage.json";
17
- import pullmanPromoAnimation from "../../assets/images/anims/service_list/promocion.json";
18
- import pullmanDirectoAnimation from "../../assets/images/anims/service_list/directo.json";
19
16
  import opsitesFlexibleAnimation from "../../assets/images/anims/service_list/opsitesFlexible.json";
20
17
  import opsitesPetFriendlyAnimation from "../../assets/images/anims/service_list/opsitesPetFriendly.json";
21
18
  import opsitesLocationAnimation from "../../assets/images/anims/service_list/opsitesLocation.json";
22
19
  import opsitesPriorityStageAnimation from "../../assets/images/anims/service_list/opsitesPriorityStage.json";
23
- import opsitesPromoAnimation from "../../assets/images/anims/service_list/promocion.json";
24
- import opsitesDirectoAnimation from "../../assets/images/anims/service_list/directo.json";
25
- import linatalFlexibleAnimation from "../../assets/images/anims/service_list/flexible.json";
26
- import linatalPromoAnimation from "../../assets/images/anims/service_list/promocion.json";
27
- import linatalDirectoAnimation from "../../assets/images/anims/service_list/directo.json";
28
- import linatalPriorityStageAnimation from "../../assets/images/anims/service_list/priority_stage.json";
29
- import linatalPetFriendlyAnimation from "../../assets/images/anims/service_list/pet_friendly.json";
30
- import linatalLocationAnimation from "../../assets/images/anims/service_list/location.json";
20
+ import bombAnimation from "../../assets/images/anims/service_list/bomb.json";
21
+ import dotAnimation from "../../assets/images/anims/service_list/dot_animation.json";
31
22
  import StageTooltip from "../../ui/StagesTooltip";
32
23
  import RatingBlock from "../../ui/RatingBlock";
33
24
  import DurationBlock from "../../ui/DurationBlock";
34
25
  import PetBlock from "../../ui/PetBlock";
35
26
  import FlexibleBlock from "../../ui/FlexibleBlock";
36
27
  import AmenitiesBlock from "../../ui/AmenitiesBlock";
28
+ import SeatSection from "../../ui/SeatSection/SeatSection";
29
+ import KuposButton from "../../ui/KuposButton/KuposButton";
30
+ import BottomAmenities from "../../ui/BottomAmenities/BottomAmenities";
31
+ import OfferBanner from "../../ui/OfferBanner";
32
+ import ServiceBadges from "../../ui/ServiceBadges/ServiceBadges";
37
33
  const SEAT_EXCEPTIONS = ["Asiento mascota"];
38
- function PeruServiceItemDesktop({ serviceItem, onBookButtonPress, colors, metaData, children, busStage, serviceDetailsLoading, cityOrigin, cityDestination, translation, orignLabel, destinationLabel, currencySign, isCiva, showRating, showLastSeats, removeArrivalTime, removeDuplicateSeats, isSeatIcon, showAvailableSeats, isPeru, siteType, isAllinBus, isFlores, t = (key) => key, }) {
39
- var _a, _b, _c, _d;
40
- const animationMap = {
41
- promoAnim: {
42
- kupos: promoAnimation,
43
- pullman: pullmanPromoAnimation,
44
- opsites: opsitesPromoAnimation,
45
- linatal: linatalPromoAnimation,
46
- },
47
- locationAnim: {
48
- kupos: locationAnimation,
49
- pullman: pullmanLocationAnimation,
50
- opsites: opsitesLocationAnimation,
51
- linatal: linatalLocationAnimation,
52
- },
53
- directoAnim: {
54
- kupos: directoAnimation,
55
- pullman: pullmanDirectoAnimation,
56
- opsites: opsitesDirectoAnimation,
57
- linatal: linatalDirectoAnimation,
58
- },
59
- petFriendlyAnim: {
60
- kupos: petFriendlyAnimation,
61
- pullman: pullmanPetFriendlyAnimation,
62
- opsites: opsitesPetFriendlyAnimation,
63
- linatal: linatalPetFriendlyAnimation,
64
- },
65
- priorityStageAnim: {
66
- kupos: priorityStageAnimation,
67
- pullman: pullmanPriorityStageAnimation,
68
- opsites: opsitesPriorityStageAnimation,
69
- linatal: linatalPriorityStageAnimation,
70
- },
71
- flexibleIcon: {
72
- kupos: flexibleAnimation,
73
- pullman: pullmanFlexibleAnimation,
74
- opsites: opsitesFlexibleAnimation,
75
- linatal: linatalFlexibleAnimation,
76
- },
77
- };
34
+ const ANIMATION_MAP = {
35
+ promoAnim: {
36
+ kupos: promoAnimation,
37
+ },
38
+ locationAnim: {
39
+ kupos: locationAnimation,
40
+ pullman: pullmanLocationAnimation,
41
+ opsites: opsitesLocationAnimation,
42
+ },
43
+ directoAnim: {
44
+ kupos: directoAnimation,
45
+ },
46
+ petFriendlyAnim: {
47
+ kupos: petFriendlyAnimation,
48
+ pullman: pullmanPetFriendlyAnimation,
49
+ opsites: opsitesPetFriendlyAnimation,
50
+ },
51
+ priorityStageAnim: {
52
+ kupos: priorityStageAnimation,
53
+ pullman: pullmanPriorityStageAnimation,
54
+ opsites: opsitesPriorityStageAnimation,
55
+ },
56
+ flexibleIcon: {
57
+ kupos: flexibleAnimation,
58
+ pullman: pullmanFlexibleAnimation,
59
+ opsites: opsitesFlexibleAnimation,
60
+ },
61
+ bombAnimation: {
62
+ kupos: bombAnimation,
63
+ },
64
+ dotAnimation: {
65
+ kupos: dotAnimation,
66
+ opsites: dotAnimation,
67
+ },
68
+ };
69
+ function PeruServiceItemDesktop({ serviceItem, onBookButtonPress, colors, metaData, children, busStage, serviceDetailsLoading, cityOrigin, cityDestination, translation, orignLabel, destinationLabel, currencySign, isCiva, showRating, showLastSeats, removeArrivalTime, removeDuplicateSeats, isSeatIcon, showAvailableSeats, isPeru, siteType, isAllinBus, viewersConfig, isExpand, setIsExpand, coachKey, isLoggedIn, showLoginModal, isFlores, isNewUiEnabled, showLoginOption, t = (key) => key, }) {
70
+ var _a, _b, _c, _d, _e;
78
71
  const getAnimationIcon = (icon) => {
79
- const animation = animationMap[icon];
72
+ var _a;
73
+ const animation = ANIMATION_MAP[icon];
80
74
  if (!animation)
81
75
  return null;
82
- const currentSiteType = siteType || "kupos";
83
- return animation[currentSiteType];
76
+ return (_a = animation[siteType]) !== null && _a !== void 0 ? _a : animation.kupos;
84
77
  };
85
78
  const SvgAmenities = ({ moreAnemities, name, color, }) => {
86
79
  var _a;
@@ -106,6 +99,7 @@ function PeruServiceItemDesktop({ serviceItem, onBookButtonPress, colors, metaDa
106
99
  busStage[labelId].split("|")[1] === "true" &&
107
100
  busStage[labelId].split("|")[0];
108
101
  let isSoldOut = serviceItem.available_seats <= 0;
102
+ const hasDpEnabled = (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled) === true;
109
103
  const renderIcon = (iconKey, size = "14px") => {
110
104
  var _a;
111
105
  const iconValue = (_a = serviceItem.icons) === null || _a === void 0 ? void 0 : _a[iconKey];
@@ -224,6 +218,7 @@ function PeruServiceItemDesktop({ serviceItem, onBookButtonPress, colors, metaDa
224
218
  };
225
219
  const checkMidnight = () => {
226
220
  var _a, _b;
221
+ setIsExpand === null || setIsExpand === void 0 ? void 0 : setIsExpand(null);
227
222
  if ((cityOrigin === null || cityOrigin === void 0 ? void 0 : cityOrigin.label) &&
228
223
  (cityDestination === null || cityDestination === void 0 ? void 0 : cityDestination.label) &&
229
224
  ((cityOrigin.label.toLowerCase().includes("argentina") &&
@@ -312,18 +307,55 @@ function PeruServiceItemDesktop({ serviceItem, onBookButtonPress, colors, metaDa
312
307
  const dropoffName = ((_b = serviceItem.stage_details_arr) === null || _b === void 0 ? void 0 : _b.length)
313
308
  ? extractStage(serviceItem.stage_details_arr, 1)
314
309
  : null;
310
+ const countdownSeconds = 599;
311
+ const startCountdown = (node) => {
312
+ if (!node)
313
+ return;
314
+ const prevId = node.dataset.countdownId;
315
+ if (prevId)
316
+ clearInterval(Number(prevId));
317
+ let remaining = countdownSeconds;
318
+ const formatTime = (totalSecs) => {
319
+ const m = Math.floor(totalSecs / 60);
320
+ const s = totalSecs % 60;
321
+ return `${String(m).padStart(2, "0")}:${String(s).padStart(2, "0")}`;
322
+ };
323
+ node.textContent = formatTime(remaining);
324
+ const id = setInterval(() => {
325
+ remaining -= 1;
326
+ if (remaining <= 0) {
327
+ remaining = countdownSeconds;
328
+ }
329
+ node.textContent = formatTime(remaining);
330
+ }, 1000);
331
+ node.dataset.countdownId = String(id);
332
+ };
315
333
  const items = [
316
334
  {
317
- key: "rating",
318
- width: "30%",
319
- render: (React.createElement(RatingBlock, { showRating: showRating, serviceItem: serviceItem, isSoldOut: isSoldOut, colors: colors, t: t, translation: translation, isPeru: isPeru })),
335
+ key: "amenities",
336
+ width: "20%",
337
+ condition: true,
338
+ render: (React.createElement(AmenitiesBlock, { serviceItem: serviceItem, metaData: metaData, isSoldOut: isSoldOut, colors: colors, getAnimationIcon: getAnimationIcon, getAmenityName: CommonService.getAmenityName, SvgAmenities: SvgAmenities, isPeru: isPeru })),
320
339
  },
321
340
  {
322
341
  key: "duration",
323
- width: "20%",
342
+ width: "12%",
324
343
  condition: serviceItem.duration,
325
344
  render: (React.createElement(DurationBlock, { serviceItem: serviceItem, translation: translation, renderIcon: renderIcon, isSoldOut: isSoldOut, colors: colors })),
326
345
  },
346
+ // {
347
+ // key: "directo",
348
+ // width: "12%",
349
+ // condition: serviceItem?.is_direct_trip === true,
350
+ // render: (
351
+ // <DirectoBlock
352
+ // translation={translation}
353
+ // getAnimationIcon={getAnimationIcon}
354
+ // colors={colors}
355
+ // isSoldOut={isSoldOut}
356
+ // />
357
+ // ),
358
+ // },
327
359
  {
328
360
  key: "pet",
329
361
  width: "20%",
@@ -334,48 +366,83 @@ function PeruServiceItemDesktop({ serviceItem, onBookButtonPress, colors, metaDa
334
366
  {
335
367
  key: "flexible",
336
368
  width: "20%",
337
- condition: false,
369
+ condition: serviceItem.is_change_ticket === true,
338
370
  render: (React.createElement(FlexibleBlock, { translation: translation, getAnimationIcon: getAnimationIcon, colors: colors, serviceItem: serviceItem, isSoldOut: isSoldOut })),
339
371
  },
340
- {
341
- key: "amenities",
342
- width: "20%",
343
- render: (React.createElement(AmenitiesBlock, { serviceItem: serviceItem, metaData: metaData, isSoldOut: isSoldOut, colors: colors, isPeru: isPeru, getAnimationIcon: getAnimationIcon, getAmenityName: CommonService.getAmenityName, SvgAmenities: SvgAmenities })),
344
- },
345
372
  ];
346
- const amenitiesItem = items.find((i) => i.key === "amenities");
347
- const otherItems = items.filter((i) => i.key !== "amenities" && i.condition !== false);
348
- return (React.createElement("div", { className: `relative ${serviceItem.offer_text ? "mb-[55px]" : "mb-[10px]"} ${(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_direct_trip) ||
373
+ const otherItems = items.filter((i) => i.key !== "pet" && i.key !== "flexible" && !!i.condition);
374
+ const isItemExpanded = serviceItem.id === isExpand || isExpand === true;
375
+ const grayscaleClass = isSoldOut ? "grayscale" : "";
376
+ const hasOfferText = Boolean(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text);
377
+ const offerGradient = `linear-gradient(90deg, ${colors.rightGradiantColor || "#ff5964"} 0%, ${colors.leftGradiantColor || "#ff8842"} 100%)`;
378
+ const offerGradientWithOpacity = `linear-gradient(90deg, ${colors.rightGradiantColor || "#ff5964"}80 0%, ${colors.leftGradiantColor || "#ff8842"}80 100%)`;
379
+ const serviceCardStyle = (hasOfferText && isNewUiEnabled) || hasDpEnabled
380
+ ? {
381
+ borderColor: "transparent",
382
+ borderStyle: "solid",
383
+ borderWidth: "3px 3px 0 3px",
384
+ borderRadius: isItemExpanded || coachKey ? "18px 18px 0 0" : "18px",
385
+ background: `linear-gradient(#fff, #fff) padding-box, ${isSoldOut ? offerGradientWithOpacity : offerGradient} border-box`,
386
+ // zIndex: 1,
387
+ }
388
+ : {};
389
+ const seats = removeDuplicateSeats
390
+ ? ((_c = serviceItem.seat_types) === null || _c === void 0 ? void 0 : _c.filter((seat, index, self) => index === self.findIndex((s) => s.label === seat.label))) || []
391
+ : serviceItem.seat_types || [];
392
+ const discountedSeats = seats.map((seat) => (Object.assign(Object.assign({}, seat), CommonService.calculateDiscountedPrice(seat.fare, serviceItem))));
393
+ const hasDiscount = discountedSeats.some((seat) => seat.originalPrice !== seat.discountedPrice);
394
+ return (React.createElement("div", { className: `relative hover:z-[150] ${hasOfferText ? "mb-[55px]" : "mb-[10px]"} ${(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_direct_trip) ||
349
395
  (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.train_type_label) === "Tren Express (Nuevo)" ||
350
396
  showTopLabel
351
397
  ? "mt-[24px]"
352
398
  : "mt-[20px]"} ` },
353
- React.createElement("div", { className: "bg-white rounded-[20px] shadow-service mx-auto relative" },
354
- React.createElement("div", { className: "p-[15px] pt-[20px]" },
355
- React.createElement("div", { className: "grid text-[#464647] w-full [grid-template-columns:14%_40%_0.5%_24%_13.5%] gap-x-[2%] items-center", style: { marginTop: showTopLabel ? "8px" : "" } },
356
- React.createElement("div", { className: "flex items-center justify-center m-[auto]" },
357
- React.createElement("div", { className: " " },
358
- React.createElement("img", { src: serviceItem.operator_details[0], alt: "service logo", className: `h-auto object-contain ${isFlores ? "w-[80%]" : "w-full"} ${isSoldOut ? "grayscale" : ""}` })),
359
- isCiva ? (React.createElement("div", { className: "text-[13.33px] black-text ml-2" }, serviceItem.operator_details[2])) : null),
399
+ ((serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) || hasDpEnabled) && !isSoldOut && (React.createElement(OfferBanner, { offerGradient: offerGradient, isSoldOut: isSoldOut, serviceItem: serviceItem, renderIcon: renderIcon, isLoggedIn: isLoggedIn, showLoginModal: showLoginModal, viewersConfig: viewersConfig, getAnimationIcon: getAnimationIcon, showLoginOption: showLoginOption, isNewUiEnabled: isNewUiEnabled, colors: colors })),
400
+ React.createElement("div", { id: `service-card-${serviceItem.id}`, className: `bg-white mx-auto relative ${(hasOfferText && isNewUiEnabled && !isSoldOut) || hasDpEnabled
401
+ ? "z-[3] rounded-[18px]"
402
+ : "rounded-[10px] border border-[#ccc]"}`, style: serviceCardStyle },
403
+ React.createElement("div", { className: " pt-[20px]", style: {
404
+ padding: hasOfferText
405
+ ? "20px 15px 10px 15px"
406
+ : coachKey
407
+ ? "20px 15px 20px 15px"
408
+ : "20px 15px 10px 15px",
409
+ marginTop: hasDiscount || hasOfferText ? "14px" : "",
410
+ } },
411
+ React.createElement("div", { className: "grid text-[#464647] w-full [grid-template-columns:14%_40%_0.5%_24%_13.5%] gap-x-[2%] items-center",
412
+ // style={{ marginTop: showTopLabel ? "8px" : "" }}
413
+ style: {
414
+ marginTop: showTopLabel || (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_direct_trip) ? "8px" : "",
415
+ } },
416
+ React.createElement("div", { style: {
417
+ display: "flex",
418
+ flexDirection: "column",
419
+ // gap: "5px",
420
+ } },
421
+ React.createElement("div", {
422
+ // className="flex items-center justify-center m-[auto]"
423
+ className: "" },
424
+ React.createElement("img", { src: serviceItem.operator_details[0], alt: "service logo", className: `h-auto object-contain ${isFlores ? "w-[80%]" : "w-full"} ${isSoldOut ? "grayscale" : ""}` }),
425
+ isCiva ? (React.createElement("div", { className: "text-[13.33px] black-text ml-2" }, serviceItem.operator_details[2])) : null),
426
+ React.createElement(RatingBlock, { showRating: showRating, serviceItem: serviceItem, isSoldOut: isSoldOut, colors: colors, t: t, translation: translation, isPeru: isPeru })),
360
427
  React.createElement("div", { className: `min-h-[2.5rem] grid grid-cols-[0.8fr_auto_26%_1fr] gap-x-4 items-center text-[13.33px] ${isSoldOut ? "text-[#c0c0c0]" : ""}`, style: {
361
428
  gridTemplateRows: "1fr",
362
429
  } },
363
- React.createElement("div", { className: "flex flex-col gap-[10px]" },
430
+ React.createElement("div", { className: "flex flex-col gap-[4px]" },
364
431
  orignLabel ? (React.createElement("div", { className: "w-[60px] h-[20px] flex items-center bold-text" }, orignLabel)) : (React.createElement("div", { className: "h-[20px] flex items-center" },
365
- React.createElement("img", { src: (_c = serviceItem.icons) === null || _c === void 0 ? void 0 : _c.origin, alt: "origin", className: `w-[18px] h-auto mr-[8px] ${isSoldOut ? "grayscale" : ""}` }))),
432
+ React.createElement("img", { src: (_d = serviceItem.icons) === null || _d === void 0 ? void 0 : _d.origin, alt: "origin", className: `w-[18px] h-auto mr-[8px] ${isSoldOut ? "grayscale" : ""}` }))),
366
433
  !isCiva &&
367
434
  (destinationLabel ? (React.createElement("div", { className: "w-[60px] h-[20px] flex items-center bold-text" }, destinationLabel)) : (React.createElement("div", { className: "h-[20px] flex items-center" },
368
- React.createElement("img", { src: (_d = serviceItem.icons) === null || _d === void 0 ? void 0 : _d.destination, className: `w-[18px] h-auto mr-[8px] ${isSoldOut ? "grayscale" : ""}`, style: { opacity: isSoldOut ? 0.5 : 1 } }))))),
369
- React.createElement("div", { className: "flex flex-col gap-[10px]" },
435
+ React.createElement("img", { src: (_e = serviceItem.icons) === null || _e === void 0 ? void 0 : _e.destination, className: `w-[18px] h-auto mr-[8px] ${isSoldOut ? "grayscale" : ""}`, style: { opacity: isSoldOut ? 0.5 : 1 } }))))),
436
+ React.createElement("div", { className: "flex flex-col gap-[4px]" },
370
437
  React.createElement(StageTooltip, { stageData: serviceItem.boarding_stages, direction: 1, terminals: busStage, serviceItem: serviceItem, metaData: metaData, colors: colors },
371
438
  React.createElement("span", { className: "cursor-pointer bold-text capitalize" }, DateService.getServiceItemDate(serviceItem.travel_date))),
372
439
  !isCiva && (React.createElement(StageTooltip, { stageData: serviceItem.dropoff_stages, direction: 2, terminals: busStage, serviceItem: serviceItem, metaData: metaData, colors: colors },
373
440
  React.createElement("span", { className: "cursor-pointer bold-text capitalize" }, DateService.getServiceItemDate(serviceItem.arrival_date))))),
374
- React.createElement("div", { className: "flex flex-col gap-[10px] items-center" },
441
+ React.createElement("div", { className: "flex flex-col gap-[4px] items-center" },
375
442
  React.createElement("div", { className: "h-[20px] flex items-center justify-center" },
376
443
  React.createElement("div", null, "\u2022")),
377
444
  !isCiva && (React.createElement("div", { className: "h-[20px] flex items-center justify-center" }, removeArrivalTime ? null : serviceItem.arr_time ? (React.createElement("div", null, "\u2022")) : null))),
378
- React.createElement("div", { className: "flex flex-col gap-[10px]" },
445
+ React.createElement("div", { className: "flex flex-col gap-[4px]" },
379
446
  React.createElement(StageTooltip, { stageData: serviceItem.boarding_stages, direction: 1, terminals: busStage, serviceItem: serviceItem, metaData: metaData, colors: colors },
380
447
  React.createElement("div", { className: "font-[900] bold-text" }, DateService.formatTime(serviceItem.dep_time))),
381
448
  !isCiva && (React.createElement(StageTooltip, { stageData: serviceItem.dropoff_stages, direction: 2, terminals: busStage, serviceItem: serviceItem, metaData: metaData, colors: colors },
@@ -391,102 +458,15 @@ function PeruServiceItemDesktop({ serviceItem, onBookButtonPress, colors, metaDa
391
458
  margin: "auto",
392
459
  } }),
393
460
  React.createElement("div", { className: "content-center" },
394
- React.createElement("div", { className: `relative flex gap-[10px] text-[13.33px] justify-between min-h-[2.5rem] ${getNumberOfSeats() < 3 ? "" : ""}`, style: getNumberOfSeats() < 2
395
- ? { alignItems: "center" }
396
- : { alignItems: "center" } },
397
- React.createElement("div", { className: "flex flex-col justify-between" }, getSeatNames()),
398
- React.createElement("div", { className: "flex flex-col justify-between absolute inset-y-0 right-0 left-1/2 h-full", style: {
399
- color: isSoldOut ? "#c0c0c0" : colors.priceColor,
400
- top: 0,
401
- bottom: 0,
402
- left: "68%",
403
- right: 0,
404
- justifyContent: getNumberOfSeats() < 2 ? "center" : "center",
405
- gap: "5px",
406
- } },
407
- React.createElement("span", { style: {
408
- position: "absolute",
409
- top: getNumberOfSeats() > 1 ? -10 : -5,
410
- fontWeight: "initial",
411
- fontSize: "12px",
412
- left: 0,
413
- color: "#6a6a6a",
414
- } }, "Desde"),
415
- getSeatPrice()))),
416
- React.createElement("div", null,
417
- React.createElement("button", { onClick: () => (!isSoldOut ? checkMidnight() : null), disabled: serviceDetailsLoading, className: `w-full ${serviceDetailsLoading || isSoldOut ? "py-[12px]" : "py-[12px]"} text-[13.33px] font-bold text-white rounded-[10px] border-none px-[20px] flex items-center justify-center`, style: {
418
- backgroundColor: serviceDetailsLoading || isSoldOut
419
- ? "lightgray"
420
- : colors.kuposButtonColor,
421
- cursor: serviceDetailsLoading || isSoldOut
422
- ? "not-allowed"
423
- : "pointer",
424
- } },
425
- React.createElement("span", { className: "min-w-[75px] flex justify-center items-center bold-text uppercase" },
426
- isSoldOut ? renderIcon("soldOutIcon", "14px") : null,
427
- serviceDetailsLoading ? (React.createElement("span", { className: "loader-circle" })) : !isSoldOut ? (translation === null || translation === void 0 ? void 0 : translation.buyButton) : (translation === null || translation === void 0 ? void 0 : translation.soldOutButton))))),
428
- showLastSeats ? (React.createElement("div", { className: "flex justify-end mr-[11px]" }, (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.available_seats) < 10 &&
429
- (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.available_seats) > 0 && (React.createElement("div", { className: "text-[12px] text-[red] mt-1 text-center" }, "\u00A1 \u00DAltimos Asientos!")))) : null,
430
- React.createElement("div", { className: "flex items-center mt-[15px] border-t border-[#eee] pt-[10px]" },
431
- React.createElement("div", { className: "grid items-center gap-[2%] flex-1", style: {
432
- gridTemplateColumns: "30% 18% 23% 23%",
433
- // otherItems
434
- // .map((i) => i.width)
435
- // .join(" "),
436
- } }, otherItems.map((item) => (React.createElement("div", { key: item.key, className: "flex items-center " }, item.render)))),
437
- React.createElement("div", { className: "flex items-center ml-[12px] shrink-0 w-[130px] justify-end" }, amenitiesItem === null || amenitiesItem === void 0 ? void 0 : amenitiesItem.render)))),
461
+ React.createElement(SeatSection, { seatTypes: serviceItem.seat_types, serviceItem: serviceItem, availableSeats: serviceItem.available_seats, isSoldOut: isSoldOut, priceColor: colors.priceColor, currencySign: currencySign, removeDuplicateSeats: removeDuplicateSeats, isPeru: isPeru, renderIcon: renderIcon, discountSeatPriceColor: colors.discountSeatPriceColor })),
462
+ React.createElement("div", { className: "relative" },
463
+ React.createElement(KuposButton, { isSoldOut: isSoldOut, isLoading: serviceDetailsLoading, buttonColor: colors.kuposButtonColor, buyLabel: translation === null || translation === void 0 ? void 0 : translation.buyButton, soldOutLabel: translation === null || translation === void 0 ? void 0 : translation.soldOutButton, soldOutIcon: renderIcon("soldOutIcon", "14px"), onClick: checkMidnight }),
464
+ showLastSeats ? (React.createElement("div", { className: "flex justify-center mr-[11px] w-[100%] right-[0px] absolute left-[0] top-[40px]" }, (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.available_seats) < 10 &&
465
+ (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.available_seats) > 0 && (React.createElement("div", { className: "text-[12px] mt-1 text-center", style: {
466
+ color: colors.seatPriceColor,
467
+ } }, "\u00A1\u00DAltimos Asientos!")))) : null)),
468
+ React.createElement(BottomAmenities, { otherItems: otherItems, serviceItem: serviceItem, grayscaleClass: grayscaleClass, isSoldOut: isSoldOut, isItemExpanded: isItemExpanded, colors: colors, translation: translation, getAnimationIcon: getAnimationIcon, downArrowIcon: renderIcon("downArrow", "10px"), onToggleExpand: () => setIsExpand && setIsExpand(isItemExpanded ? null : serviceItem.id), isPeru: isPeru }))),
438
469
  children,
439
- (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) && (React.createElement("div", { className: ` text-white p-[10px_15px] text-left w-full flex items-center absolute -bottom-[36px] pt-[50px] -z-10 rounded-b-[14px] text-[14px]`, style: {
440
- backgroundColor: isSoldOut
441
- ? colors === null || colors === void 0 ? void 0 : colors.bottomStripColor
442
- : colors === null || colors === void 0 ? void 0 : colors.bottomStripColor,
443
- opacity: isSoldOut ? 0.5 : 1,
444
- } },
445
- React.createElement(LottiePlayer
446
- // animationData={serviceItem.icons.promoAnim}
447
- , {
448
- // animationData={serviceItem.icons.promoAnim}
449
- animationData: getAnimationIcon("promoAnim"), width: "18px", height: "18px" }),
450
- React.createElement("span", { className: "ml-[10px]" }, serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text))),
451
- React.createElement("div", { className: "absolute -top-[11px] left-0 w-full flex items-center justify-end gap-[12px] pr-[15px] z-10 " },
452
- showTopLabel && (React.createElement("div", { className: `flex items-center gap-[10px] py-[4px] px-[14px] rounded-[38px] text-[12.5px] z-20`, style: {
453
- backgroundColor: isSoldOut ? "#ddd" : colors.ratingBottomColor,
454
- } },
455
- React.createElement("div", { className: isSoldOut ? "grayscale" : "" },
456
- React.createElement(LottiePlayer
457
- // animationData={serviceItem.icons.priorityStageAnim}
458
- , {
459
- // animationData={serviceItem.icons.priorityStageAnim}
460
- animationData: getAnimationIcon("priorityStageAnim"), width: "14px", height: "14px" })),
461
- React.createElement("div", { className: isSoldOut ? "text-white" : `text-[${colors.topLabelColor}]` }, showTopLabel))),
462
- boardingName && isAllinBus && (React.createElement("div", { className: `flex items-center gap-[10px] py-[4px] px-[14px] rounded-[38px] text-[12.5px] z-20`, style: {
463
- backgroundColor: isSoldOut ? "#ddd" : colors.ratingBottomColor,
464
- } },
465
- React.createElement("div", { className: isSoldOut ? "grayscale" : "" },
466
- React.createElement(LottiePlayer
467
- // animationData={serviceItem.icons.priorityStageAnim}
468
- , {
469
- // animationData={serviceItem.icons.priorityStageAnim}
470
- animationData: getAnimationIcon("priorityStageAnim"), width: "14px", height: "14px" })),
471
- React.createElement("div", { className: isSoldOut ? "text-white" : `text-[${colors.topLabelColor}]` }, boardingName))),
472
- (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_transpordo) && (React.createElement("div", { className: `flex items-center gap-[10px] py-[4px] text-white px-[14px] rounded-[38px] text-[12.5px] z-20`, style: {
473
- backgroundColor: isSoldOut ? "#ddd" : colors.tooltipColor,
474
- } },
475
- React.createElement(LottiePlayer, { animationData: serviceItem.icons.connectingServiceIcon, width: "14px", height: "14px" }),
476
- React.createElement("div", null, "Conexión"))),
477
- (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_direct_trip) && (React.createElement("div", { className: `flex items-center gap-[10px] py-[4px] text-white px-[14px] rounded-[38px] text-[12.5px] z-20 `, style: {
478
- backgroundColor: isSoldOut ? "#ddd" : colors.tooltipColor,
479
- } },
480
- React.createElement(LottiePlayer, { animationData: serviceItem.icons.directoAnim, width: "14px", height: "14px" }),
481
- React.createElement("div", null, translation === null || translation === void 0 ? void 0 : translation.directService))),
482
- (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.train_type_label) === "Tren Express (Nuevo)" && (React.createElement("div", { className: `flex items-center gap-[10px] py-[4px] text-white px-[14px] rounded-[38px] text-[12.5px] z-20 `, style: {
483
- backgroundColor: isSoldOut ? "#ddd" : colors.tooltipColor,
484
- } },
485
- React.createElement(LottiePlayer
486
- // animationData={serviceItem.icons.directoAnim}
487
- , {
488
- // animationData={serviceItem.icons.directoAnim}
489
- animationData: getAnimationIcon("directoAnim"), width: "14px", height: "14px" }),
490
- React.createElement("div", null, "Tren Express"))))));
470
+ React.createElement(ServiceBadges, { showTopLabel: showTopLabel, isSoldOut: isSoldOut, colors: colors, renderIcon: renderIcon, translation: translation, serviceItem: serviceItem })));
491
471
  }
492
472
  export default PeruServiceItemDesktop;
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { ServiceItemProps } from "./types";
3
- declare function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, children, busStage, serviceDetailsLoading, cityOrigin, cityDestination, translation, orignLabel, destinationLabel, currencySign, isCiva, showRating, showLastSeats, removeArrivalTime, removeDuplicateSeats, isPeruSites, showAvailableSeats, isSeatIcon, isLinatal, isPeru, t, siteType, isAllinBus, isExpand, setIsExpand, coachKey, viewersConfig, showLoginModal, isLoggedIn, showLoginOption, isFlores, operatorLabel, }: ServiceItemProps & {
3
+ declare function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, children, busStage, serviceDetailsLoading, cityOrigin, cityDestination, translation, orignLabel, destinationLabel, currencySign, isCiva, showRating, showLastSeats, removeArrivalTime, removeDuplicateSeats, isPeruSites, showAvailableSeats, isSeatIcon, isLinatal, isPeru, t, siteType, isAllinBus, isExpand, setIsExpand, coachKey, viewersConfig, isNewUi, showLoginModal, isLoggedIn, showLoginOption, isFeatureDropDownExpand, setIsFeatureDropDownExpand, ticketQuantity, onIncreaseTicketQuantity, onDecreaseTicketQuantity, onRemateUiButtonClick, selectedTimeSlot, onTimeSlotChange, isTimeDropdownOpen, onTimeDropdownToggle, wowDealData, isFlores, }: ServiceItemProps & {
4
4
  currencySign?: string;
5
5
  }): React.ReactElement;
6
6
  export default ServiceItemPB;
@@ -23,6 +23,8 @@ import bombAnimation from "../../assets/images/anims/service_list/bomb.json";
23
23
  import dotAnimation from "../../assets/images/anims/service_list/dot_animation.json";
24
24
  import starAnimation from "../../assets/images/anims/service_list/star_anim.json";
25
25
  import femaleAnimation from "../../assets/images/anims/service_list/female_anim.json";
26
+ import usersAnimation from "../../assets/images/anims/service_list/users_anim.json";
27
+ import flameAnimation from "../../assets/images/anims/service_list/flame_anim.json";
26
28
  import RatingBlock from "../../ui/RatingBlock";
27
29
  import DurationBlock from "../../ui/DurationBlock";
28
30
  import PetBlock from "../../ui/PetBlock";
@@ -32,6 +34,8 @@ import KuposButton from "../../ui/KuposButton/KuposButton";
32
34
  import BottomAmenities from "../../ui/BottomAmenities/BottomAmenities";
33
35
  import SeatSection from "../../ui/SeatSection/SeatSection";
34
36
  import DateTimeSection from "../../ui/DateTimeSection/DateTimeSection";
37
+ import FeatureServiceUi from "../../ui/FeatureServiceUI/FeatureServiceUi";
38
+ import thunderAnimation from "../../assets/images/anims/service_list/thunder_icon.json";
35
39
  import ServiceBadges from "../../ui/ServiceBadges/ServiceBadges";
36
40
  const SEAT_EXCEPTIONS = ["Asiento mascota"];
37
41
  const ANIMATION_MAP = {
@@ -64,6 +68,9 @@ const ANIMATION_MAP = {
64
68
  bombAnimation: {
65
69
  kupos: bombAnimation,
66
70
  },
71
+ thunderAnimation: {
72
+ kupos: thunderAnimation,
73
+ },
67
74
  dotAnimation: {
68
75
  kupos: dotAnimation,
69
76
  },
@@ -73,9 +80,15 @@ const ANIMATION_MAP = {
73
80
  femaaleAnimation: {
74
81
  kupos: femaleAnimation,
75
82
  },
83
+ usersAnimation: {
84
+ kupos: usersAnimation,
85
+ },
86
+ flameAnimation: {
87
+ kupos: flameAnimation,
88
+ },
76
89
  };
77
- function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, children, busStage, serviceDetailsLoading, cityOrigin, cityDestination, translation, orignLabel, destinationLabel, currencySign, isCiva, showRating, showLastSeats, removeArrivalTime, removeDuplicateSeats, isPeruSites, showAvailableSeats, isSeatIcon, isLinatal, isPeru, t = (key) => key, siteType, isAllinBus, isExpand, setIsExpand, coachKey, viewersConfig, showLoginModal, isLoggedIn, showLoginOption, isFlores, operatorLabel, }) {
78
- var _a;
90
+ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, children, busStage, serviceDetailsLoading, cityOrigin, cityDestination, translation, orignLabel, destinationLabel, currencySign, isCiva, showRating, showLastSeats, removeArrivalTime, removeDuplicateSeats, isPeruSites, showAvailableSeats, isSeatIcon, isLinatal, isPeru, t = (key) => key, siteType, isAllinBus, isExpand, setIsExpand, coachKey, viewersConfig, isNewUi, showLoginModal, isLoggedIn, showLoginOption, isFeatureDropDownExpand, setIsFeatureDropDownExpand, ticketQuantity, onIncreaseTicketQuantity, onDecreaseTicketQuantity, onRemateUiButtonClick, selectedTimeSlot, onTimeSlotChange, isTimeDropdownOpen, onTimeDropdownToggle, wowDealData, isFlores, }) {
91
+ var _a, _b, _c;
79
92
  const getAnimationIcon = (icon) => {
80
93
  var _a;
81
94
  const animation = ANIMATION_MAP[icon];
@@ -110,8 +123,9 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
110
123
  const isItemExpanded = serviceItem.id === isExpand || isExpand === true;
111
124
  const grayscaleClass = isSoldOut ? "grayscale" : "";
112
125
  const hasOfferText = Boolean(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text);
126
+ const isNewUiEnabled = ((_b = (_a = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.discounts) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.new_ui_enabled) === true;
113
127
  const seats = removeDuplicateSeats
114
- ? ((_a = serviceItem.seat_types) === null || _a === void 0 ? void 0 : _a.filter((seat, index, self) => index === self.findIndex((s) => s.label === seat.label))) || []
128
+ ? ((_c = serviceItem.seat_types) === null || _c === void 0 ? void 0 : _c.filter((seat, index, self) => index === self.findIndex((s) => s.label === seat.label))) || []
115
129
  : serviceItem.seat_types || [];
116
130
  const discountedSeats = seats.map((seat) => (Object.assign(Object.assign({}, seat), CommonService.calculateDiscountedPrice(seat.fare, serviceItem))));
117
131
  const hasDiscount = discountedSeats.some((seat) => seat.originalPrice !== seat.discountedPrice);
@@ -120,7 +134,7 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
120
134
  const hasDpEnabled = (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled) === true;
121
135
  const offerGradient = `linear-gradient(90deg, ${colors.rightGradiantColor || "#ff5964"} 0%, ${colors.leftGradiantColor || "#ff8842"} 100%)`;
122
136
  const offerGradientWithOpacity = `linear-gradient(90deg, ${colors.rightGradiantColor || "#ff5964"}80 0%, ${colors.leftGradiantColor || "#ff8842"}80 100%)`;
123
- const serviceCardStyle = hasOfferText || hasDpEnabled
137
+ const serviceCardStyle = (hasOfferText && isNewUiEnabled) || hasDpEnabled
124
138
  ? {
125
139
  borderColor: "transparent",
126
140
  borderStyle: "solid",
@@ -243,13 +257,17 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
243
257
  },
244
258
  ];
245
259
  const otherItems = items.filter((i) => i.key !== "pet" && i.key !== "flexible" && !!i.condition);
246
- return (React.createElement(React.Fragment, null, isPeruSites ? (React.createElement(PeruServiceItemDesktop, { serviceItem: serviceItem, onBookButtonPress: onBookButtonPress, colors: colors, metaData: metaData, children: children, busStage: busStage, serviceDetailsLoading: serviceDetailsLoading, cityOrigin: cityOrigin, cityDestination: cityDestination, translation: translation, orignLabel: orignLabel, destinationLabel: destinationLabel, currencySign: currencySign, isCiva: isCiva, showRating: showRating, showLastSeats: showLastSeats, removeArrivalTime: removeArrivalTime, removeDuplicateSeats: removeDuplicateSeats, isPeruSites: isPeruSites, t: (key) => t(key), showAvailableSeats: showAvailableSeats, isSeatIcon: isSeatIcon, isPeru: isPeru, siteType: siteType, isAllinBus: isAllinBus, isFlores: isFlores })) : (React.createElement("div", { className: `relative hover:z-[150] ${hasOfferText || hasDpEnabled ? "mb-[55px]" : "mb-[10px]"} ${(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_direct_trip) ||
260
+ return (React.createElement(React.Fragment, null, isPeruSites ? (React.createElement(PeruServiceItemDesktop, { serviceItem: serviceItem, onBookButtonPress: onBookButtonPress, colors: colors, metaData: metaData, children: children, busStage: busStage, serviceDetailsLoading: serviceDetailsLoading, cityOrigin: cityOrigin, cityDestination: cityDestination, translation: translation, orignLabel: orignLabel, destinationLabel: destinationLabel, currencySign: currencySign, isCiva: isCiva, showRating: showRating, showLastSeats: showLastSeats, removeArrivalTime: removeArrivalTime, removeDuplicateSeats: removeDuplicateSeats, isPeruSites: isPeruSites, t: (key) => t(key), showAvailableSeats: showAvailableSeats, isSeatIcon: isSeatIcon, isPeru: isPeru, siteType: siteType, isAllinBus: isAllinBus, viewersConfig: viewersConfig, isLoggedIn: isLoggedIn, showLoginModal: showLoginModal, isExpand: isExpand, setIsExpand: setIsExpand, coachKey: coachKey, isFlores: isFlores, isNewUiEnabled: isNewUiEnabled, showLoginOption: showLoginOption })) : isNewUi ? (React.createElement(FeatureServiceUi, { serviceItem: serviceItem, showTopLabel: showTopLabel, isSoldOut: isSoldOut, getAnimationIcon: getAnimationIcon, cityOrigin: cityOrigin, cityDestination: cityDestination, renderIcon: renderIcon, viewersConfig: viewersConfig, isFeatureDropDownExpand: isFeatureDropDownExpand, ticketQuantity: ticketQuantity, onIncreaseTicketQuantity: onIncreaseTicketQuantity, onDecreaseTicketQuantity: onDecreaseTicketQuantity, onBookButtonPress: onRemateUiButtonClick, onToggleExpand: () => setIsFeatureDropDownExpand &&
261
+ setIsFeatureDropDownExpand(isFeatureDropDownExpand === serviceItem.id ||
262
+ isFeatureDropDownExpand === true
263
+ ? null
264
+ : serviceItem.id), selectedTimeSlot: selectedTimeSlot, onTimeSlotChange: onTimeSlotChange, isTimeDropdownOpen: isTimeDropdownOpen, onTimeDropdownToggle: onTimeDropdownToggle, wowDealData: wowDealData })) : (React.createElement("div", { className: `relative hover:z-[150] ${hasOfferText || hasDpEnabled ? "mb-[55px]" : "mb-[10px]"} ${(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_direct_trip) ||
247
265
  (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.train_type_label) === "Tren Express (Nuevo)" ||
248
266
  showTopLabel
249
267
  ? "mt-[24px]"
250
268
  : "mt-[20px]"} ` },
251
- ((serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) || hasDpEnabled) && !isSoldOut && (React.createElement(OfferBanner, { offerGradient: offerGradient, isSoldOut: isSoldOut, serviceItem: serviceItem, renderIcon: renderIcon, isLoggedIn: isLoggedIn, showLoginModal: showLoginModal, viewersConfig: viewersConfig, getAnimationIcon: getAnimationIcon, showLoginOption: showLoginOption })),
252
- React.createElement("div", { id: `service-card-${serviceItem.id}`, className: `bg-white mx-auto relative ${(hasOfferText || hasDpEnabled) && !isSoldOut
269
+ ((serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) || hasDpEnabled) && !isSoldOut && (React.createElement(OfferBanner, { offerGradient: offerGradient, isSoldOut: isSoldOut, serviceItem: serviceItem, renderIcon: renderIcon, isLoggedIn: isLoggedIn, showLoginModal: showLoginModal, viewersConfig: viewersConfig, getAnimationIcon: getAnimationIcon, showLoginOption: showLoginOption, isNewUiEnabled: isNewUiEnabled, colors: colors })),
270
+ React.createElement("div", { id: `service-card-${serviceItem.id}`, className: `bg-white mx-auto relative ${(hasOfferText && isNewUiEnabled && !isSoldOut) || hasDpEnabled
253
271
  ? "z-[3] rounded-[18px]"
254
272
  : "rounded-[10px] border border-[#ccc]"}`, style: serviceCardStyle },
255
273
  React.createElement("div", { className: " pt-[20px]", style: {
@@ -290,11 +308,9 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
290
308
  transition: "grid-template-rows 0.3s ease-in-out, opacity 0.25s ease-in-out",
291
309
  position: "relative",
292
310
  zIndex: hasOfferText || hasDpEnabled ? 0 : -1,
293
- // marginTop: isItemExpanded ? "" : "-6px",
311
+ marginTop: isItemExpanded ? "" : "-10px",
294
312
  } },
295
- React.createElement("div", { style: Object.assign({ overflow: "hidden", minHeight: 0, marginTop: isItemExpanded && !(hasDpEnabled || (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text))
296
- ? "-10px"
297
- : "" }, (hasOfferText || hasDpEnabled
313
+ React.createElement("div", { style: Object.assign({ overflow: "hidden", minHeight: 0, marginTop: hasDpEnabled || (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) ? "" : "-10px" }, (hasOfferText || hasDpEnabled
298
314
  ? {
299
315
  borderLeft: isSoldOut ? "" : "3px solid #ff5964",
300
316
  borderRight: isSoldOut ? "" : "3px solid #ff8842",
@@ -302,7 +318,7 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
302
318
  boxSizing: "border-box",
303
319
  }
304
320
  : {})) },
305
- React.createElement(ExpandedDropdown, { serviceItem: serviceItem, isPeru: isPeru, translation: translation, getAnimationIcon: getAnimationIcon, isChangeTicket: serviceItem.is_change_ticket === true, isSoldOut: isSoldOut, ladiesBookedSeats: serviceItem.ladies_booked_seats, isDpEnabled: serviceItem.is_dp_enabled, renderIcon: renderIcon, operatorLabel: operatorLabel })))),
321
+ React.createElement(ExpandedDropdown, { serviceItem: serviceItem, isPeru: isPeru, translation: translation, getAnimationIcon: getAnimationIcon, isChangeTicket: serviceItem.is_change_ticket === true, isSoldOut: isSoldOut, ladiesBookedSeats: serviceItem.ladies_booked_seats, isDpEnabled: serviceItem.is_dp_enabled, renderIcon: renderIcon })))),
306
322
  children,
307
323
  React.createElement(ServiceBadges, { showTopLabel: showTopLabel, isSoldOut: isSoldOut, colors: colors, renderIcon: renderIcon, translation: translation, serviceItem: serviceItem })))));
308
324
  }
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  import { MobileServiceItemProps } from "./mobileTypes";
3
- declare function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, orignLabel, destinationLabel, amenitiesData, setShowDropdown, showDropdown, isExpanded, setIsExpanded, setAmenetiesAtomValue, isCiva, currencySign, isPeru, showRating, showLastSeats, removeDuplicateSeats, isLinatal, viewersConfig, operatorLabel, }: MobileServiceItemProps): React.ReactElement;
3
+ declare function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, orignLabel, destinationLabel, amenitiesData, setShowDropdown, showDropdown, isExpanded, setIsExpanded, setAmenetiesAtomValue, isCiva, currencySign, isPeru, showRating, showLastSeats, removeDuplicateSeats, isLinatal, viewersConfig, isFeatureDropDownExpand, setIsFeatureDropDownExpand, ticketQuantity, onIncreaseTicketQuantity, onDecreaseTicketQuantity, cityOrigin, cityDestination, isNewUi, onRemateUiButtonClick, selectedTimeSlot, onTimeSlotChange, isTimeDropdownOpen, onTimeDropdownToggle, wowDealData, isFlores, }: MobileServiceItemProps): React.ReactElement;
4
4
  export default ServiceItemMobile;