@cleartrip/ct-design-header 1.2.0-SNAPSHOT-header-v0.8.0 → 1.2.0-SNAPSHOT-header-v0.9.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.
@@ -2,11 +2,10 @@ import { __assign, __spreadArray } from 'tslib';
2
2
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
3
  import { createContext, useContext, useState, useRef, useEffect, useCallback, useMemo } from 'react';
4
4
  import { Container } from '@cleartrip/ct-design-container';
5
- import { Typography, TypographyVariant } from '@cleartrip/ct-design-typography';
6
- import { ButtonColor, Button } from '@cleartrip/ct-design-button';
5
+ import { Typography } from '@cleartrip/ct-design-typography';
6
+ import { Button } from '@cleartrip/ct-design-button';
7
7
  import { Divider } from '@cleartrip/ct-design-divider';
8
8
  import { Offers, BusinessBag, ChevronDown, MyTrips, SupportIcon, ArrowRight, MyAccount, SavedCard, Travellers, HiFive, Wallet, SettingsCog, PrivacyRights, HeaderChevronRight, FkVip, FkPremium, InsiderIcon, InsiderElite, CtLoyalty, Supercoin, Signout, CTLogo, Fkcompany } from '@cleartrip/ct-design-icons';
9
- import { Shimmer } from '@cleartrip/ct-design-shimmer';
10
9
 
11
10
  var OFFERS_URL = 'all-offers/?categories=flights';
12
11
  var MY_TRIPS_URL = '/account/trips';
