@cleartrip/ct-design-header 1.2.0-SNAPSHOT-header-v0.9.0.0 → 1.2.0-SNAPSHOT-header-v0.10.0.0.0

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.
@@ -15,23 +15,27 @@ var SUPPORT_URL = '/support';
15
15
  var NAVBAR_OPTIONS = [{
16
16
  lefticon: ctDesignIcons.Offers,
17
17
  text: 'Offers',
18
+ ravenActionName: 'offers',
18
19
  isHoverable: false,
19
20
  isClickable: true,
20
21
  link: OFFERS_URL
21
22
  }, {
22
23
  lefticon: ctDesignIcons.BusinessBag,
23
24
  text: 'Business',
25
+ ravenActionName: 'business',
24
26
  rightIcon: ctDesignIcons.ChevronDown,
25
27
  isHoverable: true
26
28
  }, {
27
29
  lefticon: ctDesignIcons.MyTrips,
28
30
  text: 'My Trips',
31
+ ravenActionName: 'mytrips',
29
32
  isHoverable: false,
30
33
  isClickable: true,
31
34
  link: MY_TRIPS_URL
32
35
  }, {
33
36
  lefticon: ctDesignIcons.SupportIcon,
34
37
  text: 'Support',
38
+ ravenActionName: 'support',
35
39
  isHoverable: false,
36
40
  isClickable: true,
37
41
  link: SUPPORT_URL
@@ -45,33 +49,36 @@ var LOBS = {
45
49
  };
46
50
  var LOB_DATA = [{
47
51
  title: LOBS.FLIGHTS,
48
- image: 'https://rukmini-ct.flixcart.com/f_auto,w_48,h_48,dpr_2/offermgmt-prod/offermgmt/images/banner/flight_uhp.png?cache=true',
52
+ image: 'https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Flights.png?cache=true',
49
53
  link: '/flights'
50
54
  }, {
51
55
  title: LOBS.HOTELS,
52
- image: 'https://rukmini-ct.flixcart.com/f_auto,w_48,h_48,dpr_2/offermgmt-prod/offermgmt/images/banner/hotel_uhp.png?cache=true',
56
+ image: 'https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Hotels.png?cache=true',
53
57
  link: '/hotels'
54
58
  }, {
55
59
  title: LOBS.BUSES,
56
- image: 'https://rukmini-ct.flixcart.com/f_auto,w_40,h_40,dpr_2/offermgmt-prod/offermgmt/images/banner/bus_uhp.png?cache=true',
60
+ image: 'https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Buses.png?cache=true',
57
61
  link: '/bus'
58
62
  }, {
59
63
  title: LOBS.TRAIN,
60
- image: 'https://rukmini-ct.flixcart.com/f_auto,w_40,h_40,dpr_2/offermgmt-prod/offermgmt/images/banner/train_uhp.png?cache=true',
64
+ image: 'https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Trains.png?cache=true',
61
65
  link: '/pages/trains/appOnly'
62
66
  }, {
63
67
  title: LOBS.PACKAGES,
64
- image: 'https://rukmini-ct.flixcart.com/f_auto,w_40,h_40,dpr_2/offermgmt-prod/offermgmt/images/banner/holiday_uhp.png?cache=true',
68
+ image: 'https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Packages.png?cache=true',
65
69
  link: '/holidays'
66
70
  }];
67
71
  var bdConfig = [{
68
72
  title: 'AgentBox',
69
73
  subtitle: 'For travel agents',
70
- details: 'One-stop travel solution offering the best deals to our travel agency partners'
74
+ details: 'One-stop travel solution offering the best deals to our travel agency partners',
75
+ link: 'https://agency.cleartrip.com'
71
76
  }, {
72
77
  title: 'OutOfOffice',
73
78
  subtitle: 'For startups, corporates and SMEs',
74
- details: 'Manage corporate business travel, smartly'
79
+ details: 'Manage corporate business travel, smartly',
80
+ link: 'https://ooo.cleartrip.com/',
81
+ ravenActionName: 'ooo'
75
82
  }, {
76
83
  title: 'MICE',
77
84
  subtitle: 'For corporate events',
@@ -84,16 +91,35 @@ var bdConfig = [{
84
91
  link: 'https://business.cleartrip.com/api-customers/more-details'
85
92
  }];
86
93
  var BUSINESS_DROPDOWN_HEADING = 'Other business services';
87
- var RAVEN_PAGE_NAMES;
94
+ exports.RAVEN_PAGE_NAMES = void 0;
88
95
  (function (RAVEN_PAGE_NAMES) {
89
96
  RAVEN_PAGE_NAMES["UNIFIED_HOME"] = "unified_homepage";
90
- RAVEN_PAGE_NAMES["HOTELS_HOME"] = "hotels_homepage";
91
- RAVEN_PAGE_NAMES["FLIGHTS_HOME"] = "flights_homepage";
92
- })(RAVEN_PAGE_NAMES || (RAVEN_PAGE_NAMES = {}));
97
+ RAVEN_PAGE_NAMES["HOTELS_HOME"] = "hotel_home";
98
+ RAVEN_PAGE_NAMES["FLIGHTS_HOME"] = "flights_home";
99
+ })(exports.RAVEN_PAGE_NAMES || (exports.RAVEN_PAGE_NAMES = {}));
93
100
  var RAVEN_PLATFORMS;
94
101
  (function (RAVEN_PLATFORMS) {
95
102
  RAVEN_PLATFORMS["DESKTOP"] = "desktop";
96
103
  })(RAVEN_PLATFORMS || (RAVEN_PLATFORMS = {}));
104
+ var LOG_IN_TEXT = 'Log in';
105
+ var THEME_CONFIG = {
106
+ NOVAC: {
107
+ headerBackground: 'transparent',
108
+ hoverColor: '#FFB8A5',
109
+ logoFill: '#FFF',
110
+ fkcompanyColor: '#FFF',
111
+ typographyColor: '#FFF',
112
+ loginButtonColorVariant: ctDesignButton.ButtonColor.NEUTRAL
113
+ },
114
+ DEFAULT: {
115
+ headerBackground: '#F7FAFF',
116
+ hoverColor: '#FF4F17',
117
+ logoFill: '#FF4F17',
118
+ fkcompanyColor: '#1A1A1A',
119
+ typographyColor: '#1A1A1A',
120
+ loginButtonColorVariant: ctDesignButton.ButtonColor.PRIMARY
121
+ }
122
+ };
97
123
 
98
124
  var HeaderContext = react.createContext(undefined);
99
125
  var useHeaderContext = function () {
@@ -129,33 +155,33 @@ var LobsHeader = function () {
129
155
  }
130
156
  }, {
131
157
  children: LOB_DATA.map(function (item, index) {
158
+ var title = item.title,
159
+ link = item.link,
160
+ image = item.image;
132
161
  return jsxRuntime.jsxs(ctDesignContainer.Container, tslib.__assign({
133
162
  display: 'flex',
134
163
  alignItems: 'center',
135
164
  cursor: 'pointer',
136
165
  css: {
137
166
  gap: 8,
138
- background: selectedLOB === item.title ? '#FFFFFF' : 'transparent',
139
- borderRadius: selectedLOB === item.title ? '40px' : '0',
140
- padding: selectedLOB === item.title ? '8px 16px 8px 8px' : '0'
167
+ background: selectedLOB === title ? '#FFFFFF' : 'transparent',
168
+ borderRadius: selectedLOB === title ? '40px' : '0',
169
+ padding: selectedLOB === title ? '8px 16px 8px 8px' : '0'
141
170
  },
142
171
  onClick: function () {
143
- window.location.href = item.link;
172
+ window.location.href = link;
144
173
  }
145
174
  }, {
146
175
  children: [jsxRuntime.jsx("img", {
147
- src: item.image,
148
- alt: item.title,
176
+ src: image,
177
+ alt: title,
149
178
  width: 32,
150
179
  height: 32
151
180
  }), jsxRuntime.jsx(ctDesignTypography.Typography, tslib.__assign({
152
- variant: 'P1',
153
- style: {
154
- fontWeight: selectedLOB === item.title ? 600 : 500
155
- },
181
+ variant: selectedLOB === title ? ctDesignTypography.TypographyVariant.HM3 : ctDesignTypography.TypographyVariant.B1,
156
182
  isClickable: true
157
183
  }, {
158
- children: item.title
184
+ children: title
159
185
  }))]
160
186
  }), index);
161
187
  })
@@ -356,11 +382,85 @@ var useDropdownAnimation = function (isOpen) {
356
382
  };
357
383
  };
358
384
 
385
+ var stringifyPayload = function (payload) {
386
+ var keys = Object.keys(payload);
387
+ var numericValues = [];
388
+ keys.forEach(function (key) {
389
+ if (numericValues.includes(key)) {
390
+ payload[key] = Number(payload[key]);
391
+ } else {
392
+ payload[key] = '' + payload[key];
393
+ }
394
+ });
395
+ return payload;
396
+ };
397
+ var isServer = function () {
398
+ return typeof window === 'undefined' || !window;
399
+ };
400
+ var getQueryParam = function (queryParam) {
401
+ if (isServer()) {
402
+ return '';
403
+ }
404
+ var urlParams = new URLSearchParams(window.location.search);
405
+ return urlParams.get(queryParam);
406
+ };
407
+ var ravenLoyaltyTypes = function (loyaltyType) {
408
+ switch (loyaltyType) {
409
+ case 'FkVip':
410
+ return 'fk_vip';
411
+ case 'FkPremium':
412
+ return 'fk_plus_premium';
413
+ case 'InsiderIcon':
414
+ return 'myntra_insidericon';
415
+ case 'InsiderElite':
416
+ return 'myntra_insiderelite';
417
+ default:
418
+ return '';
419
+ }
420
+ };
421
+ var ravenSDKTrigger = function (isUserLoggedIn, eventName, ravenPayload, customRavenPayload, ravenPushCallback, pageName) {
422
+ var _a;
423
+ if (typeof ravenPushCallback !== 'function') {
424
+ console.error('ravenPushCallback is not provided or is not a function');
425
+ return;
426
+ }
427
+ var commonPayload = {
428
+ page_name: pageName,
429
+ platform: RAVEN_PLATFORMS.DESKTOP,
430
+ login_status: isUserLoggedIn ? 'yes' : 'no',
431
+ domain: (_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.host
432
+ };
433
+ var newRavenPayload = stringifyPayload(ravenPayload);
434
+ var parsedCustomRavenPayload = stringifyPayload(customRavenPayload);
435
+ var finalPayload = tslib.__assign(tslib.__assign(tslib.__assign({}, commonPayload), newRavenPayload), parsedCustomRavenPayload);
436
+ try {
437
+ if (ravenPushCallback.length === 1) {
438
+ ravenPushCallback({
439
+ eventName: eventName,
440
+ eventData: finalPayload
441
+ });
442
+ } else {
443
+ ravenPushCallback(eventName, finalPayload);
444
+ }
445
+ } catch (err) {
446
+ console.error(err);
447
+ return;
448
+ }
449
+ };
450
+
359
451
  var BusinessDropdownContent = function (_a) {
360
452
  var isOpen = _a.isOpen;
361
- var _b = react.useState(0),
362
- leftPosition = _b[0],
363
- setLeftPosition = _b[1];
453
+ var _b = useHeaderContext(),
454
+ isUserLoggedIn = _b.isUserLoggedIn,
455
+ ravenPushCallback = _b.ravenPushCallback,
456
+ ravenPageName = _b.ravenPageName,
457
+ ravenEventName = _b.ravenEventName,
458
+ loyaltyType = _b.loyaltyType,
459
+ _c = _b.ravenPayload,
460
+ ravenPayload = _c === void 0 ? {} : _c;
461
+ var _d = react.useState(0),
462
+ leftPosition = _d[0],
463
+ setLeftPosition = _d[1];
364
464
  var containerRef = useDropdownAnimation(isOpen).containerRef;
365
465
  react.useEffect(function () {
366
466
  var updatePosition = function () {
@@ -379,6 +479,21 @@ var BusinessDropdownContent = function (_a) {
379
479
  return window.removeEventListener('resize', updatePosition);
380
480
  };
381
481
  }, [containerRef, leftPosition]);
482
+ var handleBusinessDropdownClick = react.useCallback(function (link, title, ravenActionName) {
483
+ var _a;
484
+ var utmSource = (_a = getQueryParam('utm_source')) !== null && _a !== void 0 ? _a : 'organic';
485
+ var actionName = ravenActionName ? "".concat(ravenActionName, "_business_click") : title ? "".concat(title.toLowerCase(), "_business_click") : '';
486
+ var defaultPayload = {
487
+ action_name: actionName,
488
+ action_type: 'click',
489
+ u_utm_source: utmSource,
490
+ loyalty_type: ravenLoyaltyTypes(loyaltyType)
491
+ };
492
+ if (link) {
493
+ ravenSDKTrigger(isUserLoggedIn, ravenEventName, defaultPayload, ravenPayload, ravenPushCallback, ravenPageName);
494
+ window.location.href = link;
495
+ }
496
+ }, [isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName, loyaltyType]);
382
497
  return jsxRuntime.jsxs(ctDesignContainer.Container, tslib.__assign({
383
498
  ref: containerRef,
384
499
  backgroundColor: '#fff',
@@ -399,10 +514,7 @@ var BusinessDropdownContent = function (_a) {
399
514
  backgroundColor: '#FFF1EC'
400
515
  }, {
401
516
  children: jsxRuntime.jsx(ctDesignTypography.Typography, tslib.__assign({
402
- variant: 'HM2',
403
- css: {
404
- lineHeight: '24px'
405
- }
517
+ variant: 'HM2'
406
518
  }, {
407
519
  children: BUSINESS_DROPDOWN_HEADING
408
520
  }))
@@ -416,11 +528,16 @@ var BusinessDropdownContent = function (_a) {
416
528
  children: bdConfig.map(function (_a) {
417
529
  var title = _a.title,
418
530
  subtitle = _a.subtitle,
419
- details = _a.details;
531
+ details = _a.details,
532
+ link = _a.link,
533
+ ravenActionName = _a.ravenActionName;
420
534
  return jsxRuntime.jsxs(ctDesignContainer.Container, tslib.__assign({
421
535
  cursor: 'pointer',
422
536
  width: '200px',
423
- className: 'bd-hover-container'
537
+ className: 'bd-hover-container',
538
+ onClick: function () {
539
+ return handleBusinessDropdownClick(link, title, ravenActionName);
540
+ }
424
541
  }, {
425
542
  children: [jsxRuntime.jsxs(ctDesignContainer.Container, tslib.__assign({
426
543
  display: 'flex',
@@ -519,6 +636,7 @@ var ACCOUNT_OPTIONS_POPUP_CONFIG = [{
519
636
  redirectionLink: 'accounts/personal-data-dashboard'
520
637
  }];
521
638
  var SIGN_OUT_TEXT = 'Logout';
639
+ var MY_ACCOUNT_TEXT = 'My Account';
522
640
  var LOGGEDIN_USER_TEXT = 'You are logged in with';
523
641
  var HEADER_ACCOUNTS_OPTIONS_OPEN_BTN_ID = 'header-acc-btn';
524
642
  var ACCOUNT_OPTIONS_CONTAINER_ID = 'account-options';
@@ -530,13 +648,33 @@ var LoyaltyChip = function (_a) {
530
648
  backgroundGradient = _a.backgroundGradient,
531
649
  handleChipClick = _a.handleChipClick,
532
650
  chevronFillColor = _a.chevronFillColor;
533
- var _b = react.useState(false),
534
- isHovered = _b[0],
535
- setIsHovered = _b[1];
536
- var handleClick = function () {
537
- window.location.href = '/';
538
- handleChipClick && handleChipClick();
539
- };
651
+ var _b = useHeaderContext(),
652
+ loyaltyType = _b.loyaltyType,
653
+ isUserLoggedIn = _b.isUserLoggedIn,
654
+ ravenPushCallback = _b.ravenPushCallback,
655
+ ravenPageName = _b.ravenPageName,
656
+ _c = _b.ravenPayload,
657
+ ravenPayload = _c === void 0 ? {} : _c,
658
+ ravenEventName = _b.ravenEventName;
659
+ var _d = react.useState(false),
660
+ isHovered = _d[0],
661
+ setIsHovered = _d[1];
662
+ var handleClick = react.useCallback(function () {
663
+ var _a;
664
+ if (handleChipClick) {
665
+ handleChipClick();
666
+ } else {
667
+ var utmSource = (_a = getQueryParam('utm_source')) !== null && _a !== void 0 ? _a : 'organic';
668
+ var defaultPayload = {
669
+ action_name: "loyalty_account_click",
670
+ action_type: 'click',
671
+ u_utm_source: utmSource,
672
+ loyaltyType: ravenLoyaltyTypes(loyaltyType)
673
+ };
674
+ ravenSDKTrigger(isUserLoggedIn, ravenEventName, defaultPayload, ravenPayload, ravenPushCallback, ravenPageName);
675
+ window.location.href = '/all-offers/loyalty-october';
676
+ }
677
+ }, [handleChipClick, loyaltyType, isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName]);
540
678
  return jsxRuntime.jsxs(ctDesignContainer.Container, tslib.__assign({
541
679
  display: 'flex',
542
680
  position: 'relative',
@@ -561,7 +699,7 @@ var LoyaltyChip = function (_a) {
561
699
  onClick: handleClick
562
700
  }, {
563
701
  children: [jsxRuntime.jsx(ctDesignContainer.Container, {
564
- style: {
702
+ css: {
565
703
  content: '""',
566
704
  position: 'absolute',
567
705
  inset: 0,
@@ -570,7 +708,7 @@ var LoyaltyChip = function (_a) {
570
708
  zIndex: -2
571
709
  }
572
710
  }), jsxRuntime.jsx(ctDesignContainer.Container, {
573
- style: {
711
+ css: {
574
712
  content: '""',
575
713
  position: 'absolute',
576
714
  inset: 0,
@@ -591,7 +729,7 @@ var LoyaltyChip = function (_a) {
591
729
  })), jsxRuntime.jsx(ctDesignContainer.Container, tslib.__assign({
592
730
  display: 'flex',
593
731
  alignItems: 'center',
594
- style: {
732
+ css: {
595
733
  overflow: 'hidden',
596
734
  maxWidth: isHovered ? 16 : 0,
597
735
  transition: 'max-width 0.2s ease-in-out, opacity 0.2s ease-in-out',
@@ -656,24 +794,46 @@ var ExpandableItem = function (_a) {
656
794
  handleChipClick = _a.handleChipClick,
657
795
  value = _a.value,
658
796
  type = _a.type;
659
- var _b = react.useState(false),
660
- isHovered = _b[0],
661
- setIsHovered = _b[1];
662
- var handleDefaultClick = function () {
663
- if (type === 'supercoins') {
664
- window.location.href = '/supercoins';
665
- } else if (type === 'wallet') {
666
- window.location.href = '/wallet';
797
+ var _b = useHeaderContext(),
798
+ loyaltyType = _b.loyaltyType,
799
+ isUserLoggedIn = _b.isUserLoggedIn,
800
+ ravenPushCallback = _b.ravenPushCallback,
801
+ ravenPageName = _b.ravenPageName,
802
+ ravenEventName = _b.ravenEventName,
803
+ _c = _b.ravenPayload,
804
+ ravenPayload = _c === void 0 ? {} : _c;
805
+ var _d = react.useState(false),
806
+ isHovered = _d[0],
807
+ setIsHovered = _d[1];
808
+ var handleDefaultClick = react.useCallback(function () {
809
+ var _a;
810
+ if (handleChipClick) {
811
+ handleChipClick();
812
+ } else {
813
+ var utmSource = (_a = getQueryParam('utm_source')) !== null && _a !== void 0 ? _a : 'organic';
814
+ var defaultPayload = {
815
+ action_name: "".concat(type, "_account_click"),
816
+ action_type: 'click',
817
+ u_utm_source: utmSource,
818
+ loyaltyType: ravenLoyaltyTypes(loyaltyType)
819
+ };
820
+ ravenSDKTrigger(isUserLoggedIn, ravenEventName, defaultPayload, ravenPayload, ravenPushCallback, ravenPageName);
821
+ var redirectUrls = {
822
+ supercoin: '/all-offers/supercoins/',
823
+ wallet: '/accounts/wallet'
824
+ };
825
+ if (redirectUrls[type]) {
826
+ window.location.href = redirectUrls[type];
827
+ }
667
828
  }
668
- handleChipClick && handleChipClick();
669
- };
829
+ }, [handleChipClick, type, loyaltyType, isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName]);
670
830
  return jsxRuntime.jsxs(ctDesignContainer.Container, tslib.__assign({
671
831
  display: 'flex',
672
832
  alignItems: 'center',
673
833
  justifyContent: 'center',
674
834
  borderRadius: '8px',
675
835
  cursor: 'pointer',
676
- style: {
836
+ css: {
677
837
  height: 32,
678
838
  paddingLeft: 8,
679
839
  paddingRight: isHovered ? 4 : 8,
@@ -704,7 +864,7 @@ var ExpandableItem = function (_a) {
704
864
  })), jsxRuntime.jsx(ctDesignContainer.Container, tslib.__assign({
705
865
  display: 'flex',
706
866
  alignItems: 'center',
707
- style: {
867
+ css: {
708
868
  overflow: 'hidden',
709
869
  maxWidth: isHovered ? 16 : 0,
710
870
  transition: 'max-width 0.2s ease-in-out, opacity 0.2s ease-in-out',
@@ -732,6 +892,12 @@ var RewardsSection = function () {
732
892
  hideWalletChip = _b.hideWalletChip,
733
893
  hideSupercoinsChip = _b.hideSupercoinsChip,
734
894
  hideLoyaltyChip = _b.hideLoyaltyChip;
895
+ var shouldShowLoyalty = loyaltyLoading || selectedLoyaltyType && LOYALTY_DATA[selectedLoyaltyType] && !hideLoyaltyChip;
896
+ var shouldShowSupercoin = superCoinsLoading || !hideSupercoinsChip;
897
+ var shouldShowWallet = walletLoading || !hideWalletChip;
898
+ if (!shouldShowLoyalty && !shouldShowSupercoin && !shouldShowWallet) {
899
+ return null;
900
+ }
735
901
  return jsxRuntime.jsxs(ctDesignContainer.Container, tslib.__assign({
736
902
  display: 'flex',
737
903
  padding: '0 16px 16px 16px',
@@ -764,7 +930,7 @@ var RewardsSection = function () {
764
930
  }),
765
931
  value: superCoinBalance,
766
932
  handleChipClick: supercoinsChipClick,
767
- type: 'supercoins'
933
+ type: 'supercoin'
768
934
  }), walletLoading ? jsxRuntime.jsx(ctDesignContainer.Container, {
769
935
  width: '50px',
770
936
  height: '32px',
@@ -789,34 +955,51 @@ var AccountDropdownContent = function (_a) {
789
955
  userName = _b.userName,
790
956
  userMobileNumber = _b.userMobileNumber,
791
957
  countryCode = _b.countryCode,
792
- userDetailsLoading = _b.userDetailsLoading;
958
+ userDetailsLoading = _b.userDetailsLoading,
959
+ loyaltyType = _b.loyaltyType,
960
+ isUserLoggedIn = _b.isUserLoggedIn,
961
+ ravenEventName = _b.ravenEventName,
962
+ ravenPageName = _b.ravenPageName,
963
+ _c = _b.ravenPayload,
964
+ ravenPayload = _c === void 0 ? {} : _c,
965
+ ravenPushCallback = _b.ravenPushCallback;
793
966
  var containerRef = useDropdownAnimation(isOpen).containerRef;
794
- var _c = react.useMemo(function () {
795
- var userGreeting = userName && "Hello ".concat(userName, "!");
796
- var phoneNumber = countryCode && userMobileNumber ? "".concat(countryCode, " ").concat(userMobileNumber) : '';
967
+ var _d = react.useMemo(function () {
797
968
  return {
798
- userGreeting: userGreeting,
799
- phoneNumber: phoneNumber
969
+ userGreeting: userName ? "Hello ".concat(userName, "!") : '',
970
+ phoneNumber: countryCode && userMobileNumber ? "".concat(countryCode, " ").concat(userMobileNumber) : ''
800
971
  };
801
972
  }, [userName, userMobileNumber, countryCode]),
802
- userGreeting = _c.userGreeting,
803
- phoneNumber = _c.phoneNumber;
804
- var handleRedirectClick = function (redirectLink) {
805
- return function () {
806
- window.location.href = redirectLink;
973
+ userGreeting = _d.userGreeting,
974
+ phoneNumber = _d.phoneNumber;
975
+ var generateRavenPayload = function (actionName) {
976
+ var _a;
977
+ return {
978
+ action_name: actionName.toLowerCase().replace(/[\s-]/g, '') + '_account_click',
979
+ action_type: 'click',
980
+ u_utm_source: (_a = getQueryParam('utm_source')) !== null && _a !== void 0 ? _a : 'organic',
981
+ loyalty_type: ravenLoyaltyTypes(loyaltyType)
807
982
  };
808
983
  };
809
- react.useEffect(function () {
984
+ var handleAccountOptionsClick = react.useCallback(function (text, redirectLink) {
985
+ ravenSDKTrigger(isUserLoggedIn, ravenEventName, generateRavenPayload(text), ravenPayload, ravenPushCallback, ravenPageName);
986
+ window.location.href = redirectLink;
987
+ }, [isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName]);
988
+ react.useCallback(function () {
989
+ ravenSDKTrigger(isUserLoggedIn, ravenEventName, generateRavenPayload(SIGN_OUT_TEXT), ravenPayload, ravenPushCallback, ravenPageName);
990
+ handleLogoutClick();
991
+ }, [isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName, handleLogoutClick]);
992
+ var positionAccountOptionsDiv = react.useCallback(function () {
810
993
  var headerAccBtn = document.getElementById(HEADER_ACCOUNTS_OPTIONS_OPEN_BTN_ID);
811
994
  var accountOptionsElem = document.getElementById(ACCOUNT_OPTIONS_CONTAINER_ID);
812
- var positionAccountOptionsDiv = function () {
813
- var headerBtnRight = headerAccBtn === null || headerAccBtn === void 0 ? void 0 : headerAccBtn.getBoundingClientRect().right;
814
- if (accountOptionsElem && headerBtnRight) {
815
- accountOptionsElem.style.left = "".concat(headerBtnRight - ACCOUNT_OPTIONS_CONTAINER_WIDTH, "px");
816
- }
817
- };
818
- positionAccountOptionsDiv();
995
+ if (headerAccBtn && accountOptionsElem) {
996
+ var headerBtnRight = headerAccBtn.getBoundingClientRect().right;
997
+ accountOptionsElem.style.left = "".concat(headerBtnRight - ACCOUNT_OPTIONS_CONTAINER_WIDTH, "px");
998
+ }
819
999
  }, []);
1000
+ react.useEffect(function () {
1001
+ positionAccountOptionsDiv();
1002
+ }, [positionAccountOptionsDiv]);
820
1003
  var renderUserData = function () {
821
1004
  var renderContent = function (loading, content, variant, color) {
822
1005
  return jsxRuntime.jsx(ctDesignTypography.Typography, tslib.__assign({
@@ -863,7 +1046,7 @@ var AccountDropdownContent = function (_a) {
863
1046
  }, {
864
1047
  children: [jsxRuntime.jsx(ctDesignContainer.Container, tslib.__assign({
865
1048
  padding: '16px',
866
- height: '72px'
1049
+ height: '76px'
867
1050
  }, {
868
1051
  children: renderUserData()
869
1052
  })), jsxRuntime.jsx(RewardsSection, {}), jsxRuntime.jsxs(ctDesignContainer.Container, tslib.__assign({
@@ -872,7 +1055,7 @@ var AccountDropdownContent = function (_a) {
872
1055
  padding: '8px',
873
1056
  backgroundColor: 'white',
874
1057
  rowGap: '8px',
875
- style: {
1058
+ css: {
876
1059
  borderBottomLeftRadius: 12,
877
1060
  borderBottomRightRadius: 12
878
1061
  }
@@ -886,12 +1069,14 @@ var AccountDropdownContent = function (_a) {
886
1069
  padding: '8px',
887
1070
  borderRadius: '8px',
888
1071
  cursor: 'pointer',
889
- onClick: handleRedirectClick(redirectionLink)
1072
+ onClick: function () {
1073
+ return handleAccountOptionsClick(text, redirectionLink);
1074
+ }
890
1075
  }, {
891
1076
  children: jsxRuntime.jsxs(ctDesignContainer.Container, tslib.__assign({
892
1077
  display: 'flex',
893
1078
  cursor: 'pointer',
894
- style: {
1079
+ css: {
895
1080
  columnGap: '8px'
896
1081
  }
897
1082
  }, {
@@ -908,7 +1093,7 @@ var AccountDropdownContent = function (_a) {
908
1093
  }))
909
1094
  }), "account-option-".concat(text));
910
1095
  }), jsxRuntime.jsx(ctDesignDivider.Divider, {
911
- style: {
1096
+ css: {
912
1097
  borderBottom: '1px dashed #E6E6E6'
913
1098
  }
914
1099
  }), jsxRuntime.jsxs(ctDesignContainer.Container, tslib.__assign({
@@ -939,18 +1124,26 @@ var AccountDropdownContent = function (_a) {
939
1124
  };
940
1125
 
941
1126
  var UserAccount = function () {
942
- var isNovacThemeEnabled = useHeaderContext().isNovacThemeEnabled;
943
- var _a = useHoverDropdown({
1127
+ var _a = useHeaderContext(),
1128
+ isNovacThemeEnabled = _a.isNovacThemeEnabled,
1129
+ ravenEventName = _a.ravenEventName,
1130
+ _b = _a.ravenPayload,
1131
+ ravenPayload = _b === void 0 ? {} : _b,
1132
+ ravenPushCallback = _a.ravenPushCallback,
1133
+ isUserLoggedIn = _a.isUserLoggedIn,
1134
+ loyaltyType = _a.loyaltyType,
1135
+ ravenPageName = _a.ravenPageName;
1136
+ var _c = useHoverDropdown({
944
1137
  openDelay: 0
945
1138
  }),
946
- isDropdownVisible = _a.isDropdownVisible,
947
- handleOnMouseEnter = _a.handleOnMouseEnter,
948
- handleOnMouseLeave = _a.handleOnMouseLeave,
949
- handleDropdownMouseEnter = _a.handleDropdownMouseEnter,
950
- handleDropdownMouseLeave = _a.handleDropdownMouseLeave;
951
- var _b = react.useState(false),
952
- scrolled = _b[0],
953
- setScrolled = _b[1];
1139
+ isDropdownVisible = _c.isDropdownVisible,
1140
+ handleOnMouseEnter = _c.handleOnMouseEnter,
1141
+ handleOnMouseLeave = _c.handleOnMouseLeave,
1142
+ handleDropdownMouseEnter = _c.handleDropdownMouseEnter,
1143
+ handleDropdownMouseLeave = _c.handleDropdownMouseLeave;
1144
+ var _d = react.useState(false),
1145
+ scrolled = _d[0],
1146
+ setScrolled = _d[1];
954
1147
  react.useEffect(function () {
955
1148
  var handleScroll = function () {
956
1149
  setScrolled(window.scrollY >= 100);
@@ -960,8 +1153,20 @@ var UserAccount = function () {
960
1153
  return window.removeEventListener('scroll', handleScroll);
961
1154
  };
962
1155
  }, []);
963
- var effectiveNovacThemeEnabled = isNovacThemeEnabled && !scrolled;
964
- var hoverColor = effectiveNovacThemeEnabled ? '#FFB8A5' : '#FF4F17';
1156
+ var theme = isNovacThemeEnabled && !scrolled ? THEME_CONFIG.NOVAC : THEME_CONFIG.DEFAULT;
1157
+ var hoverColor = theme.hoverColor,
1158
+ typographyColor = theme.typographyColor;
1159
+ var triggerRavenEventOnHover = react.useCallback(function () {
1160
+ var _a;
1161
+ var utmSource = (_a = getQueryParam('utm_source')) !== null && _a !== void 0 ? _a : 'organic';
1162
+ var defaultPayload = {
1163
+ action_name: "".concat(MY_ACCOUNT_TEXT.toLowerCase().replace(/[\s-]/g, ''), "_header_hover"),
1164
+ action_type: 'hover',
1165
+ u_utm_source: utmSource,
1166
+ loyalty_type: ravenLoyaltyTypes(loyaltyType)
1167
+ };
1168
+ ravenSDKTrigger(isUserLoggedIn, ravenEventName, defaultPayload, ravenPayload, ravenPushCallback, ravenPageName);
1169
+ }, [isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName, loyaltyType]);
965
1170
  return jsxRuntime.jsxs(ctDesignContainer.Container, {
966
1171
  children: [jsxRuntime.jsxs(ctDesignContainer.Container, tslib.__assign({
967
1172
  display: 'flex',
@@ -970,18 +1175,19 @@ var UserAccount = function () {
970
1175
  borderRadius: '12px',
971
1176
  height: '100%',
972
1177
  cursor: 'pointer',
973
- style: {
1178
+ css: {
974
1179
  columnGap: 8,
975
1180
  height: 64
976
1181
  },
977
1182
  onMouseEnter: function () {
978
- return handleOnMouseEnter(0);
1183
+ handleOnMouseEnter(0);
1184
+ triggerRavenEventOnHover();
979
1185
  },
980
1186
  onMouseLeave: handleOnMouseLeave,
981
1187
  id: HEADER_ACCOUNTS_OPTIONS_OPEN_BTN_ID
982
1188
  }, {
983
1189
  children: [jsxRuntime.jsx(ctDesignIcons.MyAccount, {
984
- color: isDropdownVisible ? hoverColor : effectiveNovacThemeEnabled ? '#FFF' : '#1A1A1A'
1190
+ color: isDropdownVisible ? hoverColor : typographyColor
985
1191
  }), jsxRuntime.jsxs(ctDesignContainer.Container, tslib.__assign({
986
1192
  display: 'flex',
987
1193
  flexDirection: 'row',
@@ -992,13 +1198,13 @@ var UserAccount = function () {
992
1198
  css: {
993
1199
  cursor: 'pointer'
994
1200
  },
995
- colorCode: isDropdownVisible ? hoverColor : effectiveNovacThemeEnabled ? '#FFF' : '#1A1A1A'
1201
+ colorCode: isDropdownVisible ? hoverColor : typographyColor
996
1202
  }, {
997
- children: "My Account"
1203
+ children: MY_ACCOUNT_TEXT
998
1204
  })), jsxRuntime.jsx(ctDesignIcons.ChevronDown, {
999
1205
  width: 20,
1000
1206
  height: 20,
1001
- fill: isDropdownVisible ? hoverColor : effectiveNovacThemeEnabled ? '#FFF' : '#1A1A1A'
1207
+ fill: isDropdownVisible ? hoverColor : typographyColor
1002
1208
  })]
1003
1209
  }))]
1004
1210
  })), jsxRuntime.jsx(HeaderAnimatedMask, tslib.__assign({
@@ -1023,21 +1229,23 @@ var Header = function (props) {
1023
1229
  }));
1024
1230
  };
1025
1231
  var HeaderContent = function () {
1026
- var _a = useHeaderContext(),
1027
- onLoginButtonClick = _a.onLoginButtonClick,
1028
- _b = _a.showAllLobs,
1029
- showAllLobs = _b === void 0 ? false : _b,
1030
- isUserLoggedIn = _a.isUserLoggedIn;
1031
- _a.loyaltyType;
1032
- var _c = _a.isNovacThemeEnabled,
1033
- isNovacThemeEnabled = _c === void 0 ? false : _c;
1034
- _a.ravenPayload;
1035
- _a.ravenPushCallback;
1036
- _a.ravenPageName;
1037
- _a.ravenEventName;
1038
- var _e = react.useState(false),
1039
- scrolled = _e[0],
1040
- setScrolled = _e[1];
1232
+ var _a;
1233
+ var _b = useHeaderContext(),
1234
+ onLoginButtonClick = _b.onLoginButtonClick,
1235
+ _c = _b.showAllLobs,
1236
+ showAllLobs = _c === void 0 ? false : _c,
1237
+ isUserLoggedIn = _b.isUserLoggedIn,
1238
+ loyaltyType = _b.loyaltyType,
1239
+ _d = _b.isNovacThemeEnabled,
1240
+ isNovacThemeEnabled = _d === void 0 ? false : _d,
1241
+ _e = _b.ravenPayload,
1242
+ ravenPayload = _e === void 0 ? {} : _e,
1243
+ ravenPushCallback = _b.ravenPushCallback,
1244
+ ravenPageName = _b.ravenPageName,
1245
+ ravenEventName = _b.ravenEventName;
1246
+ var _f = react.useState(false),
1247
+ scrolled = _f[0],
1248
+ setScrolled = _f[1];
1041
1249
  react.useEffect(function () {
1042
1250
  var handleScroll = function () {
1043
1251
  setScrolled(window.scrollY >= 100);
@@ -1047,18 +1255,49 @@ var HeaderContent = function () {
1047
1255
  return window.removeEventListener('scroll', handleScroll);
1048
1256
  };
1049
1257
  }, []);
1050
- var effectiveNovacThemeEnabled = isNovacThemeEnabled && !scrolled;
1051
- var headerBackground = effectiveNovacThemeEnabled ? 'transparent' : '#F7FAFF';
1052
- var hoverColor = effectiveNovacThemeEnabled ? '#FFB8A5' : '#FF4F17';
1053
- var _f = useHoverDropdown({
1258
+ var theme = isNovacThemeEnabled && !scrolled ? THEME_CONFIG.NOVAC : THEME_CONFIG.DEFAULT;
1259
+ var headerBackground = theme.headerBackground,
1260
+ logoFill = theme.logoFill,
1261
+ loginButtonColorVariant = theme.loginButtonColorVariant,
1262
+ hoverColor = theme.hoverColor,
1263
+ fkcompanyColor = theme.fkcompanyColor,
1264
+ typographyColor = theme.typographyColor;
1265
+ var _g = useHoverDropdown({
1054
1266
  openDelay: 0
1055
1267
  }),
1056
- isDropdownVisible = _f.isDropdownVisible,
1057
- hoveredElemIndex = _f.hoveredElemIndex,
1058
- handleOnMouseEnter = _f.handleOnMouseEnter,
1059
- handleOnMouseLeave = _f.handleOnMouseLeave,
1060
- handleDropdownMouseEnter = _f.handleDropdownMouseEnter,
1061
- handleDropdownMouseLeave = _f.handleDropdownMouseLeave;
1268
+ isDropdownVisible = _g.isDropdownVisible,
1269
+ hoveredElemIndex = _g.hoveredElemIndex,
1270
+ handleOnMouseEnter = _g.handleOnMouseEnter,
1271
+ handleOnMouseLeave = _g.handleOnMouseLeave,
1272
+ handleDropdownMouseEnter = _g.handleDropdownMouseEnter,
1273
+ handleDropdownMouseLeave = _g.handleDropdownMouseLeave;
1274
+ var utmSource = (_a = getQueryParam('utm_source')) !== null && _a !== void 0 ? _a : 'organic';
1275
+ var createPayload = react.useCallback(function (actionName, actionType) {
1276
+ return {
1277
+ action_name: actionName,
1278
+ action_type: actionType,
1279
+ u_utm_source: utmSource,
1280
+ loyalty_type: ravenLoyaltyTypes(loyaltyType)
1281
+ };
1282
+ }, [utmSource, loyaltyType]);
1283
+ var handleNavbarOptionsClick = react.useCallback(function (option) {
1284
+ if (option.isClickable && option.link) {
1285
+ var actionName = "".concat(option.text.toLowerCase().replace(/\s/g, ''), "_header_click");
1286
+ var payload = createPayload(actionName, 'click');
1287
+ ravenSDKTrigger(isUserLoggedIn, ravenEventName, payload, ravenPayload, ravenPushCallback, ravenPageName);
1288
+ window.location.href = option.link;
1289
+ }
1290
+ }, [createPayload, isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName]);
1291
+ var handleHomeClick = react.useCallback(function () {
1292
+ var payload = createPayload('home_header_click', 'click');
1293
+ ravenSDKTrigger(isUserLoggedIn, ravenEventName, payload, ravenPayload, ravenPushCallback, ravenPageName);
1294
+ window.location.href = '/';
1295
+ }, [createPayload, isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName]);
1296
+ var triggerRavenEventOnHover = react.useCallback(function (option) {
1297
+ var actionName = "".concat(option.text.toLowerCase().replace(/\s/g, ''), "_header_hover");
1298
+ var payload = createPayload(actionName, 'hover');
1299
+ ravenSDKTrigger(isUserLoggedIn, ravenEventName, payload, ravenPayload, ravenPushCallback, ravenPageName);
1300
+ }, [createPayload, isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName]);
1062
1301
  return jsxRuntime.jsxs(jsxRuntime.Fragment, {
1063
1302
  children: [jsxRuntime.jsx(ctDesignContainer.Container, tslib.__assign({
1064
1303
  display: 'flex',
@@ -1073,7 +1312,7 @@ var HeaderContent = function () {
1073
1312
  css: {
1074
1313
  gap: '24px',
1075
1314
  flexShrink: 0,
1076
- borderBottom: effectiveNovacThemeEnabled ? '' : '1px solid #E6E6E6',
1315
+ borderBottom: headerBackground === 'transparent' ? '' : '1px solid #E6E6E6',
1077
1316
  transition: 'background-color 0.3s ease-in-out, border-bottom 0.3s ease-in-out'
1078
1317
  }
1079
1318
  }, {
@@ -1083,7 +1322,7 @@ var HeaderContent = function () {
1083
1322
  justifyContent: 'space-between',
1084
1323
  padding: '0 28px',
1085
1324
  flex: 1,
1086
- style: {
1325
+ css: {
1087
1326
  gap: '24px',
1088
1327
  maxWidth: 1440
1089
1328
  }
@@ -1094,13 +1333,10 @@ var HeaderContent = function () {
1094
1333
  alignItems: 'center',
1095
1334
  justifyContent: 'center',
1096
1335
  cursor: 'pointer',
1097
- paddingLeft: '16px',
1098
- onClick: function () {
1099
- window.location.href = '/';
1100
- }
1336
+ onClick: handleHomeClick
1101
1337
  }, {
1102
1338
  children: [jsxRuntime.jsx(ctDesignIcons.CTLogo, {
1103
- fillColor: effectiveNovacThemeEnabled ? '#FFF' : '#FF4F17'
1339
+ fillColor: logoFill
1104
1340
  }), jsxRuntime.jsx(ctDesignDivider.Divider, {
1105
1341
  css: {
1106
1342
  width: 12,
@@ -1110,7 +1346,7 @@ var HeaderContent = function () {
1110
1346
  borderBottom: '1px solid #e0e0e0'
1111
1347
  }
1112
1348
  }), jsxRuntime.jsx(ctDesignIcons.Fkcompany, {
1113
- color: effectiveNovacThemeEnabled ? '#FFF' : '#1A1A1A'
1349
+ color: fkcompanyColor
1114
1350
  })]
1115
1351
  })), jsxRuntime.jsxs(ctDesignContainer.Container, tslib.__assign({
1116
1352
  display: 'flex',
@@ -1127,11 +1363,18 @@ var HeaderContent = function () {
1127
1363
  columnGap: '4px'
1128
1364
  }, {
1129
1365
  children: NAVBAR_OPTIONS.map(function (option, index) {
1366
+ var text = option.text,
1367
+ LeftIcon = option.lefticon,
1368
+ RightIcon = option.rightIcon,
1369
+ isHoverable = option.isHoverable;
1130
1370
  var isHovered = hoveredElemIndex === index;
1131
1371
  return jsxRuntime.jsxs(ctDesignContainer.Container, {
1132
1372
  children: [jsxRuntime.jsxs(ctDesignContainer.Container, tslib.__assign({
1133
1373
  onMouseEnter: function () {
1134
- return handleOnMouseEnter(index);
1374
+ handleOnMouseEnter(index);
1375
+ if (option.isHoverable) {
1376
+ triggerRavenEventOnHover(option);
1377
+ }
1135
1378
  },
1136
1379
  onMouseLeave: handleOnMouseLeave,
1137
1380
  display: 'flex',
@@ -1143,13 +1386,11 @@ var HeaderContent = function () {
1143
1386
  columnGap: 8,
1144
1387
  height: '64px',
1145
1388
  onClick: function () {
1146
- if (option.link && option.isClickable) {
1147
- window.location.href = option.link;
1148
- }
1389
+ return handleNavbarOptionsClick(option);
1149
1390
  }
1150
1391
  }, {
1151
- children: [jsxRuntime.jsx(option.lefticon, {
1152
- color: isHovered ? hoverColor : effectiveNovacThemeEnabled ? '#FFF' : '#1A1A1A'
1392
+ children: [jsxRuntime.jsx(LeftIcon, {
1393
+ color: isHovered ? hoverColor : typographyColor
1153
1394
  }), jsxRuntime.jsxs(ctDesignContainer.Container, tslib.__assign({
1154
1395
  display: 'flex',
1155
1396
  flexDirection: 'row',
@@ -1157,31 +1398,31 @@ var HeaderContent = function () {
1157
1398
  }, {
1158
1399
  children: [jsxRuntime.jsx(ctDesignTypography.Typography, tslib.__assign({
1159
1400
  variant: 'B2',
1160
- colorCode: isHovered ? hoverColor : effectiveNovacThemeEnabled ? '#FFF' : '#1A1A1A',
1401
+ colorCode: isHovered ? hoverColor : typographyColor,
1161
1402
  isClickable: true
1162
1403
  }, {
1163
- children: option.text
1164
- })), option.rightIcon && jsxRuntime.jsx(option.rightIcon, {
1404
+ children: text
1405
+ })), RightIcon && jsxRuntime.jsx(RightIcon, {
1165
1406
  width: 20,
1166
1407
  height: 20,
1167
- fill: isHovered ? hoverColor : effectiveNovacThemeEnabled ? '#FFF' : '#1A1A1A'
1408
+ fill: isHovered ? hoverColor : typographyColor
1168
1409
  })]
1169
1410
  }))]
1170
1411
  }), "nav-option-".concat(index)), jsxRuntime.jsx(HeaderAnimatedMask, tslib.__assign({
1171
- show: hoveredElemIndex === index && option.isHoverable && isDropdownVisible,
1412
+ show: hoveredElemIndex === index && isHoverable && isDropdownVisible,
1172
1413
  marginTop: '64px',
1173
1414
  handleDropdownMouseEnter: handleDropdownMouseEnter,
1174
1415
  handleDropdownMouseLeave: handleDropdownMouseLeave,
1175
1416
  onMaskClick: handleDropdownMouseLeave
1176
1417
  }, {
1177
1418
  children: jsxRuntime.jsx(BusinessDropdownContent, {
1178
- isOpen: hoveredElemIndex === index && option.isHoverable && isDropdownVisible
1419
+ isOpen: hoveredElemIndex === index && isHoverable && isDropdownVisible
1179
1420
  })
1180
1421
  }))]
1181
1422
  });
1182
1423
  })
1183
1424
  })), isUserLoggedIn && jsxRuntime.jsx(ctDesignDivider.Divider, {
1184
- style: {
1425
+ css: {
1185
1426
  width: 12,
1186
1427
  margin: '0 -18px',
1187
1428
  transform: 'rotate(90deg)',
@@ -1195,21 +1436,22 @@ var HeaderContent = function () {
1195
1436
  }, {
1196
1437
  children: jsxRuntime.jsx(UserAccount, {})
1197
1438
  })) : jsxRuntime.jsx(ctDesignButton.Button, tslib.__assign({
1198
- className: "fw-400 fs-14 ".concat(effectiveNovacThemeEnabled ? 'novac-login-button' : 'login-button'),
1439
+ variant: 'outline',
1440
+ color: loginButtonColorVariant,
1441
+ className: "".concat(headerBackground === 'transparent' ? 'novac-login-button' : 'login-button'),
1199
1442
  onClick: onLoginButtonClick,
1200
- style: {
1443
+ css: {
1201
1444
  width: 153,
1202
- height: 40,
1203
- border: effectiveNovacThemeEnabled ? '1px solid #FFF' : '1px solid #1A1A1A'
1445
+ height: 40
1204
1446
  },
1205
1447
  loading: false
1206
1448
  }, {
1207
1449
  children: jsxRuntime.jsx(ctDesignTypography.Typography, tslib.__assign({
1208
1450
  componentNode: 'span',
1209
1451
  variant: 'L2',
1210
- color: effectiveNovacThemeEnabled ? 'neutral' : 'primary'
1452
+ color: loginButtonColorVariant === ctDesignButton.ButtonColor.NEUTRAL ? 'neutral' : 'primary'
1211
1453
  }, {
1212
- children: "Login"
1454
+ children: LOG_IN_TEXT
1213
1455
  }))
1214
1456
  }))
1215
1457
  })]