@cleartrip/ct-design-header 1.2.0-SNAPSHOT-test-logo-left-padding.0 → 1.2.0-SNAPSHOT-header-0.2.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.
@@ -50,23 +50,27 @@
50
50
  var NAVBAR_OPTIONS = [{
51
51
  lefticon: ctDesignIcons.Offers,
52
52
  text: 'Offers',
53
+ ravenActionName: 'offers',
53
54
  isHoverable: false,
54
55
  isClickable: true,
55
56
  link: OFFERS_URL
56
57
  }, {
57
58
  lefticon: ctDesignIcons.BusinessBag,
58
59
  text: 'Business',
60
+ ravenActionName: 'business',
59
61
  rightIcon: ctDesignIcons.ChevronDown,
60
62
  isHoverable: true
61
63
  }, {
62
64
  lefticon: ctDesignIcons.MyTrips,
63
65
  text: 'My Trips',
66
+ ravenActionName: 'mytrips',
64
67
  isHoverable: false,
65
68
  isClickable: true,
66
69
  link: MY_TRIPS_URL
67
70
  }, {
68
71
  lefticon: ctDesignIcons.SupportIcon,
69
72
  text: 'Support',
73
+ ravenActionName: 'support',
70
74
  isHoverable: false,
71
75
  isClickable: true,
72
76
  link: SUPPORT_URL
@@ -80,33 +84,36 @@
80
84
  };
81
85
  var LOB_DATA = [{
82
86
  title: LOBS.FLIGHTS,
83
- image: 'https://rukmini-ct.flixcart.com/f_auto,w_48,h_48,dpr_2/offermgmt-prod/offermgmt/images/banner/flight_uhp.png?cache=true',
87
+ image: 'https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Flights.png?cache=true',
84
88
  link: '/flights'
85
89
  }, {
86
90
  title: LOBS.HOTELS,
87
- image: 'https://rukmini-ct.flixcart.com/f_auto,w_48,h_48,dpr_2/offermgmt-prod/offermgmt/images/banner/hotel_uhp.png?cache=true',
91
+ image: 'https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Hotels.png?cache=true',
88
92
  link: '/hotels'
89
93
  }, {
90
94
  title: LOBS.BUSES,
91
- image: 'https://rukmini-ct.flixcart.com/f_auto,w_40,h_40,dpr_2/offermgmt-prod/offermgmt/images/banner/bus_uhp.png?cache=true',
95
+ image: 'https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Buses.png?cache=true',
92
96
  link: '/bus'
93
97
  }, {
94
98
  title: LOBS.TRAIN,
95
- image: 'https://rukmini-ct.flixcart.com/f_auto,w_40,h_40,dpr_2/offermgmt-prod/offermgmt/images/banner/train_uhp.png?cache=true',
99
+ image: 'https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Trains.png?cache=true',
96
100
  link: '/pages/trains/appOnly'
97
101
  }, {
98
102
  title: LOBS.PACKAGES,
99
- image: 'https://rukmini-ct.flixcart.com/f_auto,w_40,h_40,dpr_2/offermgmt-prod/offermgmt/images/banner/holiday_uhp.png?cache=true',
103
+ image: 'https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Packages.png?cache=true',
100
104
  link: '/holidays'
101
105
  }];
102
106
  var bdConfig = [{
103
107
  title: 'AgentBox',
104
108
  subtitle: 'For travel agents',
105
- details: 'One-stop travel solution offering the best deals to our travel agency partners'
109
+ details: 'One-stop travel solution offering the best deals to our travel agency partners',
110
+ link: 'https://agency.cleartrip.com'
106
111
  }, {
107
112
  title: 'OutOfOffice',
108
113
  subtitle: 'For startups, corporates and SMEs',
109
- details: 'Manage corporate business travel, smartly'
114
+ details: 'Manage corporate business travel, smartly',
115
+ link: 'https://ooo.cleartrip.com/',
116
+ ravenActionName: 'ooo'
110
117
  }, {
111
118
  title: 'MICE',
112
119
  subtitle: 'For corporate events',
@@ -119,16 +126,35 @@
119
126
  link: 'https://business.cleartrip.com/api-customers/more-details'
120
127
  }];
121
128
  var BUSINESS_DROPDOWN_HEADING = 'Other business services';
122
- var RAVEN_PAGE_NAMES;
129
+ exports.RAVEN_PAGE_NAMES = void 0;
123
130
  (function (RAVEN_PAGE_NAMES) {
124
131
  RAVEN_PAGE_NAMES["UNIFIED_HOME"] = "unified_homepage";
125
- RAVEN_PAGE_NAMES["HOTELS_HOME"] = "hotels_homepage";
126
- RAVEN_PAGE_NAMES["FLIGHTS_HOME"] = "flights_homepage";
127
- })(RAVEN_PAGE_NAMES || (RAVEN_PAGE_NAMES = {}));
132
+ RAVEN_PAGE_NAMES["HOTELS_HOME"] = "hotel_home";
133
+ RAVEN_PAGE_NAMES["FLIGHTS_HOME"] = "flights_home";
134
+ })(exports.RAVEN_PAGE_NAMES || (exports.RAVEN_PAGE_NAMES = {}));
128
135
  var RAVEN_PLATFORMS;
129
136
  (function (RAVEN_PLATFORMS) {
130
137
  RAVEN_PLATFORMS["DESKTOP"] = "desktop";
131
138
  })(RAVEN_PLATFORMS || (RAVEN_PLATFORMS = {}));
139
+ var LOG_IN_TEXT = 'Log in';
140
+ var THEME_CONFIG = {
141
+ NOVAC: {
142
+ headerBackground: 'transparent',
143
+ hoverColor: '#FFB8A5',
144
+ logoFill: '#FFF',
145
+ fkcompanyColor: '#FFF',
146
+ typographyColor: '#FFF',
147
+ loginButtonColorVariant: ctDesignButton.ButtonColor.NEUTRAL
148
+ },
149
+ DEFAULT: {
150
+ headerBackground: '#F7FAFF',
151
+ hoverColor: '#FF4F17',
152
+ logoFill: '#FF4F17',
153
+ fkcompanyColor: '#1A1A1A',
154
+ typographyColor: '#1A1A1A',
155
+ loginButtonColorVariant: ctDesignButton.ButtonColor.PRIMARY
156
+ }
157
+ };
132
158
 