@@ -14,27 +13,23 @@ var SUPPORT_URL = '/support';
14
13
  var NAVBAR_OPTIONS = [{
15
14
  lefticon: Offers,
16
15
  text: 'Offers',
17
- ravenActionName: 'offers',
18
16
  isHoverable: false,
19
17
  isClickable: true,
20
18
  link: OFFERS_URL
21
19
  }, {
22
20
  lefticon: BusinessBag,
23
21
  text: 'Business',
24
- ravenActionName: 'business',
25
22
  rightIcon: ChevronDown,
26
23
  isHoverable: true
27
24
  }, {
28
25
  lefticon: MyTrips,
29
26
  text: 'My Trips',
30
- ravenActionName: 'mytrips',
31
27
  isHoverable: false,
32
28
  isClickable: true,
33
29
  link: MY_TRIPS_URL
34
30
  }, {
35
31
  lefticon: SupportIcon,
36
32
  text: 'Support',
37
- ravenActionName: 'support',
38
33
  isHoverable: false,
39
34
  isClickable: true,
40
35
  link: SUPPORT_URL
@@ -48,36 +43,33 @@ var LOBS = {
48
43
  };
49
44
  var LOB_DATA = [{
50
45
  title: LOBS.FLIGHTS,
51
- image: 'https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Flights.png?cache=true',
46
+ 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
47
  link: '/flights'
53
48
  }, {
54
49
  title: LOBS.HOTELS,
55
- image: 'https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Hotels.png?cache=true',
50
+ 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
51
  link: '/hotels'
57
52
  }, {
58
53
  title: LOBS.BUSES,
59
- image: 'https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Buses.png?cache=true',
54
+ 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
55
  link: '/bus'
61
56
  }, {
62
57
  title: LOBS.TRAIN,
63
- image: 'https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Trains.png?cache=true',
58
+ 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
59
  link: '/pages/trains/appOnly'
65
60
  }, {
66
61
  title: LOBS.PACKAGES,
67
- image: 'https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Packages.png?cache=true',
62
+ 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
63
  link: '/holidays'
69
64
  }];
70
65
  var bdConfig = [{
71
66
  title: 'AgentBox',
72
67
  subtitle: 'For travel agents',
73
- details: 'One-stop travel solution offering the best deals to our travel agency partners',
74
- link: 'https://agency.cleartrip.com'
68
+ details: 'One-stop travel solution offering the best deals to our travel agency partners'
75
69
  }, {
76
70
  title: 'OutOfOffice',
77
71
  subtitle: 'For startups, corporates and SMEs',
78
- details: 'Manage corporate business travel, smartly',
79
- link: 'https://ooo.cleartrip.com/',
80
- ravenActionName: 'ooo'
72
+ details: 'Manage corporate business travel, smartly'
81
73
  }, {
82
74
  title: 'MICE',
83
75
  subtitle: 'For corporate events',
@@ -93,32 +85,13 @@ var BUSINESS_DROPDOWN_HEADING = 'Other business services';
93
85
  var RAVEN_PAGE_NAMES;
94
86
  (function (RAVEN_PAGE_NAMES) {
95
87
  RAVEN_PAGE_NAMES["UNIFIED_HOME"] = "unified_homepage";
96
- RAVEN_PAGE_NAMES["HOTELS_HOME"] = "hotel_home";
97
- RAVEN_PAGE_NAMES["FLIGHTS_HOME"] = "flights_home";
88
+ RAVEN_PAGE_NAMES["HOTELS_HOME"] = "hotels_homepage";
89
+ RAVEN_PAGE_NAMES["FLIGHTS_HOME"] = "flights_homepage";
98
90
  })(RAVEN_PAGE_NAMES || (RAVEN_PAGE_NAMES = {}));
99
91
  var RAVEN_PLATFORMS;
100
92
  (function (RAVEN_PLATFORMS) {
101
93
  RAVEN_PLATFORMS["DESKTOP"] = "desktop";
102
94
  })(RAVEN_PLATFORMS || (RAVEN_PLATFORMS = {}));
103
- var LOG_IN_TEXT = 'Log in';
104
- var THEME_CONFIG = {
105
- NOVAC: {
106
- headerBackground: 'transparent',
107
- hoverColor: '#FDBA12',
108
- logoFill: '#FFF',
109
- fkcompanyColor: '#FFF',
110
- typographyColor: '#FFF',
111
- loginButtonColorVariant: ButtonColor.NEUTRAL
112
- },
113
- DEFAULT: {
114
- headerBackground: '#FFFFFF',
115
- hoverColor: '#FF4F17',
116
- logoFill: '#FF4F17',
117
- fkcompanyColor: '#1A1A1A',
118
- typographyColor: '#1A1A1A',
119
- loginButtonColorVariant: ButtonColor.PRIMARY
120
- }
121
- };
122
95
 
123
96
  var HeaderContext = createContext(undefined);
124
97
  var useHeaderContext = function () {
@@ -145,54 +118,44 @@ var LobsHeader = function () {
145
118
  alignItems: 'center',
146
119
  justifyContent: 'center',
147
120
  padding: '16px',
148
- background: '#F7FAFF',
121
+ height: '64',
122
+ background: '#F3F5FA',
149
123
  top: '64px',
150
124
  zIndex: 2,
151
125
  css: {
152
- gap: 24
126
+ gap: 40
153
127
  }
154
128
  }, {
155
129
  children: LOB_DATA.map(function (item, index) {
156
- var title = item.title,
157
- link = item.link,
158
- image = item.image;
159
- var isSelected = selectedLOB === title;
160
- return jsx("a", __assign({
161
- href: isSelected ? undefined : link,
162
- style: {
163
- textDecoration: 'none',
164
- pointerEvents: isSelected ? 'none' : 'auto'
130
+ return jsxs(Container, __assign({
131
+ display: 'flex',
132
+ alignItems: 'center',
133
+ cursor: 'pointer',
134
+ css: {
135
+ gap: 8,
136
+ background: selectedLOB === item.title ? '#FFFFFF' : 'transparent',
137
+ borderRadius: selectedLOB === item.title ? '40px' : '0',
138
+ padding: selectedLOB === item.title ? '8px 16px 8px 8px' : '0'
139
+ },
140
+ onClick: function () {
141
+ window.location.href = item.link;
165
142
  }
166
143
  }, {
167
- children: jsxs(Container, __assign({
168
- display: 'flex',
169
- alignItems: 'center',
170
- width: '116px',
171
- height: '48px',
172
- justifyContent: 'center',
173
- cursor: 'pointer',
174
- css: {
175
- gap: 8,
176
- background: isSelected ? '#FFFFFF' : 'transparent',
177
- border: isSelected ? '1px solid #E6E6E6' : '',
178
- borderRadius: '40px',
179
- padding: '8px 16px 8px 8px',
180
- transition: 'background 0.2s ease'
181
- }
144
+ children: [jsx("img", {
145
+ src: item.image,
146
+ alt: item.title,
147
+ width: 32,
148
+ height: 32
149
+ }), jsx(Typography, __assign({
150
+ variant: 'P1',
151
+ style: {
152
+ fontWeight: selectedLOB === item.title ? 600 : 500
153
+ },
154
+ isClickable: true
182
155
  }, {
183
- children: [jsx("img", {
184
- src: image,
185
- alt: title,
186
- width: 32,
187
- height: 32
188
- }), jsx(Typography, __assign({
189
- variant: isSelected ? TypographyVariant.HM3 : TypographyVariant.B1,
190
- isClickable: true
191
- }, {
192
- children: title
193
- }))]
194
- }), index)
195
- }));
156
+ children: item.title
157
+ }))]
158
+ }), index);
196
159
  })
197
160
  }));
198
161
  };
@@ -391,85 +354,11 @@ var useDropdownAnimation = function (isOpen) {
391
354
  };
392
355
  };
393
356
 
394
- var stringifyPayload = function (payload) {
395
- var keys = Object.keys(payload);
396
- var numericValues = [];
397
- keys.forEach(function (key) {
398
- if (numericValues.includes(key)) {
399
- payload[key] = Number(payload[key]);
400
- } else {
401
- payload[key] = '' + payload[key];
402
- }
403
- });
404
- return payload;
405
- };
406
- var isServer = function () {
407
- return typeof window === 'undefined' || !window;
408
- };
409
- var getQueryParam = function (queryParam) {
410
- if (isServer()) {
411
- return '';
412
- }
413
- var urlParams = new URLSearchParams(window.location.search);
414
- return urlParams.get(queryParam);
415
- };
416
- var ravenLoyaltyTypes = function (loyaltyType) {
417
- switch (loyaltyType) {
418
- case 'FkVip':
419
- return 'fk_vip';
420
- case 'FkPremium':
421
- return 'fk_plus_premium';
422
- case 'InsiderIcon':
423
- return 'myntra_insidericon';
424
- case 'InsiderElite':
425
- return 'myntra_insiderelite';
426
- default:
427
- return '';
428
- }
429
- };
430
- var ravenSDKTrigger = function (isUserLoggedIn, eventName, ravenPayload, customRavenPayload, ravenPushCallback, pageName) {
431
- var _a;
432
- if (typeof ravenPushCallback !== 'function') {
433
- console.error('ravenPushCallback is not provided or is not a function');
434
- return;
435
- }
436
- var commonPayload = {
437
- page_name: pageName,
438
- platform: RAVEN_PLATFORMS.DESKTOP,
439
- login_status: isUserLoggedIn ? 'yes' : 'no',
440
- domain: (_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.host
441
- };
442
- var newRavenPayload = stringifyPayload(ravenPayload);
443
- var parsedCustomRavenPayload = stringifyPayload(customRavenPayload);
444
- var finalPayload = __assign(__assign(__assign({}, commonPayload), newRavenPayload), parsedCustomRavenPayload);
445
- try {
446
- if (ravenPushCallback.length === 1) {
447
- ravenPushCallback({
448
- eventName: eventName,
449
- eventData: finalPayload
450
- });
451
- } else {
452
- ravenPushCallback(eventName, finalPayload);
453
- }
454
- } catch (err) {
455
- console.error(err);
456
- return;
457
- }
458
- };
459
-
460
357
  var BusinessDropdownContent = function (_a) {
461
358
  var isOpen = _a.isOpen;
462
- var _b = useHeaderContext(),
463
- isUserLoggedIn = _b.isUserLoggedIn,
464
- ravenPushCallback = _b.ravenPushCallback,
465
- ravenPageName = _b.ravenPageName,
466
- ravenEventName = _b.ravenEventName,
467
- loyaltyType = _b.loyaltyType,
468
- _c = _b.ravenPayload,
469
- ravenPayload = _c === void 0 ? {} : _c;
470
- var _d = useState(0),
471
- leftPosition = _d[0],
472
- setLeftPosition = _d[1];
359
+ var _b = useState(0),
360
+ leftPosition = _b[0],
361
+ setLeftPosition = _b[1];
473
362
  var containerRef = useDropdownAnimation(isOpen).containerRef;
474
363
  useEffect(function () {
475
364
  var updatePosition = function () {
@@ -488,21 +377,6 @@ var BusinessDropdownContent = function (_a) {
488
377
  return window.removeEventListener('resize', updatePosition);
489
378
  };
490
379
  }, [containerRef, leftPosition]);
491
- var handleBusinessDropdownClick = useCallback(function (link, title, ravenActionName) {
492
- var _a;
493
- var utmSource = (_a = getQueryParam('utm_source')) !== null && _a !== void 0 ? _a : 'organic';
494
- var actionName = ravenActionName ? "".concat(ravenActionName, "_business_click") : title ? "".concat(title.toLowerCase(), "_business_click") : '';
495
- var defaultPayload = {
496
- action_name: actionName,
497
- action_type: 'click',
498
- u_utm_source: utmSource,
499
- loyalty_type: ravenLoyaltyTypes(loyaltyType)
500
- };
501
- if (link) {
502
- ravenSDKTrigger(isUserLoggedIn, ravenEventName, defaultPayload, ravenPayload, ravenPushCallback, ravenPageName);
503
- window.location.href = link;
504
- }
505
- }, [isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName, loyaltyType]);
506
380
  return jsxs(Container, __assign({
507
381
  ref: containerRef,
508
382
  backgroundColor: '#fff',
@@ -523,7 +397,10 @@ var BusinessDropdownContent = function (_a) {
523
397
  backgroundColor: '#FFF1EC'
524
398
  }, {
525
399
  children: jsx(Typography, __assign({
526
- variant: 'HM2'
400
+ variant: 'HM2',
401
+ css: {
402
+ lineHeight: '24px'
403
+ }
527
404
  }, {
528
405
  children: BUSINESS_DROPDOWN_HEADING
529
406
  }))
@@ -537,46 +414,32 @@ var BusinessDropdownContent = function (_a) {
537
414
  children: bdConfig.map(function (_a) {
538
415
  var title = _a.title,
539
416
  subtitle = _a.subtitle,
540
- details = _a.details,
541
- link = _a.link,
542
- ravenActionName = _a.ravenActionName;
417
+ details = _a.details;
543
418
  return jsxs(Container, __assign({
544
419
  cursor: 'pointer',
545
- display: 'flex',
546
- flexDirection: 'column',
547
420
  width: '200px',
548
- rowGap: '11px',
549
- className: 'bd-hover-container',
550
- onClick: function () {
551
- return handleBusinessDropdownClick(link, title, ravenActionName);
552
- }
421
+ className: 'bd-hover-container'
553
422
  }, {
554
423
  children: [jsxs(Container, __assign({
555
424
  display: 'flex',
556
- flexDirection: 'column',
557
- rowGap: '4px'
425
+ flexDirection: 'row',
426
+ alignItems: 'center',
427
+ columnGap: '8px'
558
428
  }, {
559
- children: [jsxs(Container, __assign({
560
- display: 'flex',
561
- flexDirection: 'row',
562
- alignItems: 'center',
563
- columnGap: '8px'
429
+ children: [jsx(Typography, __assign({
430
+ variant: 'HM2',
431
+ className: 'color-orange-on-hover'
564
432
  }, {
565
- children: [jsx(Typography, __assign({
566
- variant: 'HM2',
567
- className: 'color-orange-on-hover'
568
- }, {
569
- children: title
570
- })), jsx(AnimatedArrow, {})]
571
- })), jsx(Typography, __assign({
572
- variant: 'B3',
573
- css: {
574
- marginTop: '4px',
575
- opacity: 0.75
576
- }
577
- }, {
578
- children: subtitle
579
- }))]
433
+ children: title
434
+ })), jsx(AnimatedArrow, {})]
435
+ })), jsx(Typography, __assign({
436
+ variant: 'B3',
437
+ css: {
438
+ marginTop: '4px',
439
+ opacity: 0.75
440
+ }
441
+ }, {
442
+ children: subtitle
580
443
  })), jsx(Typography, __assign({
581
444
  variant: 'P3',
582
445
  color: 'subheading',
@@ -654,7 +517,6 @@ var ACCOUNT_OPTIONS_POPUP_CONFIG = [{
654
517
  redirectionLink: 'accounts/personal-data-dashboard'
655
518
  }];
656
519
  var SIGN_OUT_TEXT = 'Logout';
657
- var MY_ACCOUNT_TEXT = 'My Account';
658
520
  var LOGGEDIN_USER_TEXT = 'You are logged in with';
659
521
  var HEADER_ACCOUNTS_OPTIONS_OPEN_BTN_ID = 'header-acc-btn';
660
522
  var ACCOUNT_OPTIONS_CONTAINER_ID = 'account-options';
@@ -666,33 +528,13 @@ var LoyaltyChip = function (_a) {
666
528
  backgroundGradient = _a.backgroundGradient,
667
529
  handleChipClick = _a.handleChipClick,
668
530
  chevronFillColor = _a.chevronFillColor;
669
- var _b = useHeaderContext(),
670
- loyaltyType = _b.loyaltyType,
671
- isUserLoggedIn = _b.isUserLoggedIn,
672
- ravenPushCallback = _b.ravenPushCallback,
673
- ravenPageName = _b.ravenPageName,
674
- _c = _b.ravenPayload,
675
- ravenPayload = _c === void 0 ? {} : _c,
676
- ravenEventName = _b.ravenEventName;
677
- var _d = useState(false),
678
- isHovered = _d[0],
679
- setIsHovered = _d[1];
680
- var handleClick = useCallback(function () {
681
- var _a;
682
- if (handleChipClick) {
683
- handleChipClick();
684
- } else {
685
- var utmSource = (_a = getQueryParam('utm_source')) !== null && _a !== void 0 ? _a : 'organic';
686
- var defaultPayload = {
687
- action_name: "loyalty_account_click",
688
- action_type: 'click',
689
- u_utm_source: utmSource,
690
- loyaltyType: ravenLoyaltyTypes(loyaltyType)
691
- };
692
- ravenSDKTrigger(isUserLoggedIn, ravenEventName, defaultPayload, ravenPayload, ravenPushCallback, ravenPageName);
693
- window.location.href = '/all-offers/loyalty-october';
694
- }
695
- }, [handleChipClick, loyaltyType, isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName]);
531
+ var _b = useState(false),
532
+ isHovered = _b[0],
533
+ setIsHovered = _b[1];
534
+ var handleClick = function () {
535
+ window.location.href = '/';
536
+ handleChipClick && handleChipClick();
537
+ };
696
538
  return jsxs(Container, __assign({
697
539
  display: 'flex',
698
540
  position: 'relative',
@@ -717,7 +559,7 @@ var LoyaltyChip = function (_a) {
717
559
  onClick: handleClick
718
560
  }, {
719
561
  children: [jsx(Container, {
720
- css: {
562
+ style: {
721
563
  content: '""',
722
564
  position: 'absolute',
723
565
  inset: 0,
@@ -726,7 +568,7 @@ var LoyaltyChip = function (_a) {
726
568
  zIndex: -2
727
569
  }
728
570
  }), jsx(Container, {
729
- css: {
571
+ style: {
730
572
  content: '""',
731
573
  position: 'absolute',
732
574
  inset: 0,
@@ -747,7 +589,7 @@ var LoyaltyChip = function (_a) {
747
589
  })), jsx(Container, __assign({
748
590
  display: 'flex',
749
591
  alignItems: 'center',
750
- css: {
592
+ style: {
751
593
  overflow: 'hidden',
752
594
  maxWidth: isHovered ? 16 : 0,
753
595
  transition: 'max-width 0.2s ease-in-out, opacity 0.2s ease-in-out',
@@ -812,46 +654,24 @@ var ExpandableItem = function (_a) {
812
654
  handleChipClick = _a.handleChipClick,
813
655
  value = _a.value,
814
656
  type = _a.type;
815
- var _b = useHeaderContext(),
816
- loyaltyType = _b.loyaltyType,
817
- isUserLoggedIn = _b.isUserLoggedIn,
818
- ravenPushCallback = _b.ravenPushCallback,
819
- ravenPageName = _b.ravenPageName,
820
- ravenEventName = _b.ravenEventName,
821
- _c = _b.ravenPayload,
822
- ravenPayload = _c === void 0 ? {} : _c;
823
- var _d = useState(false),
824
- isHovered = _d[0],
825
- setIsHovered = _d[1];
826
- var handleDefaultClick = useCallback(function () {
827
- var _a;
828
- if (handleChipClick) {
829
- handleChipClick();
830
- } else {
831
- var utmSource = (_a = getQueryParam('utm_source')) !== null && _a !== void 0 ? _a : 'organic';
832
- var defaultPayload = {
833
- action_name: "".concat(type, "_account_click"),
834
- action_type: 'click',
835
- u_utm_source: utmSource,
836
- loyaltyType: ravenLoyaltyTypes(loyaltyType)
837
- };
838
- ravenSDKTrigger(isUserLoggedIn, ravenEventName, defaultPayload, ravenPayload, ravenPushCallback, ravenPageName);
839
- var redirectUrls = {
840
- supercoin: '/all-offers/supercoins/',
841
- wallet: '/accounts/wallet'
842
- };
843
- if (redirectUrls[type]) {
844
- window.location.href = redirectUrls[type];
845
- }
657
+ var _b = useState(false),
658
+ isHovered = _b[0],
659
+ setIsHovered = _b[1];
660
+ var handleDefaultClick = function () {
661
+ if (type === 'supercoins') {
662
+ window.location.href = '/supercoins';
663
+ } else if (type === 'wallet') {
664
+ window.location.href = '/wallet';
846
665
  }
847
- }, [handleChipClick, type, loyaltyType, isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName]);
666
+ handleChipClick && handleChipClick();
667
+ };
848
668
  return jsxs(Container, __assign({
849
669
  display: 'flex',
850
670
  alignItems: 'center',
851
671
  justifyContent: 'center',
852
672
  borderRadius: '8px',
853
673
  cursor: 'pointer',
854
- css: {
674
+ style: {
855
675
  height: 32,
856
676
  paddingLeft: 8,
857
677
  paddingRight: isHovered ? 4 : 8,
@@ -882,7 +702,7 @@ var ExpandableItem = function (_a) {
882
702
  })), jsx(Container, __assign({
883
703
  display: 'flex',
884
704
  alignItems: 'center',
885
- css: {
705
+ style: {
886
706
  overflow: 'hidden',
887
707
  maxWidth: isHovered ? 16 : 0,
888
708
  transition: 'max-width 0.2s ease-in-out, opacity 0.2s ease-in-out',
@@ -910,12 +730,6 @@ var RewardsSection = function () {
910
730
  hideWalletChip = _b.hideWalletChip,
911
731
  hideSupercoinsChip = _b.hideSupercoinsChip,
912
732
  hideLoyaltyChip = _b.hideLoyaltyChip;
913
- var shouldShowLoyalty = loyaltyLoading || selectedLoyaltyType && LOYALTY_DATA[selectedLoyaltyType] && !hideLoyaltyChip;
914
- var shouldShowSupercoin = superCoinsLoading || !hideSupercoinsChip;
915
- var shouldShowWallet = walletLoading || !hideWalletChip;
916
- if (!shouldShowLoyalty && !shouldShowSupercoin && !shouldShowWallet) {
917
- return null;
918
- }
919
733
  return jsxs(Container, __assign({
920
734
  display: 'flex',
921
735
  padding: '0 16px 16px 16px',
@@ -925,20 +739,22 @@ var RewardsSection = function () {
925
739
  gap: '4px'
926
740
  }
927
741
  }, {
928
- children: [loyaltyLoading ? jsx(Shimmer, {
742
+ children: [loyaltyLoading ? jsx(Container, {
929
743
  width: '50px',
930
744
  height: '32px',
931
- borderRadius: '8px'
745
+ borderRadius: '8px',
746
+ backgroundColor: '#efefef'
932
747
  }) : selectedLoyaltyType && LOYALTY_DATA[selectedLoyaltyType] && !hideLoyaltyChip && jsx(LoyaltyChip, {
933
748
  icon: LOYALTY_DATA[selectedLoyaltyType].icon,
934
749
  borderGradient: LOYALTY_DATA[selectedLoyaltyType].borderGradient,
935
750
  backgroundGradient: LOYALTY_DATA[selectedLoyaltyType].backgroundGradient,
936
751
  chevronFillColor: ((_a = LOYALTY_DATA[selectedLoyaltyType]) === null || _a === void 0 ? void 0 : _a.chevronFillColor) || '#FFF',
937
752
  handleChipClick: loyaltyChipClick
938
- }), superCoinsLoading ? jsx(Shimmer, {
753
+ }), superCoinsLoading ? jsx(Container, {
939
754
  width: '50px',
940
755
  height: '32px',
941
- borderRadius: '8px'
756
+ borderRadius: '8px',
757
+ backgroundColor: '#efefef'
942
758
  }) : !hideSupercoinsChip && jsx(ExpandableItem, {
943
759
  icon: jsx(Supercoin, {
944
760
  width: 20,
@@ -946,11 +762,12 @@ var RewardsSection = function () {
946
762
  }),
947
763
  value: superCoinBalance,
948
764
  handleChipClick: supercoinsChipClick,
949
- type: 'supercoin'
950
- }), walletLoading ? jsx(Shimmer, {
765
+ type: 'supercoins'
766
+ }), walletLoading ? jsx(Container, {
951
767
  width: '50px',
952
768
  height: '32px',
953
- borderRadius: '8px'
769
+ borderRadius: '8px',
770
+ backgroundColor: '#efefef'
954
771
  }) : !hideWalletChip && jsx(ExpandableItem, {
955
772
  icon: jsx(Wallet, {
956
773
  width: 20,
@@ -970,60 +787,45 @@ var AccountDropdownContent = function (_a) {
970
787
  userName = _b.userName,
971
788
  userMobileNumber = _b.userMobileNumber,
972
789
  countryCode = _b.countryCode,
973
- userDetailsLoading = _b.userDetailsLoading,
974
- loyaltyType = _b.loyaltyType,
975
- isUserLoggedIn = _b.isUserLoggedIn,
976
- ravenEventName = _b.ravenEventName,
977
- ravenPageName = _b.ravenPageName,
978
- _c = _b.ravenPayload,
979
- ravenPayload = _c === void 0 ? {} : _c,
980
- ravenPushCallback = _b.ravenPushCallback;
790
+ userDetailsLoading = _b.userDetailsLoading;
981
791
  var containerRef = useDropdownAnimation(isOpen).containerRef;
982
- var _d = useMemo(function () {
792
+ var _c = useMemo(function () {
793
+ var userGreeting = userName && "Hello ".concat(userName, "!");
794
+ var phoneNumber = countryCode && userMobileNumber ? "".concat(countryCode, " ").concat(userMobileNumber) : '';
983
795
  return {
984
- userGreeting: userName ? "Hello ".concat(userName, "!") : '',
985
- phoneNumber: countryCode && userMobileNumber ? "".concat(countryCode, " ").concat(userMobileNumber) : ''
796
+ userGreeting: userGreeting,
797
+ phoneNumber: phoneNumber
986
798
  };
987
799
  }, [userName, userMobileNumber, countryCode]),
988
- userGreeting = _d.userGreeting,
989
- phoneNumber = _d.phoneNumber;
990
- var generateRavenPayload = function (actionName) {
991
- var _a;
992
- return {
993
- action_name: actionName.toLowerCase().replace(/[\s-]/g, '') + '_account_click',
994
- action_type: 'click',
995
- u_utm_source: (_a = getQueryParam('utm_source')) !== null && _a !== void 0 ? _a : 'organic',
996
- loyalty_type: ravenLoyaltyTypes(loyaltyType)
800
+ userGreeting = _c.userGreeting,
801
+ phoneNumber = _c.phoneNumber;
802
+ var handleRedirectClick = function (redirectLink) {
803
+ return function () {
804
+ window.location.href = redirectLink;
997
805
  };
998
806
  };
999
- var handleAccountOptionsClick = useCallback(function (text, redirectLink) {
1000
- ravenSDKTrigger(isUserLoggedIn, ravenEventName, generateRavenPayload(text), ravenPayload, ravenPushCallback, ravenPageName);
1001
- window.location.href = redirectLink;
1002
- }, [isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName]);
1003
- useCallback(function () {
1004
- ravenSDKTrigger(isUserLoggedIn, ravenEventName, generateRavenPayload(SIGN_OUT_TEXT), ravenPayload, ravenPushCallback, ravenPageName);
1005
- handleLogoutClick();
1006
- }, [isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName, handleLogoutClick]);
1007
- var positionAccountOptionsDiv = useCallback(function () {
807
+ useEffect(function () {
1008
808
  var headerAccBtn = document.getElementById(HEADER_ACCOUNTS_OPTIONS_OPEN_BTN_ID);
1009
809
  var accountOptionsElem = document.getElementById(ACCOUNT_OPTIONS_CONTAINER_ID);
1010
- if (headerAccBtn && accountOptionsElem) {
1011
- var headerBtnRight = headerAccBtn.getBoundingClientRect().right;
1012
- accountOptionsElem.style.left = "".concat(headerBtnRight - ACCOUNT_OPTIONS_CONTAINER_WIDTH, "px");
1013
- }
1014
- }, []);
1015
- useEffect(function () {
810
+ var positionAccountOptionsDiv = function () {
811
+ var headerBtnRight = headerAccBtn === null || headerAccBtn === void 0 ? void 0 : headerAccBtn.getBoundingClientRect().right;
812
+ if (accountOptionsElem && headerBtnRight) {
813
+ accountOptionsElem.style.left = "".concat(headerBtnRight - ACCOUNT_OPTIONS_CONTAINER_WIDTH, "px");
814
+ }
815
+ };
1016
816
  positionAccountOptionsDiv();
1017
- }, [positionAccountOptionsDiv]);
817
+ }, []);
1018
818
  var renderUserData = function () {
1019
819
  var renderContent = function (loading, content, variant, color) {
1020
820
  return jsx(Typography, __assign({
1021
821
  variant: variant,
1022
822
  color: color
1023
823
  }, {
1024
- children: loading ? jsx(Shimmer, {
824
+ children: loading ? jsx(Container, {
1025
825
  height: variant === 'HM3' ? '18px' : '12px',
1026
- width: variant === 'HM3' ? '140px' : '200px'
826
+ width: variant === 'HM3' ? '140px' : '200px',
827
+ backgroundColor: '#efefef',
828
+ borderRadius: '8px'
1027
829
  }) : content
1028
830
  }));
1029
831
  };
@@ -1059,7 +861,7 @@ var AccountDropdownContent = function (_a) {
1059
861
  }, {
1060
862
  children: [jsx(Container, __assign({
1061
863
  padding: '16px',
1062
- height: '76px'
864
+ height: '72px'
1063
865
  }, {
1064
866
  children: renderUserData()
1065
867
  })), jsx(RewardsSection, {}), jsxs(Container, __assign({
@@ -1068,7 +870,7 @@ var AccountDropdownContent = function (_a) {
1068
870
  padding: '8px',
1069
871
  backgroundColor: 'white',
1070
872
  rowGap: '8px',
1071
- css: {
873
+ style: {
1072
874
  borderBottomLeftRadius: 12,
1073
875
  borderBottomRightRadius: 12
1074
876
  }
@@ -1082,14 +884,12 @@ var AccountDropdownContent = function (_a) {
1082
884
  padding: '8px',
1083
885
  borderRadius: '8px',
1084
886
  cursor: 'pointer',
1085
- onClick: function () {
1086
- return handleAccountOptionsClick(text, redirectionLink);
1087
- }
887
+ onClick: handleRedirectClick(redirectionLink)
1088
888
  }, {
1089
889
  children: jsxs(Container, __assign({
1090
890
  display: 'flex',
1091
891
  cursor: 'pointer',
1092
- css: {
892
+ style: {
1093
893
  columnGap: '8px'
1094
894
  }
1095
895
  }, {
@@ -1106,7 +906,7 @@ var AccountDropdownContent = function (_a) {
1106
906
  }))
1107
907
  }), "account-option-".concat(text));
1108
908
  }), jsx(Divider, {
1109
- css: {
909
+ style: {
1110
910
  borderBottom: '1px dashed #E6E6E6'
1111
911
  }
1112
912
  }), jsxs(Container, __assign({
@@ -1137,49 +937,29 @@ var AccountDropdownContent = function (_a) {
1137
937
  };
1138
938
 
1139
939
  var UserAccount = function () {
1140
- var _a = useHeaderContext(),
1141
- isNovacThemeEnabled = _a.isNovacThemeEnabled,
1142
- ravenEventName = _a.ravenEventName,
1143
- _b = _a.ravenPayload,
1144
- ravenPayload = _b === void 0 ? {} : _b,
1145
- ravenPushCallback = _a.ravenPushCallback,
1146
- isUserLoggedIn = _a.isUserLoggedIn,
1147
- loyaltyType = _a.loyaltyType,
1148
- ravenPageName = _a.ravenPageName;
1149
- var _c = useHoverDropdown({
940
+ var isNovacThemeEnabled = useHeaderContext().isNovacThemeEnabled;
941
+ var _a = useHoverDropdown({
1150
942
  openDelay: 0
1151
943
  }),
1152
- isDropdownVisible = _c.isDropdownVisible,
1153
- handleOnMouseEnter = _c.handleOnMouseEnter,
1154
- handleOnMouseLeave = _c.handleOnMouseLeave,
1155
- handleDropdownMouseEnter = _c.handleDropdownMouseEnter,
1156
- handleDropdownMouseLeave = _c.handleDropdownMouseLeave;
1157
- var _d = useState(false),
1158
- scrolled = _d[0],
1159
- setScrolled = _d[1];
944
+ isDropdownVisible = _a.isDropdownVisible,
945
+ handleOnMouseEnter = _a.handleOnMouseEnter,
946
+ handleOnMouseLeave = _a.handleOnMouseLeave,
947
+ handleDropdownMouseEnter = _a.handleDropdownMouseEnter,
948
+ handleDropdownMouseLeave = _a.handleDropdownMouseLeave;
949
+ var _b = useState(false),
950
+ scrolled = _b[0],
951
+ setScrolled = _b[1];
1160
952
  useEffect(function () {
1161
953
  var handleScroll = function () {
1162
- setScrolled(window.scrollY >= 50);
954
+ setScrolled(window.scrollY >= 100);
1163
955
  };
1164
956
  window.addEventListener('scroll', handleScroll);
1165
957
  return function () {
1166
958
  return window.removeEventListener('scroll', handleScroll);
1167
959
  };
1168
960
  }, []);
1169
- var theme = isNovacThemeEnabled && !scrolled ? THEME_CONFIG.NOVAC : THEME_CONFIG.DEFAULT;
1170
- var hoverColor = theme.hoverColor,
1171
- typographyColor = theme.typographyColor;
1172
- var triggerRavenEventOnHover = useCallback(function () {
1173
- var _a;
1174
- var utmSource = (_a = getQueryParam('utm_source')) !== null && _a !== void 0 ? _a : 'organic';
1175
- var defaultPayload = {
1176
- action_name: "".concat(MY_ACCOUNT_TEXT.toLowerCase().replace(/[\s-]/g, ''), "_header_hover"),
1177
- action_type: 'hover',
1178
- u_utm_source: utmSource,
1179
- loyalty_type: ravenLoyaltyTypes(loyaltyType)
1180
- };
1181
- ravenSDKTrigger(isUserLoggedIn, ravenEventName, defaultPayload, ravenPayload, ravenPushCallback, ravenPageName);
1182
- }, [isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName, loyaltyType]);
961
+ var effectiveNovacThemeEnabled = isNovacThemeEnabled && !scrolled;
962
+ var hoverColor = effectiveNovacThemeEnabled ? '#FFB8A5' : '#FF4F17';
1183
963
  return jsxs(Container, {
1184
964
  children: [jsxs(Container, __assign({
1185
965
  display: 'flex',
@@ -1188,19 +968,18 @@ var UserAccount = function () {
1188
968
  borderRadius: '12px',
1189
969
  height: '100%',
1190
970
  cursor: 'pointer',
1191
- css: {
971
+ style: {
1192
972
  columnGap: 8,
1193
973
  height: 64
1194
974
  },
1195
975
  onMouseEnter: function () {
1196
- handleOnMouseEnter(0);
1197
- triggerRavenEventOnHover();
976
+ return handleOnMouseEnter(0);
1198
977
  },
1199
978
  onMouseLeave: handleOnMouseLeave,
1200
979
  id: HEADER_ACCOUNTS_OPTIONS_OPEN_BTN_ID
1201
980
  }, {
1202
981
  children: [jsx(MyAccount, {
1203
- color: isDropdownVisible ? hoverColor : typographyColor
982
+ color: isDropdownVisible ? hoverColor : effectiveNovacThemeEnabled ? '#FFF' : '#1A1A1A'
1204
983
  }), jsxs(Container, __assign({
1205
984
  display: 'flex',
1206
985
  flexDirection: 'row',
@@ -1211,13 +990,13 @@ var UserAccount = function () {
1211
990
  css: {
1212
991
  cursor: 'pointer'
1213
992
  },
1214
- colorCode: isDropdownVisible ? hoverColor : typographyColor
993
+ colorCode: isDropdownVisible ? hoverColor : effectiveNovacThemeEnabled ? '#FFF' : '#1A1A1A'
1215
994
  }, {
1216
- children: MY_ACCOUNT_TEXT
995
+ children: "My Account"
1217
996
  })), jsx(ChevronDown, {
1218
997
  width: 20,
1219
998
  height: 20,
1220
- fill: isDropdownVisible ? hoverColor : typographyColor
999
+ fill: isDropdownVisible ? hoverColor : effectiveNovacThemeEnabled ? '#FFF' : '#1A1A1A'
1221
1000
  })]
1222
1001
  }))]
1223
1002
  })), jsx(HeaderAnimatedMask, __assign({
@@ -1242,74 +1021,42 @@ var Header = function (props) {
1242
1021
  }));
1243
1022
  };
1244
1023
  var HeaderContent = function () {
1245
- var _a;
1246
- var _b = useHeaderContext(),
1247
- onLoginButtonClick = _b.onLoginButtonClick,
1248
- _c = _b.showAllLobs,
1249
- showAllLobs = _c === void 0 ? false : _c,
1250
- isUserLoggedIn = _b.isUserLoggedIn,
1251
- loyaltyType = _b.loyaltyType,
1252
- _d = _b.isNovacThemeEnabled,
1253
- isNovacThemeEnabled = _d === void 0 ? false : _d,
1254
- _e = _b.ravenPayload,
1255
- ravenPayload = _e === void 0 ? {} : _e,
1256
- ravenPushCallback = _b.ravenPushCallback,
1257
- ravenPageName = _b.ravenPageName,
1258
- ravenEventName = _b.ravenEventName;
1259
- var _f = useState(false),
1260
- scrolled = _f[0],
1261
- setScrolled = _f[1];
1024
+ var _a = useHeaderContext(),
1025
+ onLoginButtonClick = _a.onLoginButtonClick,
1026
+ _b = _a.showAllLobs,
1027
+ showAllLobs = _b === void 0 ? false : _b,
1028
+ isUserLoggedIn = _a.isUserLoggedIn;
1029
+ _a.loyaltyType;
1030
+ var _c = _a.isNovacThemeEnabled,
1031
+ isNovacThemeEnabled = _c === void 0 ? false : _c;
1032
+ _a.ravenPayload;
1033
+ _a.ravenPushCallback;
1034
+ _a.ravenPageName;
1035
+ _a.ravenEventName;
1036
+ var _e = useState(false),
1037
+ scrolled = _e[0],
1038
+ setScrolled = _e[1];
1262
1039
  useEffect(function () {
1263
1040
  var handleScroll = function () {
1264
- setScrolled(window.scrollY >= 50);
1041
+ setScrolled(window.scrollY >= 100);
1265
1042
  };
1266
1043
  window.addEventListener('scroll', handleScroll);
1267
1044
  return function () {
1268
1045
  return window.removeEventListener('scroll', handleScroll);
1269
1046
  };
1270
1047
  }, []);
1271
- var theme = isNovacThemeEnabled && !scrolled ? THEME_CONFIG.NOVAC : THEME_CONFIG.DEFAULT;
1272
- var headerBackground = theme.headerBackground,
1273
- logoFill = theme.logoFill,
1274
- hoverColor = theme.hoverColor,
1275
- fkcompanyColor = theme.fkcompanyColor,
1276
- typographyColor = theme.typographyColor;
1277
- var _g = useHoverDropdown({
1048
+ var effectiveNovacThemeEnabled = isNovacThemeEnabled && !scrolled;
1049
+ var headerBackground = effectiveNovacThemeEnabled ? 'transparent' : '#F7FAFF';
1050
+ var hoverColor = effectiveNovacThemeEnabled ? '#FFB8A5' : '#FF4F17';
1051
+ var _f = useHoverDropdown({
1278
1052
  openDelay: 0
1279
1053
  }),
1280
- isDropdownVisible = _g.isDropdownVisible,
1281
- hoveredElemIndex = _g.hoveredElemIndex,
1282
- handleOnMouseEnter = _g.handleOnMouseEnter,
1283
- handleOnMouseLeave = _g.handleOnMouseLeave,
1284
- handleDropdownMouseEnter = _g.handleDropdownMouseEnter,
1285
- handleDropdownMouseLeave = _g.handleDropdownMouseLeave;
1286
- var utmSource = (_a = getQueryParam('utm_source')) !== null && _a !== void 0 ? _a : 'organic';
1287
- var createPayload = useCallback(function (actionName, actionType) {
1288
- return {
1289
- action_name: actionName,
1290
- action_type: actionType,
1291
- u_utm_source: utmSource,
1292
- loyalty_type: ravenLoyaltyTypes(loyaltyType)
1293
- };
1294
- }, [utmSource, loyaltyType]);
1295
- var handleNavbarOptionsClick = useCallback(function (option) {
1296
- if (option.isClickable && option.link) {
1297
- var actionName = "".concat(option.text.toLowerCase().replace(/\s/g, ''), "_header_click");
1298
- var payload = createPayload(actionName, 'click');
1299
- ravenSDKTrigger(isUserLoggedIn, ravenEventName, payload, ravenPayload, ravenPushCallback, ravenPageName);
1300
- window.location.href = option.link;
1301
- }
1302
- }, [createPayload, isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName]);
1303
- var handleHomeClick = useCallback(function () {
1304
- var payload = createPayload('home_header_click', 'click');
1305
- ravenSDKTrigger(isUserLoggedIn, ravenEventName, payload, ravenPayload, ravenPushCallback, ravenPageName);
1306
- window.location.href = '/';
1307
- }, [createPayload, isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName]);
1308
- var triggerRavenEventOnHover = useCallback(function (option) {
1309
- var actionName = "".concat(option.text.toLowerCase().replace(/\s/g, ''), "_header_hover");
1310
- var payload = createPayload(actionName, 'hover');
1311
- ravenSDKTrigger(isUserLoggedIn, ravenEventName, payload, ravenPayload, ravenPushCallback, ravenPageName);
1312
- }, [createPayload, isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName]);
1054
+ isDropdownVisible = _f.isDropdownVisible,
1055
+ hoveredElemIndex = _f.hoveredElemIndex,
1056
+ handleOnMouseEnter = _f.handleOnMouseEnter,
1057
+ handleOnMouseLeave = _f.handleOnMouseLeave,
1058
+ handleDropdownMouseEnter = _f.handleDropdownMouseEnter,
1059
+ handleDropdownMouseLeave = _f.handleDropdownMouseLeave;
1313
1060
  return jsxs(Fragment, {
1314
1061
  children: [jsx(Container, __assign({
1315
1062
  display: 'flex',
@@ -1324,7 +1071,7 @@ var HeaderContent = function () {
1324
1071
  css: {
1325
1072
  gap: '24px',
1326
1073
  flexShrink: 0,
1327
- borderBottom: headerBackground === 'transparent' ? '' : '1px solid #E6E6E6',
1074
+ borderBottom: effectiveNovacThemeEnabled ? '' : '1px solid #E6E6E6',
1328
1075
  transition: 'background-color 0.3s ease-in-out, border-bottom 0.3s ease-in-out'
1329
1076
  }
1330
1077
  }, {
@@ -1334,7 +1081,7 @@ var HeaderContent = function () {
1334
1081
  justifyContent: 'space-between',
1335
1082
  padding: '0 28px',
1336
1083
  flex: 1,
1337
- css: {
1084
+ style: {
1338
1085
  gap: '24px',
1339
1086
  maxWidth: 1440
1340
1087
  }
@@ -1345,10 +1092,13 @@ var HeaderContent = function () {
1345
1092
  alignItems: 'center',
1346
1093
  justifyContent: 'center',
1347
1094
  cursor: 'pointer',
1348
- onClick: handleHomeClick
1095
+ paddingLeft: '16px',
1096
+ onClick: function () {
1097
+ window.location.href = '/';
1098
+ }
1349
1099
  }, {
1350
1100
  children: [jsx(CTLogo, {
1351
- fillColor: logoFill
1101
+ fillColor: effectiveNovacThemeEnabled ? '#FFF' : '#FF4F17'
1352
1102
  }), jsx(Divider, {
1353
1103
  css: {
1354
1104
  width: 12,
@@ -1358,7 +1108,7 @@ var HeaderContent = function () {
1358
1108
  borderBottom: '1px solid #e0e0e0'
1359
1109
  }
1360
1110
  }), jsx(Fkcompany, {
1361
- color: fkcompanyColor
1111
+ color: effectiveNovacThemeEnabled ? '#FFF' : '#1A1A1A'
1362
1112
  })]
1363
1113
  })), jsxs(Container, __assign({
1364
1114
  display: 'flex',
@@ -1375,18 +1125,11 @@ var HeaderContent = function () {
1375
1125
  columnGap: '4px'
1376
1126
  }, {
1377
1127
  children: NAVBAR_OPTIONS.map(function (option, index) {
1378
- var text = option.text,
1379
- LeftIcon = option.lefticon,
1380
- RightIcon = option.rightIcon,
1381
- isHoverable = option.isHoverable;
1382
1128
  var isHovered = hoveredElemIndex === index;
1383
1129
  return jsxs(Container, {
1384
1130
  children: [jsxs(Container, __assign({
1385
1131
  onMouseEnter: function () {
1386
- handleOnMouseEnter(index);
1387
- if (option.isHoverable) {
1388
- triggerRavenEventOnHover(option);
1389
- }
1132
+ return handleOnMouseEnter(index);
1390
1133
  },
1391
1134
  onMouseLeave: handleOnMouseLeave,
1392
1135
  display: 'flex',
@@ -1398,11 +1141,13 @@ var HeaderContent = function () {
1398
1141
  columnGap: 8,
1399
1142
  height: '64px',
1400
1143
  onClick: function () {
1401
- return handleNavbarOptionsClick(option);
1144
+ if (option.link && option.isClickable) {
1145
+ window.location.href = option.link;
1146
+ }
1402
1147
  }
1403
1148
  }, {
1404
- children: [jsx(LeftIcon, {
1405
- color: isHovered ? hoverColor : typographyColor
1149
+ children: [jsx(option.lefticon, {
1150
+ color: isHovered ? hoverColor : effectiveNovacThemeEnabled ? '#FFF' : '#1A1A1A'
1406
1151
  }), jsxs(Container, __assign({
1407
1152
  display: 'flex',
1408
1153
  flexDirection: 'row',
@@ -1410,31 +1155,31 @@ var HeaderContent = function () {
1410
1155
  }, {
1411
1156
  children: [jsx(Typography, __assign({
1412
1157
  variant: 'B2',
1413
- colorCode: isHovered ? hoverColor : typographyColor,
1158
+ colorCode: isHovered ? hoverColor : effectiveNovacThemeEnabled ? '#FFF' : '#1A1A1A',
1414
1159
  isClickable: true
1415
1160
  }, {
1416
- children: text
1417
- })), RightIcon && jsx(RightIcon, {
1161
+ children: option.text
1162
+ })), option.rightIcon && jsx(option.rightIcon, {
1418
1163
  width: 20,
1419
1164
  height: 20,
1420
- fill: isHovered ? hoverColor : typographyColor
1165
+ fill: isHovered ? hoverColor : effectiveNovacThemeEnabled ? '#FFF' : '#1A1A1A'
1421
1166
  })]
1422
1167
  }))]
1423
1168
  }), "nav-option-".concat(index)), jsx(HeaderAnimatedMask, __assign({
1424
- show: hoveredElemIndex === index && isHoverable && isDropdownVisible,
1169
+ show: hoveredElemIndex === index && option.isHoverable && isDropdownVisible,
1425
1170
  marginTop: '64px',
1426
1171
  handleDropdownMouseEnter: handleDropdownMouseEnter,
1427
1172
  handleDropdownMouseLeave: handleDropdownMouseLeave,
1428
1173
  onMaskClick: handleDropdownMouseLeave
1429
1174
  }, {
1430
1175
  children: jsx(BusinessDropdownContent, {
1431
- isOpen: hoveredElemIndex === index && isHoverable && isDropdownVisible
1176
+ isOpen: hoveredElemIndex === index && option.isHoverable && isDropdownVisible
1432
1177
  })
1433
1178
  }))]
1434
1179
  });
1435
1180
  })
1436
1181
  })), isUserLoggedIn && jsx(Divider, {
1437
- css: {
1182
+ style: {
1438
1183
  width: 12,
1439
1184
  margin: '0 -18px',
1440
1185
  transform: 'rotate(90deg)',
@@ -1448,21 +1193,21 @@ var HeaderContent = function () {
1448
1193
  }, {
1449
1194
  children: jsx(UserAccount, {})
1450
1195
  })) : jsx(Button, __assign({
1451
- className: "".concat(headerBackground === 'transparent' ? 'novac-login-button' : 'login-button'),
1196
+ className: "fw-400 fs-14 ".concat(effectiveNovacThemeEnabled ? 'novac-login-button' : 'login-button'),
1452
1197
  onClick: onLoginButtonClick,
1453
- css: {
1198
+ style: {
1454
1199
  width: 153,
1455
1200
  height: 40,
1456
- border: headerBackground === 'transparent' ? '1px solid #FFFFFF !important' : '1px solid #1A1A1A !important'
1201
+ border: effectiveNovacThemeEnabled ? '1px solid #FFF' : '1px solid #1A1A1A'
1457
1202
  },
1458
1203
  loading: false
1459
1204
  }, {
1460
1205
  children: jsx(Typography, __assign({
1461
1206
  componentNode: 'span',
1462
1207
  variant: 'L2',
1463
- color: headerBackground === 'transparent' ? 'neutral' : 'primary'
1208
+ color: effectiveNovacThemeEnabled ? 'neutral' : 'primary'
1464
1209
  }, {
1465
- children: LOG_IN_TEXT
1210
+ children: "Login"
1466
1211
  }))
1467
1212
  }))
1468
1213
  })]
@@ -1472,5 +1217,5 @@ var HeaderContent = function () {
1472
1217
  });
1473
1218
  };
1474
1219
 
1475
- export { Header, LOBS_VALUES, LoyaltyType, RAVEN_PAGE_NAMES };
1220
+ export { Header, LOBS_VALUES, LoyaltyType };
1476
1221
  //# sourceMappingURL=ct-design-header.esm.js.map