133
159
  var HeaderContext = react.createContext(undefined);
134
160
  var useHeaderContext = function () {
@@ -164,33 +190,33 @@
164
190
  }
165
191
  }, {
166
192
  children: LOB_DATA.map(function (item, index) {
193
+ var title = item.title,
194
+ link = item.link,
195
+ image = item.image;
167
196
  return jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
168
197
  display: 'flex',
169
198
  alignItems: 'center',
170
199
  cursor: 'pointer',
171
200
  css: {
172
201
  gap: 8,
173
- background: selectedLOB === item.title ? '#FFFFFF' : 'transparent',
174
- borderRadius: selectedLOB === item.title ? '40px' : '0',
175
- padding: selectedLOB === item.title ? '8px 16px 8px 8px' : '0'
202
+ background: selectedLOB === title ? '#FFFFFF' : 'transparent',
203
+ borderRadius: selectedLOB === title ? '40px' : '0',
204
+ padding: selectedLOB === title ? '8px 16px 8px 8px' : '0'
176
205
  },
177
206
  onClick: function () {
178
- window.location.href = item.link;
207
+ window.location.href = link;
179
208
  }
180
209
  }, {
181
210
  children: [jsxRuntime.jsx("img", {
182
- src: item.image,
183
- alt: item.title,
211
+ src: image,
212
+ alt: title,
184
213
  width: 32,
185
214
  height: 32
186
215
  }), jsxRuntime.jsx(ctDesignTypography.Typography, __assign({
187
- variant: 'P1',
188
- style: {
189
- fontWeight: selectedLOB === item.title ? 600 : 500
190
- },
216
+ variant: selectedLOB === title ? ctDesignTypography.TypographyVariant.HM3 : ctDesignTypography.TypographyVariant.B1,
191
217
  isClickable: true
192
218
  }, {
193
- children: item.title
219
+ children: title
194
220
  }))]
195
221
  }), index);
196
222
  })
@@ -391,11 +417,85 @@
391
417
  };
392
418
  };
393
419
 
420
+ var stringifyPayload = function (payload) {
421
+ var keys = Object.keys(payload);
422
+ var numericValues = [];
423
+ keys.forEach(function (key) {
424
+ if (numericValues.includes(key)) {
425
+ payload[key] = Number(payload[key]);
426
+ } else {
427
+ payload[key] = '' + payload[key];
428
+ }
429
+ });
430
+ return payload;
431
+ };
432
+ var isServer = function () {
433
+ return typeof window === 'undefined' || !window;
434
+ };
435
+ var getQueryParam = function (queryParam) {
436
+ if (isServer()) {
437
+ return '';
438
+ }
439
+ var urlParams = new URLSearchParams(window.location.search);
440
+ return urlParams.get(queryParam);
441
+ };
442
+ var ravenLoyaltyTypes = function (loyaltyType) {
443
+ switch (loyaltyType) {
444
+ case 'FkVip':
445
+ return 'fk_vip';
446
+ case 'FkPremium':
447
+ return 'fk_plus_premium';
448
+ case 'InsiderIcon':
449
+ return 'myntra_insidericon';
450
+ case 'InsiderElite':
451
+ return 'myntra_insiderelite';
452
+ default:
453
+ return '';
454
+ }
455
+ };
456
+ var ravenSDKTrigger = function (isUserLoggedIn, eventName, ravenPayload, customRavenPayload, ravenPushCallback, pageName) {
457
+ var _a;
458
+ if (typeof ravenPushCallback !== 'function') {
459
+ console.error('ravenPushCallback is not provided or is not a function');
460
+ return;
461
+ }
462
+ var commonPayload = {
463
+ page_name: pageName,
464
+ platform: RAVEN_PLATFORMS.DESKTOP,
465
+ login_status: isUserLoggedIn ? 'yes' : 'no',
466
+ domain: (_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.host
467
+ };
468
+ var newRavenPayload = stringifyPayload(ravenPayload);
469
+ var parsedCustomRavenPayload = stringifyPayload(customRavenPayload);
470
+ var finalPayload = __assign(__assign(__assign({}, commonPayload), newRavenPayload), parsedCustomRavenPayload);
471
+ try {
472
+ if (ravenPushCallback.length === 1) {
473
+ ravenPushCallback({
474
+ eventName: eventName,
475
+ eventData: finalPayload
476
+ });
477
+ } else {
478
+ ravenPushCallback(eventName, finalPayload);
479
+ }
480
+ } catch (err) {
481
+ console.error(err);
482
+ return;
483
+ }
484
+ };
485
+
394
486
  var BusinessDropdownContent = function (_a) {
395
487
  var isOpen = _a.isOpen;
396
- var _b = react.useState(0),
397
- leftPosition = _b[0],
398
- setLeftPosition = _b[1];
488
+ var _b = useHeaderContext(),
489
+ isUserLoggedIn = _b.isUserLoggedIn,
490
+ ravenPushCallback = _b.ravenPushCallback,
491
+ ravenPageName = _b.ravenPageName,
492
+ ravenEventName = _b.ravenEventName,
493
+ loyaltyType = _b.loyaltyType,
494
+ _c = _b.ravenPayload,
495
+ ravenPayload = _c === void 0 ? {} : _c;
496
+ var _d = react.useState(0),
497
+ leftPosition = _d[0],
498
+ setLeftPosition = _d[1];
399
499
  var containerRef = useDropdownAnimation(isOpen).containerRef;
400
500
  react.useEffect(function () {
401
501
  var updatePosition = function () {
@@ -414,6 +514,21 @@
414
514
  return window.removeEventListener('resize', updatePosition);
415
515
  };
416
516
  }, [containerRef, leftPosition]);
517
+ var handleBusinessDropdownClick = react.useCallback(function (link, title, ravenActionName) {
518
+ var _a;
519
+ var utmSource = (_a = getQueryParam('utm_source')) !== null && _a !== void 0 ? _a : 'organic';
520
+ var actionName = ravenActionName ? "".concat(ravenActionName, "_business_click") : title ? "".concat(title.toLowerCase(), "_business_click") : '';
521
+ var defaultPayload = {
522
+ action_name: actionName,
523
+ action_type: 'click',
524
+ u_utm_source: utmSource,
525
+ loyalty_type: ravenLoyaltyTypes(loyaltyType)
526
+ };
527
+ if (link) {
528
+ ravenSDKTrigger(isUserLoggedIn, ravenEventName, defaultPayload, ravenPayload, ravenPushCallback, ravenPageName);
529
+ window.location.href = link;
530
+ }
531
+ }, [isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName, loyaltyType]);
417
532
  return jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
418
533
  ref: containerRef,
419
534
  backgroundColor: '#fff',
@@ -434,10 +549,7 @@
434
549
  backgroundColor: '#FFF1EC'
435
550
  }, {
436
551
  children: jsxRuntime.jsx(ctDesignTypography.Typography, __assign({
437
- variant: 'HM2',
438
- css: {
439
- lineHeight: '24px'
440
- }
552
+ variant: 'HM2'
441
553
  }, {
442
554
  children: BUSINESS_DROPDOWN_HEADING
443
555
  }))
@@ -451,32 +563,46 @@
451
563
  children: bdConfig.map(function (_a) {
452
564
  var title = _a.title,
453
565
  subtitle = _a.subtitle,
454
- details = _a.details;
566
+ details = _a.details,
567
+ link = _a.link,
568
+ ravenActionName = _a.ravenActionName;
455
569
  return jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
456
570
  cursor: 'pointer',
571
+ display: 'flex',
572
+ flexDirection: 'column',
457
573
  width: '200px',
458
- className: 'bd-hover-container'
574
+ rowGap: '11px',
575
+ className: 'bd-hover-container',
576
+ onClick: function () {
577
+ return handleBusinessDropdownClick(link, title, ravenActionName);
578
+ }
459
579
  }, {
460
580
  children: [jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
461
581
  display: 'flex',
462
- flexDirection: 'row',
463
- alignItems: 'center',
464
- columnGap: '8px'
582
+ flexDirection: 'column',
583
+ rowGap: '4px'
465
584
  }, {
466
- children: [jsxRuntime.jsx(ctDesignTypography.Typography, __assign({
467
- variant: 'HM2',
468
- className: 'color-orange-on-hover'
585
+ children: [jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
586
+ display: 'flex',
587
+ flexDirection: 'row',
588
+ alignItems: 'center',
589
+ columnGap: '8px'
469
590
  }, {
470
- children: title
471
- })), jsxRuntime.jsx(AnimatedArrow, {})]
472
- })), jsxRuntime.jsx(ctDesignTypography.Typography, __assign({
473
- variant: 'B3',
474
- css: {
475
- marginTop: '4px',
476
- opacity: 0.75
477
- }
478
- }, {
479
- children: subtitle
591
+ children: [jsxRuntime.jsx(ctDesignTypography.Typography, __assign({
592
+ variant: 'HM2',
593
+ className: 'color-orange-on-hover'
594
+ }, {
595
+ children: title
596
+ })), jsxRuntime.jsx(AnimatedArrow, {})]
597
+ })), jsxRuntime.jsx(ctDesignTypography.Typography, __assign({
598
+ variant: 'B3',
599
+ css: {
600
+ marginTop: '4px',
601
+ opacity: 0.75
602
+ }
603
+ }, {
604
+ children: subtitle
605
+ }))]
480
606
  })), jsxRuntime.jsx(ctDesignTypography.Typography, __assign({
481
607
  variant: 'P3',
482
608
  color: 'subheading',
@@ -554,6 +680,7 @@
554
680
  redirectionLink: 'accounts/personal-data-dashboard'
555
681
  }];
556
682
  var SIGN_OUT_TEXT = 'Logout';
683
+ var MY_ACCOUNT_TEXT = 'My Account';
557
684
  var LOGGEDIN_USER_TEXT = 'You are logged in with';
558
685
  var HEADER_ACCOUNTS_OPTIONS_OPEN_BTN_ID = 'header-acc-btn';
559
686
  var ACCOUNT_OPTIONS_CONTAINER_ID = 'account-options';
@@ -565,13 +692,33 @@
565
692
  backgroundGradient = _a.backgroundGradient,
566
693
  handleChipClick = _a.handleChipClick,
567
694
  chevronFillColor = _a.chevronFillColor;
568
- var _b = react.useState(false),
569
- isHovered = _b[0],
570
- setIsHovered = _b[1];
571
- var handleClick = function () {
572
- window.location.href = '/';
573
- handleChipClick && handleChipClick();
574
- };
695
+ var _b = useHeaderContext(),
696
+ loyaltyType = _b.loyaltyType,
697
+ isUserLoggedIn = _b.isUserLoggedIn,
698
+ ravenPushCallback = _b.ravenPushCallback,
699
+ ravenPageName = _b.ravenPageName,
700
+ _c = _b.ravenPayload,
701
+ ravenPayload = _c === void 0 ? {} : _c,
702
+ ravenEventName = _b.ravenEventName;
703
+ var _d = react.useState(false),
704
+ isHovered = _d[0],
705
+ setIsHovered = _d[1];
706
+ var handleClick = react.useCallback(function () {
707
+ var _a;
708
+ if (handleChipClick) {
709
+ handleChipClick();
710
+ } else {
711
+ var utmSource = (_a = getQueryParam('utm_source')) !== null && _a !== void 0 ? _a : 'organic';
712
+ var defaultPayload = {
713
+ action_name: "loyalty_account_click",
714
+ action_type: 'click',
715
+ u_utm_source: utmSource,
716
+ loyaltyType: ravenLoyaltyTypes(loyaltyType)
717
+ };
718
+ ravenSDKTrigger(isUserLoggedIn, ravenEventName, defaultPayload, ravenPayload, ravenPushCallback, ravenPageName);
719
+ window.location.href = '/all-offers/loyalty-october';
720
+ }
721
+ }, [handleChipClick, loyaltyType, isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName]);
575
722
  return jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
576
723
  display: 'flex',
577
724
  position: 'relative',
@@ -596,7 +743,7 @@
596
743
  onClick: handleClick
597
744
  }, {
598
745
  children: [jsxRuntime.jsx(ctDesignContainer.Container, {
599
- style: {
746
+ css: {
600
747
  content: '""',
601
748
  position: 'absolute',
602
749
  inset: 0,
@@ -605,7 +752,7 @@
605
752
  zIndex: -2
606
753
  }
607
754
  }), jsxRuntime.jsx(ctDesignContainer.Container, {
608
- style: {
755
+ css: {
609
756
  content: '""',
610
757
  position: 'absolute',
611
758
  inset: 0,
@@ -626,7 +773,7 @@
626
773
  })), jsxRuntime.jsx(ctDesignContainer.Container, __assign({
627
774
  display: 'flex',
628
775
  alignItems: 'center',
629
- style: {
776
+ css: {
630
777
  overflow: 'hidden',
631
778
  maxWidth: isHovered ? 16 : 0,
632
779
  transition: 'max-width 0.2s ease-in-out, opacity 0.2s ease-in-out',
@@ -691,24 +838,46 @@
691
838
  handleChipClick = _a.handleChipClick,
692
839
  value = _a.value,
693
840
  type = _a.type;
694
- var _b = react.useState(false),
695
- isHovered = _b[0],
696
- setIsHovered = _b[1];
697
- var handleDefaultClick = function () {
698
- if (type === 'supercoins') {
699
- window.location.href = '/supercoins';
700
- } else if (type === 'wallet') {
701
- window.location.href = '/wallet';
841
+ var _b = useHeaderContext(),
842
+ loyaltyType = _b.loyaltyType,
843
+ isUserLoggedIn = _b.isUserLoggedIn,
844
+ ravenPushCallback = _b.ravenPushCallback,
845
+ ravenPageName = _b.ravenPageName,
846
+ ravenEventName = _b.ravenEventName,
847
+ _c = _b.ravenPayload,
848
+ ravenPayload = _c === void 0 ? {} : _c;
849
+ var _d = react.useState(false),
850
+ isHovered = _d[0],
851
+ setIsHovered = _d[1];
852
+ var handleDefaultClick = react.useCallback(function () {
853
+ var _a;
854
+ if (handleChipClick) {
855
+ handleChipClick();
856
+ } else {
857
+ var utmSource = (_a = getQueryParam('utm_source')) !== null && _a !== void 0 ? _a : 'organic';
858
+ var defaultPayload = {
859
+ action_name: "".concat(type, "_account_click"),
860
+ action_type: 'click',
861
+ u_utm_source: utmSource,
862
+ loyaltyType: ravenLoyaltyTypes(loyaltyType)
863
+ };
864
+ ravenSDKTrigger(isUserLoggedIn, ravenEventName, defaultPayload, ravenPayload, ravenPushCallback, ravenPageName);
865
+ var redirectUrls = {
866
+ supercoin: '/all-offers/supercoins/',
867
+ wallet: '/accounts/wallet'
868
+ };
869
+ if (redirectUrls[type]) {
870
+ window.location.href = redirectUrls[type];
871
+ }
702
872
  }
703
- handleChipClick && handleChipClick();
704
- };
873
+ }, [handleChipClick, type, loyaltyType, isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName]);
705
874
  return jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
706
875
  display: 'flex',
707
876
  alignItems: 'center',
708
877
  justifyContent: 'center',
709
878
  borderRadius: '8px',
710
879
  cursor: 'pointer',
711
- style: {
880
+ css: {
712
881
  height: 32,
713
882
  paddingLeft: 8,
714
883
  paddingRight: isHovered ? 4 : 8,
@@ -739,7 +908,7 @@
739
908
  })), jsxRuntime.jsx(ctDesignContainer.Container, __assign({
740
909
  display: 'flex',
741
910
  alignItems: 'center',
742
- style: {
911
+ css: {
743
912
  overflow: 'hidden',
744
913
  maxWidth: isHovered ? 16 : 0,
745
914
  transition: 'max-width 0.2s ease-in-out, opacity 0.2s ease-in-out',
@@ -767,6 +936,12 @@
767
936
  hideWalletChip = _b.hideWalletChip,
768
937
  hideSupercoinsChip = _b.hideSupercoinsChip,
769
938
  hideLoyaltyChip = _b.hideLoyaltyChip;
939
+ var shouldShowLoyalty = loyaltyLoading || selectedLoyaltyType && LOYALTY_DATA[selectedLoyaltyType] && !hideLoyaltyChip;
940
+ var shouldShowSupercoin = superCoinsLoading || !hideSupercoinsChip;
941
+ var shouldShowWallet = walletLoading || !hideWalletChip;
942
+ if (!shouldShowLoyalty && !shouldShowSupercoin && !shouldShowWallet) {
943
+ return null;
944
+ }
770
945
  return jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
771
946
  display: 'flex',
772
947
  padding: '0 16px 16px 16px',
@@ -797,7 +972,7 @@
797
972
  }),
798
973
  value: superCoinBalance,
799
974
  handleChipClick: supercoinsChipClick,
800
- type: 'supercoins'
975
+ type: 'supercoin'
801
976
  }), walletLoading ? jsxRuntime.jsx(ctDesignShimmer.Shimmer, {
802
977
  width: '50px',
803
978
  height: '32px',
@@ -821,34 +996,51 @@
821
996
  userName = _b.userName,
822
997
  userMobileNumber = _b.userMobileNumber,
823
998
  countryCode = _b.countryCode,
824
- userDetailsLoading = _b.userDetailsLoading;
999
+ userDetailsLoading = _b.userDetailsLoading,
1000
+ loyaltyType = _b.loyaltyType,
1001
+ isUserLoggedIn = _b.isUserLoggedIn,
1002
+ ravenEventName = _b.ravenEventName,
1003
+ ravenPageName = _b.ravenPageName,
1004
+ _c = _b.ravenPayload,
1005
+ ravenPayload = _c === void 0 ? {} : _c,
1006
+ ravenPushCallback = _b.ravenPushCallback;
825
1007
  var containerRef = useDropdownAnimation(isOpen).containerRef;
826
- var _c = react.useMemo(function () {
827
- var userGreeting = userName && "Hello ".concat(userName, "!");
828
- var phoneNumber = countryCode && userMobileNumber ? "".concat(countryCode, " ").concat(userMobileNumber) : '';
1008
+ var _d = react.useMemo(function () {
829
1009
  return {
830
- userGreeting: userGreeting,
831
- phoneNumber: phoneNumber
1010
+ userGreeting: userName ? "Hello ".concat(userName, "!") : '',
1011
+ phoneNumber: countryCode && userMobileNumber ? "".concat(countryCode, " ").concat(userMobileNumber) : ''
832
1012
  };
833
1013
  }, [userName, userMobileNumber, countryCode]),
834
- userGreeting = _c.userGreeting,
835
- phoneNumber = _c.phoneNumber;
836
- var handleRedirectClick = function (redirectLink) {
837
- return function () {
838
- window.location.href = redirectLink;
1014
+ userGreeting = _d.userGreeting,
1015
+ phoneNumber = _d.phoneNumber;
1016
+ var generateRavenPayload = function (actionName) {
1017
+ var _a;
1018
+ return {
1019
+ action_name: actionName.toLowerCase().replace(/[\s-]/g, '') + '_account_click',
1020
+ action_type: 'click',
1021
+ u_utm_source: (_a = getQueryParam('utm_source')) !== null && _a !== void 0 ? _a : 'organic',
1022
+ loyalty_type: ravenLoyaltyTypes(loyaltyType)
839
1023
  };
840
1024
  };
841
- react.useEffect(function () {
1025
+ var handleAccountOptionsClick = react.useCallback(function (text, redirectLink) {
1026
+ ravenSDKTrigger(isUserLoggedIn, ravenEventName, generateRavenPayload(text), ravenPayload, ravenPushCallback, ravenPageName);
1027
+ window.location.href = redirectLink;
1028
+ }, [isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName]);
1029
+ react.useCallback(function () {
1030
+ ravenSDKTrigger(isUserLoggedIn, ravenEventName, generateRavenPayload(SIGN_OUT_TEXT), ravenPayload, ravenPushCallback, ravenPageName);
1031
+ handleLogoutClick();
1032
+ }, [isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName, handleLogoutClick]);
1033
+ var positionAccountOptionsDiv = react.useCallback(function () {
842
1034
  var headerAccBtn = document.getElementById(HEADER_ACCOUNTS_OPTIONS_OPEN_BTN_ID);
843
1035
  var accountOptionsElem = document.getElementById(ACCOUNT_OPTIONS_CONTAINER_ID);
844
- var positionAccountOptionsDiv = function () {
845
- var headerBtnRight = headerAccBtn === null || headerAccBtn === void 0 ? void 0 : headerAccBtn.getBoundingClientRect().right;
846
- if (accountOptionsElem && headerBtnRight) {
847
- accountOptionsElem.style.left = "".concat(headerBtnRight - ACCOUNT_OPTIONS_CONTAINER_WIDTH, "px");
848
- }
849
- };
850
- positionAccountOptionsDiv();
1036
+ if (headerAccBtn && accountOptionsElem) {
1037
+ var headerBtnRight = headerAccBtn.getBoundingClientRect().right;
1038
+ accountOptionsElem.style.left = "".concat(headerBtnRight - ACCOUNT_OPTIONS_CONTAINER_WIDTH, "px");
1039
+ }
851
1040
  }, []);
1041
+ react.useEffect(function () {
1042
+ positionAccountOptionsDiv();
1043
+ }, [positionAccountOptionsDiv]);
852
1044
  var renderUserData = function () {
853
1045
  var renderContent = function (loading, content, variant, color) {
854
1046
  return jsxRuntime.jsx(ctDesignTypography.Typography, __assign({
@@ -893,7 +1085,7 @@
893
1085
  }, {
894
1086
  children: [jsxRuntime.jsx(ctDesignContainer.Container, __assign({
895
1087
  padding: '16px',
896
- height: '72px'
1088
+ height: '76px'
897
1089
  }, {
898
1090
  children: renderUserData()
899
1091
  })), jsxRuntime.jsx(RewardsSection, {}), jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
@@ -902,7 +1094,7 @@
902
1094
  padding: '8px',
903
1095
  backgroundColor: 'white',
904
1096
  rowGap: '8px',
905
- style: {
1097
+ css: {
906
1098
  borderBottomLeftRadius: 12,
907
1099
  borderBottomRightRadius: 12
908
1100
  }
@@ -916,12 +1108,14 @@
916
1108
  padding: '8px',
917
1109
  borderRadius: '8px',
918
1110
  cursor: 'pointer',
919
- onClick: handleRedirectClick(redirectionLink)
1111
+ onClick: function () {
1112
+ return handleAccountOptionsClick(text, redirectionLink);
1113
+ }
920
1114
  }, {
921
1115
  children: jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
922
1116
  display: 'flex',
923
1117
  cursor: 'pointer',
924
- style: {
1118
+ css: {
925
1119
  columnGap: '8px'
926
1120
  }
927
1121
  }, {
@@ -938,7 +1132,7 @@
938
1132
  }))
939
1133
  }), "account-option-".concat(text));
940
1134
  }), jsxRuntime.jsx(ctDesignDivider.Divider, {
941
- style: {
1135
+ css: {
942
1136
  borderBottom: '1px dashed #E6E6E6'
943
1137
  }
944
1138
  }), jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
@@ -969,18 +1163,26 @@
969
1163
  };
970
1164
 
971
1165
  var UserAccount = function () {
972
- var isNovacThemeEnabled = useHeaderContext().isNovacThemeEnabled;
973
- var _a = useHoverDropdown({
1166
+ var _a = useHeaderContext(),
1167
+ isNovacThemeEnabled = _a.isNovacThemeEnabled,
1168
+ ravenEventName = _a.ravenEventName,
1169
+ _b = _a.ravenPayload,
1170
+ ravenPayload = _b === void 0 ? {} : _b,
1171
+ ravenPushCallback = _a.ravenPushCallback,
1172
+ isUserLoggedIn = _a.isUserLoggedIn,
1173
+ loyaltyType = _a.loyaltyType,
1174
+ ravenPageName = _a.ravenPageName;
1175
+ var _c = useHoverDropdown({
974
1176
  openDelay: 0
975
1177
  }),
976
- isDropdownVisible = _a.isDropdownVisible,
977
- handleOnMouseEnter = _a.handleOnMouseEnter,
978
- handleOnMouseLeave = _a.handleOnMouseLeave,
979
- handleDropdownMouseEnter = _a.handleDropdownMouseEnter,
980
- handleDropdownMouseLeave = _a.handleDropdownMouseLeave;
981
- var _b = react.useState(false),
982
- scrolled = _b[0],
983
- setScrolled = _b[1];
1178
+ isDropdownVisible = _c.isDropdownVisible,
1179
+ handleOnMouseEnter = _c.handleOnMouseEnter,
1180
+ handleOnMouseLeave = _c.handleOnMouseLeave,
1181
+ handleDropdownMouseEnter = _c.handleDropdownMouseEnter,
1182
+ handleDropdownMouseLeave = _c.handleDropdownMouseLeave;
1183
+ var _d = react.useState(false),
1184
+ scrolled = _d[0],
1185
+ setScrolled = _d[1];
984
1186
  react.useEffect(function () {
985
1187
  var handleScroll = function () {
986
1188
  setScrolled(window.scrollY >= 100);
@@ -990,8 +1192,20 @@
990
1192
  return window.removeEventListener('scroll', handleScroll);
991
1193
  };
992
1194
  }, []);
993
- var effectiveNovacThemeEnabled = isNovacThemeEnabled && !scrolled;
994
- var hoverColor = effectiveNovacThemeEnabled ? '#FFB8A5' : '#FF4F17';
1195
+ var theme = isNovacThemeEnabled && !scrolled ? THEME_CONFIG.NOVAC : THEME_CONFIG.DEFAULT;
1196
+ var hoverColor = theme.hoverColor,
1197
+ typographyColor = theme.typographyColor;
1198
+ var triggerRavenEventOnHover = react.useCallback(function () {
1199
+ var _a;
1200
+ var utmSource = (_a = getQueryParam('utm_source')) !== null && _a !== void 0 ? _a : 'organic';
1201
+ var defaultPayload = {
1202
+ action_name: "".concat(MY_ACCOUNT_TEXT.toLowerCase().replace(/[\s-]/g, ''), "_header_hover"),
1203
+ action_type: 'hover',
1204
+ u_utm_source: utmSource,
1205
+ loyalty_type: ravenLoyaltyTypes(loyaltyType)
1206
+ };
1207
+ ravenSDKTrigger(isUserLoggedIn, ravenEventName, defaultPayload, ravenPayload, ravenPushCallback, ravenPageName);
1208
+ }, [isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName, loyaltyType]);
995
1209
  return jsxRuntime.jsxs(ctDesignContainer.Container, {
996
1210
  children: [jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
997
1211
  display: 'flex',
@@ -1000,18 +1214,19 @@
1000
1214
  borderRadius: '12px',
1001
1215
  height: '100%',
1002
1216
  cursor: 'pointer',
1003
- style: {
1217
+ css: {
1004
1218
  columnGap: 8,
1005
1219
  height: 64
1006
1220
  },
1007
1221
  onMouseEnter: function () {
1008
- return handleOnMouseEnter(0);
1222
+ handleOnMouseEnter(0);
1223
+ triggerRavenEventOnHover();
1009
1224
  },
1010
1225
  onMouseLeave: handleOnMouseLeave,
1011
1226
  id: HEADER_ACCOUNTS_OPTIONS_OPEN_BTN_ID
1012
1227
  }, {
1013
1228
  children: [jsxRuntime.jsx(ctDesignIcons.MyAccount, {
1014
- color: isDropdownVisible ? hoverColor : effectiveNovacThemeEnabled ? '#FFF' : '#1A1A1A'
1229
+ color: isDropdownVisible ? hoverColor : typographyColor
1015
1230
  }), jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
1016
1231
  display: 'flex',
1017
1232
  flexDirection: 'row',
@@ -1022,13 +1237,13 @@
1022
1237
  css: {
1023
1238
  cursor: 'pointer'
1024
1239
  },
1025
- colorCode: isDropdownVisible ? hoverColor : effectiveNovacThemeEnabled ? '#FFF' : '#1A1A1A'
1240
+ colorCode: isDropdownVisible ? hoverColor : typographyColor
1026
1241
  }, {
1027
- children: "My Account"
1242
+ children: MY_ACCOUNT_TEXT
1028
1243
  })), jsxRuntime.jsx(ctDesignIcons.ChevronDown, {
1029
1244
  width: 20,
1030
1245
  height: 20,
1031
- fill: isDropdownVisible ? hoverColor : effectiveNovacThemeEnabled ? '#FFF' : '#1A1A1A'
1246
+ fill: isDropdownVisible ? hoverColor : typographyColor
1032
1247
  })]
1033
1248
  }))]
1034
1249
  })), jsxRuntime.jsx(HeaderAnimatedMask, __assign({
@@ -1053,21 +1268,23 @@
1053
1268
  }));
1054
1269
  };
1055
1270
  var HeaderContent = function () {
1056
- var _a = useHeaderContext(),
1057
- onLoginButtonClick = _a.onLoginButtonClick,
1058
- _b = _a.showAllLobs,
1059
- showAllLobs = _b === void 0 ? false : _b,
1060
- isUserLoggedIn = _a.isUserLoggedIn;
1061
- _a.loyaltyType;
1062
- var _c = _a.isNovacThemeEnabled,
1063
- isNovacThemeEnabled = _c === void 0 ? false : _c;
1064
- _a.ravenPayload;
1065
- _a.ravenPushCallback;
1066
- _a.ravenPageName;
1067
- _a.ravenEventName;
1068
- var _e = react.useState(false),
1069
- scrolled = _e[0],
1070
- setScrolled = _e[1];
1271
+ var _a;
1272
+ var _b = useHeaderContext(),
1273
+ onLoginButtonClick = _b.onLoginButtonClick,
1274
+ _c = _b.showAllLobs,
1275
+ showAllLobs = _c === void 0 ? false : _c,
1276
+ isUserLoggedIn = _b.isUserLoggedIn,
1277
+ loyaltyType = _b.loyaltyType,
1278
+ _d = _b.isNovacThemeEnabled,
1279
+ isNovacThemeEnabled = _d === void 0 ? false : _d,
1280
+ _e = _b.ravenPayload,
1281
+ ravenPayload = _e === void 0 ? {} : _e,
1282
+ ravenPushCallback = _b.ravenPushCallback,
1283
+ ravenPageName = _b.ravenPageName,
1284
+ ravenEventName = _b.ravenEventName;
1285
+ var _f = react.useState(false),
1286
+ scrolled = _f[0],
1287
+ setScrolled = _f[1];
1071
1288
  react.useEffect(function () {
1072
1289
  var handleScroll = function () {
1073
1290
  setScrolled(window.scrollY >= 100);
@@ -1077,18 +1294,49 @@
1077
1294
  return window.removeEventListener('scroll', handleScroll);
1078
1295
  };
1079
1296
  }, []);
1080
- var effectiveNovacThemeEnabled = isNovacThemeEnabled && !scrolled;
1081
- var headerBackground = effectiveNovacThemeEnabled ? 'transparent' : '#F7FAFF';
1082
- var hoverColor = effectiveNovacThemeEnabled ? '#FFB8A5' : '#FF4F17';
1083
- var _f = useHoverDropdown({
1297
+ var theme = isNovacThemeEnabled && !scrolled ? THEME_CONFIG.NOVAC : THEME_CONFIG.DEFAULT;
1298
+ var headerBackground = theme.headerBackground,
1299
+ logoFill = theme.logoFill,
1300
+ loginButtonColorVariant = theme.loginButtonColorVariant,
1301
+ hoverColor = theme.hoverColor,
1302
+ fkcompanyColor = theme.fkcompanyColor,
1303
+ typographyColor = theme.typographyColor;
1304
+ var _g = useHoverDropdown({
1084
1305
  openDelay: 0
1085
1306
  }),
1086
- isDropdownVisible = _f.isDropdownVisible,
1087
- hoveredElemIndex = _f.hoveredElemIndex,
1088
- handleOnMouseEnter = _f.handleOnMouseEnter,
1089
- handleOnMouseLeave = _f.handleOnMouseLeave,
1090
- handleDropdownMouseEnter = _f.handleDropdownMouseEnter,
1091
- handleDropdownMouseLeave = _f.handleDropdownMouseLeave;
1307
+ isDropdownVisible = _g.isDropdownVisible,
1308
+ hoveredElemIndex = _g.hoveredElemIndex,
1309
+ handleOnMouseEnter = _g.handleOnMouseEnter,
1310
+ handleOnMouseLeave = _g.handleOnMouseLeave,
1311
+ handleDropdownMouseEnter = _g.handleDropdownMouseEnter,
1312
+ handleDropdownMouseLeave = _g.handleDropdownMouseLeave;
1313
+ var utmSource = (_a = getQueryParam('utm_source')) !== null && _a !== void 0 ? _a : 'organic';
1314
+ var createPayload = react.useCallback(function (actionName, actionType) {
1315
+ return {
1316
+ action_name: actionName,
1317
+ action_type: actionType,
1318
+ u_utm_source: utmSource,
1319
+ loyalty_type: ravenLoyaltyTypes(loyaltyType)
1320
+ };
1321
+ }, [utmSource, loyaltyType]);
1322
+ var handleNavbarOptionsClick = react.useCallback(function (option) {
1323
+ if (option.isClickable && option.link) {
1324
+ var actionName = "".concat(option.text.toLowerCase().replace(/\s/g, ''), "_header_click");
1325
+ var payload = createPayload(actionName, 'click');
1326
+ ravenSDKTrigger(isUserLoggedIn, ravenEventName, payload, ravenPayload, ravenPushCallback, ravenPageName);
1327
+ window.location.href = option.link;
1328
+ }
1329
+ }, [createPayload, isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName]);
1330
+ var handleHomeClick = react.useCallback(function () {
1331
+ var payload = createPayload('home_header_click', 'click');
1332
+ ravenSDKTrigger(isUserLoggedIn, ravenEventName, payload, ravenPayload, ravenPushCallback, ravenPageName);
1333
+ window.location.href = '/';
1334
+ }, [createPayload, isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName]);
1335
+ var triggerRavenEventOnHover = react.useCallback(function (option) {
1336
+ var actionName = "".concat(option.text.toLowerCase().replace(/\s/g, ''), "_header_hover");
1337
+ var payload = createPayload(actionName, 'hover');
1338
+ ravenSDKTrigger(isUserLoggedIn, ravenEventName, payload, ravenPayload, ravenPushCallback, ravenPageName);
1339
+ }, [createPayload, isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName]);
1092
1340
  return jsxRuntime.jsxs(jsxRuntime.Fragment, {
1093
1341
  children: [jsxRuntime.jsx(ctDesignContainer.Container, __assign({
1094
1342
  display: 'flex',
@@ -1103,7 +1351,7 @@
1103
1351
  css: {
1104
1352
  gap: '24px',
1105
1353
  flexShrink: 0,
1106
- borderBottom: effectiveNovacThemeEnabled ? '' : '1px solid #E6E6E6',
1354
+ borderBottom: headerBackground === 'transparent' ? '' : '1px solid #E6E6E6',
1107
1355
  transition: 'background-color 0.3s ease-in-out, border-bottom 0.3s ease-in-out'
1108
1356
  }
1109
1357
  }, {
@@ -1113,7 +1361,7 @@
1113
1361
  justifyContent: 'space-between',
1114
1362
  padding: '0 28px',
1115
1363
  flex: 1,
1116
- style: {
1364
+ css: {
1117
1365
  gap: '24px',
1118
1366
  maxWidth: 1440
1119
1367
  }
@@ -1124,13 +1372,10 @@
1124
1372
  alignItems: 'center',
1125
1373
  justifyContent: 'center',
1126
1374
  cursor: 'pointer',
1127
- paddingLeft: '16px',
1128
- onClick: function () {
1129
- window.location.href = '/';
1130
- }
1375
+ onClick: handleHomeClick
1131
1376
  }, {
1132
1377
  children: [jsxRuntime.jsx(ctDesignIcons.CTLogo, {
1133
- fillColor: effectiveNovacThemeEnabled ? '#FFF' : '#FF4F17'
1378
+ fillColor: logoFill
1134
1379
  }), jsxRuntime.jsx(ctDesignDivider.Divider, {
1135
1380
  css: {
1136
1381
  width: 12,
@@ -1140,7 +1385,7 @@
1140
1385
  borderBottom: '1px solid #e0e0e0'
1141
1386
  }
1142
1387
  }), jsxRuntime.jsx(ctDesignIcons.Fkcompany, {
1143
- color: effectiveNovacThemeEnabled ? '#FFF' : '#1A1A1A'
1388
+ color: fkcompanyColor
1144
1389
  })]
1145
1390
  })), jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
1146
1391
  display: 'flex',
@@ -1157,11 +1402,18 @@
1157
1402
  columnGap: '4px'
1158
1403
  }, {
1159
1404
  children: NAVBAR_OPTIONS.map(function (option, index) {
1405
+ var text = option.text,
1406
+ LeftIcon = option.lefticon,
1407
+ RightIcon = option.rightIcon,
1408
+ isHoverable = option.isHoverable;
1160
1409
  var isHovered = hoveredElemIndex === index;
1161
1410
  return jsxRuntime.jsxs(ctDesignContainer.Container, {
1162
1411
  children: [jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
1163
1412
  onMouseEnter: function () {
1164
- return handleOnMouseEnter(index);
1413
+ handleOnMouseEnter(index);
1414
+ if (option.isHoverable) {
1415
+ triggerRavenEventOnHover(option);
1416
+ }
1165
1417
  },
1166
1418
  onMouseLeave: handleOnMouseLeave,
1167
1419
  display: 'flex',
@@ -1173,13 +1425,11 @@
1173
1425
  columnGap: 8,
1174
1426
  height: '64px',
1175
1427
  onClick: function () {
1176
- if (option.link && option.isClickable) {
1177
- window.location.href = option.link;
1178
- }
1428
+ return handleNavbarOptionsClick(option);
1179
1429
  }
1180
1430
  }, {
1181
- children: [jsxRuntime.jsx(option.lefticon, {
1182
- color: isHovered ? hoverColor : effectiveNovacThemeEnabled ? '#FFF' : '#1A1A1A'
1431
+ children: [jsxRuntime.jsx(LeftIcon, {
1432
+ color: isHovered ? hoverColor : typographyColor
1183
1433
  }), jsxRuntime.jsxs(ctDesignContainer.Container, __assign({
1184
1434
  display: 'flex',
1185
1435
  flexDirection: 'row',
@@ -1187,31 +1437,31 @@
1187
1437
  }, {
1188
1438
  children: [jsxRuntime.jsx(ctDesignTypography.Typography, __assign({
1189
1439
  variant: 'B2',
1190
- colorCode: isHovered ? hoverColor : effectiveNovacThemeEnabled ? '#FFF' : '#1A1A1A',
1440
+ colorCode: isHovered ? hoverColor : typographyColor,
1191
1441
  isClickable: true
1192
1442
  }, {
1193
- children: option.text
1194
- })), option.rightIcon && jsxRuntime.jsx(option.rightIcon, {
1443
+ children: text
1444
+ })), RightIcon && jsxRuntime.jsx(RightIcon, {
1195
1445
  width: 20,
1196
1446
  height: 20,
1197
- fill: isHovered ? hoverColor : effectiveNovacThemeEnabled ? '#FFF' : '#1A1A1A'
1447
+ fill: isHovered ? hoverColor : typographyColor
1198
1448
  })]
1199
1449
  }))]
1200
1450
  }), "nav-option-".concat(index)), jsxRuntime.jsx(HeaderAnimatedMask, __assign({
1201
- show: hoveredElemIndex === index && option.isHoverable && isDropdownVisible,
1451
+ show: hoveredElemIndex === index && isHoverable && isDropdownVisible,
1202
1452
  marginTop: '64px',
1203
1453
  handleDropdownMouseEnter: handleDropdownMouseEnter,
1204
1454
  handleDropdownMouseLeave: handleDropdownMouseLeave,
1205
1455
  onMaskClick: handleDropdownMouseLeave
1206
1456
  }, {
1207
1457
  children: jsxRuntime.jsx(BusinessDropdownContent, {
1208
- isOpen: hoveredElemIndex === index && option.isHoverable && isDropdownVisible
1458
+ isOpen: hoveredElemIndex === index && isHoverable && isDropdownVisible
1209
1459
  })
1210
1460
  }))]
1211
1461
  });
1212
1462
  })
1213
1463
  })), isUserLoggedIn && jsxRuntime.jsx(ctDesignDivider.Divider, {
1214
- style: {
1464
+ css: {
1215
1465
  width: 12,
1216
1466
  margin: '0 -18px',
1217
1467
  transform: 'rotate(90deg)',
@@ -1225,21 +1475,22 @@
1225
1475
  }, {
1226
1476
  children: jsxRuntime.jsx(UserAccount, {})
1227
1477
  })) : jsxRuntime.jsx(ctDesignButton.Button, __assign({
1228
- className: "fw-400 fs-14 ".concat(effectiveNovacThemeEnabled ? 'novac-login-button' : 'login-button'),
1478
+ variant: 'outline',
1479
+ color: loginButtonColorVariant,
1480
+ className: "".concat(headerBackground === 'transparent' ? 'novac-login-button' : 'login-button'),
1229
1481
  onClick: onLoginButtonClick,
1230
- style: {
1482
+ css: {
1231
1483
  width: 153,
1232
- height: 40,
1233
- border: effectiveNovacThemeEnabled ? '1px solid #FFF' : '1px solid #1A1A1A'
1484
+ height: 40
1234
1485
  },
1235
1486
  loading: false
1236
1487
  }, {
1237
1488
  children: jsxRuntime.jsx(ctDesignTypography.Typography, __assign({
1238
1489
  componentNode: 'span',
1239
1490
  variant: 'L2',
1240
- color: effectiveNovacThemeEnabled ? 'neutral' : 'primary'
1491
+ color: loginButtonColorVariant === ctDesignButton.ButtonColor.NEUTRAL ? 'neutral' : 'primary'
1241
1492
  }, {
1242
- children: "Login"
1493
+ children: LOG_IN_TEXT
1243
1494
  }))
1244
1495
  }))
1245
1496
  })]