@cleartrip/ct-design-header 1.2.0-SNAPSHOT-remove-hover-delay-test.0 → 1.2.0-SNAPSHOT-final-header-test.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.
Files changed (34) hide show
  1. package/dist/BusinessDropdown/index.d.ts.map +1 -1
  2. package/dist/Header.d.ts.map +1 -1
  3. package/dist/LobsHeader/index.d.ts +1 -2
  4. package/dist/LobsHeader/index.d.ts.map +1 -1
  5. package/dist/RewardsSection/LoyaltyChips.d.ts +1 -1
  6. package/dist/RewardsSection/LoyaltyChips.d.ts.map +1 -1
  7. package/dist/RewardsSection/index.d.ts +1 -2
  8. package/dist/RewardsSection/index.d.ts.map +1 -1
  9. package/dist/UserAccount/UserAccountDropdown.d.ts.map +1 -1
  10. package/dist/UserAccount/accountOptions.d.ts +1 -0
  11. package/dist/UserAccount/accountOptions.d.ts.map +1 -1
  12. package/dist/UserAccount/index.d.ts +1 -2
  13. package/dist/UserAccount/index.d.ts.map +1 -1
  14. package/dist/constants.d.ts +21 -24
  15. package/dist/constants.d.ts.map +1 -1
  16. package/dist/context/HeaderProvider.d.ts +8 -0
  17. package/dist/context/HeaderProvider.d.ts.map +1 -0
  18. package/dist/ct-design-header.browser.cjs.js +1 -1
  19. package/dist/ct-design-header.browser.cjs.js.map +1 -1
  20. package/dist/ct-design-header.browser.esm.js +1 -1
  21. package/dist/ct-design-header.browser.esm.js.map +1 -1
  22. package/dist/ct-design-header.cjs.js +402 -231
  23. package/dist/ct-design-header.cjs.js.map +1 -1
  24. package/dist/ct-design-header.esm.js +404 -233
  25. package/dist/ct-design-header.esm.js.map +1 -1
  26. package/dist/ct-design-header.umd.js +414 -234
  27. package/dist/ct-design-header.umd.js.map +1 -1
  28. package/dist/index.d.ts +1 -0
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/type.d.ts +4 -6
  31. package/dist/type.d.ts.map +1 -1
  32. package/dist/utils.d.ts +15 -0
  33. package/dist/utils.d.ts.map +1 -0
  34. package/package.json +9 -8
@@ -2,12 +2,12 @@
2
2
 
3
3
  var tslib = require('tslib');
4
4
  var jsxRuntime = require('react/jsx-runtime');
5
+ var react = require('react');
5
6
  var ctDesignContainer = require('@cleartrip/ct-design-container');
6
7
  var ctDesignTypography = require('@cleartrip/ct-design-typography');
7
8
  var ctDesignButton = require('@cleartrip/ct-design-button');
8
9
  var ctDesignDivider = require('@cleartrip/ct-design-divider');
9
10
  var ctDesignIcons = require('@cleartrip/ct-design-icons');
10
- var react = require('react');
11
11
  var ctDesignShimmer = require('@cleartrip/ct-design-shimmer');
12
12
 
13
13
  var OFFERS_URL = 'all-offers/?categories=flights';
@@ -16,23 +16,27 @@ var SUPPORT_URL = '/support';
16
16
  var NAVBAR_OPTIONS = [{
17
17
  lefticon: ctDesignIcons.Offers,
18
18
  text: 'Offers',
19
+ ravenActionName: 'offers',
19
20
  isHoverable: false,
20
21
  isClickable: true,
21
22
  link: OFFERS_URL
22
23
  }, {
23
24
  lefticon: ctDesignIcons.BusinessBag,
24
25
  text: 'Business',
26
+ ravenActionName: 'business',
25
27
  rightIcon: ctDesignIcons.ChevronDown,
26
28
  isHoverable: true
27
29
  }, {
28
30
  lefticon: ctDesignIcons.MyTrips,
29
31
  text: 'My Trips',
32
+ ravenActionName: 'mytrips',
30
33
  isHoverable: false,
31
34
  isClickable: true,
32
35
  link: MY_TRIPS_URL
33
36
  }, {
34
37
  lefticon: ctDesignIcons.SupportIcon,
35
38
  text: 'Support',
39
+ ravenActionName: 'support',
36
40
  isHoverable: false,
37
41
  isClickable: true,
38
42
  link: SUPPORT_URL
@@ -68,24 +72,57 @@ var LOB_DATA = [{
68
72
  var bdConfig = [{
69
73
  title: 'AgentBox',
70
74
  subtitle: 'For travel agents',
71
- details: 'One-stop travel solution offering the best deals to our travel agency partners'
75
+ details: 'One-stop travel solution offering the best deals to our travel agency partners',
76
+ link: 'https://agency.cleartrip.com'
72
77
  }, {
73
78
  title: 'OutOfOffice',
74
79
  subtitle: 'For startups, corporates and SMEs',
75
- details: 'Manage corporate business travel, smartly'
80
+ details: 'Manage corporate business travel, smartly',
81
+ link: 'https://ooo.cleartrip.com/',
82
+ ravenActionName: 'ooo'
76
83
  }, {
77
84
  title: 'MICE',
78
85
  subtitle: 'For corporate events',
79
- details: 'An end-to-end management solution for all your corporate events'
86
+ details: 'An end-to-end management solution for all your corporate events',
87
+ link: '/mice'
80
88
  }, {
81
89
  title: 'API',
82
90
  subtitle: 'For developers',
83
- details: 'Unlock seamless integration and scale with our powerful, reliable APIs'
91
+ details: 'Unlock seamless integration and scale with our powerful, reliable APIs',
92
+ link: '/api'
84
93
  }];
85
94
  var BUSINESS_DROPDOWN_HEADING = 'Other business services';
95
+ exports.RAVEN_PAGE_NAMES = void 0;
96
+ (function (RAVEN_PAGE_NAMES) {
97
+ RAVEN_PAGE_NAMES["UNIFIED_HOME"] = "unified_homepage";
98
+ RAVEN_PAGE_NAMES["HOTELS_HOME"] = "hotels_homepage";
99
+ RAVEN_PAGE_NAMES["FLIGHTS_HOME"] = "flights_homepage";
100
+ })(exports.RAVEN_PAGE_NAMES || (exports.RAVEN_PAGE_NAMES = {}));
101
+ var RAVEN_PLATFORMS;
102
+ (function (RAVEN_PLATFORMS) {
103
+ RAVEN_PLATFORMS["DESKTOP"] = "desktop";
104
+ })(RAVEN_PLATFORMS || (RAVEN_PLATFORMS = {}));
105
+
106
+ var HeaderContext = react.createContext(undefined);
107
+ var useHeaderContext = function () {
108
+ var context = react.useContext(HeaderContext);
109
+ if (!context) {
110
+ throw new Error('useHeaderContext must be used within a HeaderProvider');
111
+ }
112
+ return context;
113
+ };
114
+ var HeaderProvider = function (_a) {
115
+ var value = _a.value,
116
+ children = _a.children;
117
+ return jsxRuntime.jsx(HeaderContext.Provider, tslib.__assign({
118
+ value: value
119
+ }, {
120
+ children: children
121
+ }));
122
+ };
86
123
 
87
- var LobsHeader = function (_a) {
88
- var selectedLOB = _a.selectedLOB;
124
+ var LobsHeader = function () {
125
+ var selectedLOB = useHeaderContext().selectedLOB;
89
126
  return jsxRuntime.jsx(ctDesignContainer.Container, tslib.__assign({
90
127
  className: 'flex p-4 flex-middle flex-center p-sticky',
91
128
  css: {
@@ -322,18 +359,83 @@ var useDropdownAnimation = function (isOpen) {
322
359
  };
323
360
  };
324
361
 
362
+ var stringifyPayload = function (payload) {
363
+ var keys = Object.keys(payload);
364
+ var numericValues = [];
365
+ keys.forEach(function (key) {
366
+ if (numericValues.includes(key)) {
367
+ payload[key] = Number(payload[key]);
368
+ } else {
369
+ payload[key] = '' + payload[key];
370
+ }
371
+ });
372
+ return payload;
373
+ };
374
+ var isServer = function () {
375
+ return typeof window === 'undefined' || !window;
376
+ };
377
+ var getQueryParam = function (queryParam) {
378
+ if (isServer()) {
379
+ return '';
380
+ }
381
+ var urlParams = new URLSearchParams(window.location.search);
382
+ return urlParams.get(queryParam);
383
+ };
384
+ var ravenLoyaltyTypes = function (loyaltyType) {
385
+ switch (loyaltyType) {
386
+ case 'FkVip':
387
+ return 'fk_vip';
388
+ case 'FkPremium':
389
+ return 'fk_plus_premium';
390
+ case 'InsiderIcon':
391
+ return 'myntra_insidericon';
392
+ case 'InsiderElite':
393
+ return 'myntra_insiderelite';
394
+ default:
395
+ return '';
396
+ }
397
+ };
398
+ var ravenSDKTrigger = function (isUserLoggedIn, eventName, ravenPayload, customRavenPayload, ravenPushCallback, pageName) {
399
+ var _a;
400
+ var commonPayload = {
401
+ page_name: pageName,
402
+ platform: RAVEN_PLATFORMS.DESKTOP,
403
+ login_status: isUserLoggedIn ? 'yes' : 'no',
404
+ domain: (_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.host
405
+ };
406
+ var newRavenPayload = stringifyPayload(ravenPayload);
407
+ var parsedCustomRavenPayload = stringifyPayload(customRavenPayload);
408
+ try {
409
+ ravenPushCallback(eventName, tslib.__assign(tslib.__assign(tslib.__assign({}, commonPayload), newRavenPayload), parsedCustomRavenPayload));
410
+ } catch (err) {
411
+ console.log(err);
412
+ return;
413
+ }
414
+ };
415
+
325
416
  var BusinessDropdownContent = function (_a) {
326
417
  var isOpen = _a.isOpen;
327
- var _b = react.useState(0),
328
- leftPosition = _b[0],
329
- setLeftPosition = _b[1];
418
+ var _b = useHeaderContext(),
419
+ isUserLoggedIn = _b.isUserLoggedIn,
420
+ ravenPushCallback = _b.ravenPushCallback,
421
+ ravenPageName = _b.ravenPageName,
422
+ ravenEventName = _b.ravenEventName,
423
+ loyaltyType = _b.loyaltyType,
424
+ _c = _b.ravenPayload,
425
+ ravenPayload = _c === void 0 ? {} : _c;
426
+ var _d = react.useState(0),
427
+ leftPosition = _d[0],
428
+ setLeftPosition = _d[1];
330
429
  var containerRef = useDropdownAnimation(isOpen).containerRef;
331
430
  react.useEffect(function () {
332
431
  var updatePosition = function () {
333
432
  if (containerRef.current) {
334
433
  var screenWidth = window.innerWidth;
335
434
  var containerWidth = containerRef.current.offsetWidth || 0;
336
- setLeftPosition((screenWidth - containerWidth) / 2);
435
+ var newLeft = (screenWidth - containerWidth) / 2;
436
+ if (newLeft !== leftPosition) {
437
+ setLeftPosition(newLeft);
438
+ }
337
439
  }
338
440
  };
339
441
  updatePosition();
@@ -341,7 +443,22 @@ var BusinessDropdownContent = function (_a) {
341
443
  return function () {
342
444
  return window.removeEventListener('resize', updatePosition);
343
445
  };
344
- }, []);
446
+ }, [containerRef, leftPosition]);
447
+ var handleBusinessDropdownClick = react.useCallback(function (link, title, ravenActionName) {
448
+ var _a;
449
+ var utmSource = (_a = getQueryParam('utm_source')) !== null && _a !== void 0 ? _a : 'organic';
450
+ var actionName = ravenActionName ? "".concat(ravenActionName, "_business_click") : title ? "".concat(title.toLowerCase(), "_business_click") : '';
451
+ var defaultPayload = {
452
+ action_name: actionName,
453
+ action_type: 'click',
454
+ u_utm_source: utmSource,
455
+ loyalty_type: ravenLoyaltyTypes(loyaltyType)
456
+ };
457
+ if (link) {
458
+ ravenSDKTrigger(isUserLoggedIn, ravenEventName, defaultPayload, ravenPayload, ravenPushCallback, ravenPageName);
459
+ window.location.href = link;
460
+ }
461
+ }, [isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName, loyaltyType]);
345
462
  return jsxRuntime.jsxs(ctDesignContainer.Container, tslib.__assign({
346
463
  ref: containerRef,
347
464
  className: 'bg-neutral-100 o-hidden',
@@ -378,11 +495,16 @@ var BusinessDropdownContent = function (_a) {
378
495
  children: bdConfig.map(function (_a) {
379
496
  var title = _a.title,
380
497
  subtitle = _a.subtitle,
381
- details = _a.details;
498
+ details = _a.details,
499
+ link = _a.link,
500
+ ravenActionName = _a.ravenActionName;
382
501
  return jsxRuntime.jsxs(ctDesignContainer.Container, tslib.__assign({
383
502
  css: {
384
503
  width: '200px'
385
504
  },
505
+ onClick: function () {
506
+ return handleBusinessDropdownClick(link, title, ravenActionName);
507
+ },
386
508
  className: 'bd-hover-container c-pointer'
387
509
  }, {
388
510
  children: [jsxRuntime.jsxs(ctDesignContainer.Container, tslib.__assign({
@@ -418,22 +540,16 @@ var BusinessDropdownContent = function (_a) {
418
540
  }));
419
541
  };
420
542
  var AnimatedArrow = function () {
421
- return jsxRuntime.jsxs(ctDesignContainer.Container, tslib.__assign({
543
+ return jsxRuntime.jsx(ctDesignContainer.Container, tslib.__assign({
422
544
  className: 'bd-arrow-container'
423
545
  }, {
424
- children: [jsxRuntime.jsx(ctDesignContainer.Container, tslib.__assign({
425
- className: 'bd-arrow-wrapper'
426
- }, {
427
- children: jsxRuntime.jsx(ctDesignIcons.ArrowRight, {})
428
- })), jsxRuntime.jsx(ctDesignContainer.Container, tslib.__assign({
429
- className: 'bd-arrow-wrapper'
430
- }, {
431
- children: jsxRuntime.jsx(ctDesignIcons.ArrowRight, {})
432
- })), jsxRuntime.jsx(ctDesignContainer.Container, tslib.__assign({
433
- className: 'bd-arrow-wrapper'
434
- }, {
435
- children: jsxRuntime.jsx(ctDesignIcons.ArrowRight, {})
436
- }))]
546
+ children: tslib.__spreadArray([], Array(3), true).map(function (_, index) {
547
+ return jsxRuntime.jsx(ctDesignContainer.Container, tslib.__assign({
548
+ className: 'bd-arrow-wrapper'
549
+ }, {
550
+ children: jsxRuntime.jsx(ctDesignIcons.ArrowRight, {})
551
+ }), index);
552
+ })
437
553
  }));
438
554
  };
439
555
 
@@ -486,6 +602,7 @@ var ACCOUNT_OPTIONS_POPUP_CONFIG = [{
486
602
  redirectionLink: 'accounts/personal-data-dashboard'
487
603
  }];
488
604
  var SIGN_OUT_TEXT = 'Logout';
605
+ var MY_ACCOUNT_TEXT = 'My Account';
489
606
  var LOGGEDIN_USER_TEXT = 'You are logged in with';
490
607
  var HEADER_ACCOUNTS_OPTIONS_OPEN_BTN_ID = 'header-acc-btn';
491
608
  var ACCOUNT_OPTIONS_CONTAINER_ID = 'account-options';
@@ -496,13 +613,33 @@ var LoyaltyChip = function (_a) {
496
613
  borderGradient = _a.borderGradient,
497
614
  backgroundGradient = _a.backgroundGradient,
498
615
  handleChipClick = _a.handleChipClick;
499
- var _b = react.useState(false),
500
- isHovered = _b[0],
501
- setIsHovered = _b[1];
502
- var handleClick = function () {
503
- window.location.href = '/';
504
- handleChipClick && handleChipClick();
505
- };
616
+ var _b = useHeaderContext(),
617
+ loyaltyType = _b.loyaltyType,
618
+ isUserLoggedIn = _b.isUserLoggedIn,
619
+ ravenPushCallback = _b.ravenPushCallback,
620
+ ravenPageName = _b.ravenPageName,
621
+ _c = _b.ravenPayload,
622
+ ravenPayload = _c === void 0 ? {} : _c,
623
+ ravenEventName = _b.ravenEventName;
624
+ var _d = react.useState(false),
625
+ isHovered = _d[0],
626
+ setIsHovered = _d[1];
627
+ var handleClick = react.useCallback(function () {
628
+ var _a;
629
+ if (handleChipClick) {
630
+ handleChipClick();
631
+ } else {
632
+ var utmSource = (_a = getQueryParam('utm_source')) !== null && _a !== void 0 ? _a : 'organic';
633
+ var defaultPayload = {
634
+ action_name: "loyalty_account_click",
635
+ action_type: 'click',
636
+ u_utm_source: utmSource,
637
+ loyaltyType: ravenLoyaltyTypes(loyaltyType)
638
+ };
639
+ ravenSDKTrigger(isUserLoggedIn, ravenEventName, defaultPayload, ravenPayload, ravenPushCallback, ravenPageName);
640
+ window.location.href = '/all-offers/loyalty-october';
641
+ }
642
+ }, [handleChipClick, loyaltyType, isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName]);
506
643
  return jsxRuntime.jsxs(ctDesignContainer.Container, tslib.__assign({
507
644
  className: 'flex p-relative flex-middle flex-center br-8 o-hidden c-pointer',
508
645
  style: {
@@ -601,17 +738,39 @@ var ExpandableItem = function (_a) {
601
738
  handleChipClick = _a.handleChipClick,
602
739
  value = _a.value,
603
740
  type = _a.type;
604
- var _b = react.useState(false),
605
- isHovered = _b[0],
606
- setIsHovered = _b[1];
607
- var handleDefaultClick = function () {
608
- if (type === 'supercoins') {
609
- window.location.href = '/supercoins';
610
- } else if (type === 'wallet') {
611
- window.location.href = '/wallet';
741
+ var _b = useHeaderContext(),
742
+ loyaltyType = _b.loyaltyType,
743
+ isUserLoggedIn = _b.isUserLoggedIn,
744
+ ravenPushCallback = _b.ravenPushCallback,
745
+ ravenPageName = _b.ravenPageName,
746
+ ravenEventName = _b.ravenEventName,
747
+ _c = _b.ravenPayload,
748
+ ravenPayload = _c === void 0 ? {} : _c;
749
+ var _d = react.useState(false),
750
+ isHovered = _d[0],
751
+ setIsHovered = _d[1];
752
+ var handleDefaultClick = react.useCallback(function () {
753
+ var _a;
754
+ if (handleChipClick) {
755
+ handleChipClick();
756
+ } else {
757
+ var utmSource = (_a = getQueryParam('utm_source')) !== null && _a !== void 0 ? _a : 'organic';
758
+ var defaultPayload = {
759
+ action_name: "".concat(type, "_account_click"),
760
+ action_type: 'click',
761
+ u_utm_source: utmSource,
762
+ loyaltyType: ravenLoyaltyTypes(loyaltyType)
763
+ };
764
+ ravenSDKTrigger(isUserLoggedIn, ravenEventName, defaultPayload, ravenPayload, ravenPushCallback, ravenPageName);
765
+ var redirectUrls = {
766
+ supercoin: '/all-offers/supercoins/',
767
+ wallet: '/accounts/wallet'
768
+ };
769
+ if (redirectUrls[type]) {
770
+ window.location.href = redirectUrls[type];
771
+ }
612
772
  }
613
- handleChipClick && handleChipClick();
614
- };
773
+ }, [handleChipClick, type, loyaltyType, isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName]);
615
774
  return jsxRuntime.jsxs(ctDesignContainer.Container, tslib.__assign({
616
775
  className: "flex flex-middle justify-center br-8 c-pointer",
617
776
  style: {
@@ -651,21 +810,22 @@ var ExpandableItem = function (_a) {
651
810
  }))]
652
811
  }));
653
812
  };
654
- var RewardsSection = function (props) {
655
- var selectedLoyaltyType = props.loyaltyType,
656
- _a = props.fkSupercoinBurnBalance,
657
- superCoinBalance = _a === void 0 ? 0 : _a,
658
- _b = props.walletBalance,
659
- walletBalance = _b === void 0 ? 0 : _b,
660
- loyaltyLoading = props.loyaltyLoading,
661
- superCoinsLoading = props.superCoinsLoading,
662
- walletLoading = props.walletLoading,
663
- walletChipClick = props.walletChipClick,
664
- supercoinsChipClick = props.supercoinsChipClick,
665
- loyaltyChipClick = props.loyaltyChipClick,
666
- hideWalletChip = props.hideWalletChip,
667
- hideSupercoinsChip = props.hideSupercoinsChip,
668
- hideLoyaltyChip = props.hideLoyaltyChip;
813
+ var RewardsSection = function () {
814
+ var _a = useHeaderContext(),
815
+ selectedLoyaltyType = _a.loyaltyType,
816
+ _b = _a.fkSupercoinBurnBalance,
817
+ superCoinBalance = _b === void 0 ? 0 : _b,
818
+ _c = _a.walletBalance,
819
+ walletBalance = _c === void 0 ? 0 : _c,
820
+ loyaltyLoading = _a.loyaltyLoading,
821
+ superCoinsLoading = _a.superCoinsLoading,
822
+ walletLoading = _a.walletLoading,
823
+ walletChipClick = _a.walletChipClick,
824
+ supercoinsChipClick = _a.supercoinsChipClick,
825
+ loyaltyChipClick = _a.loyaltyChipClick,
826
+ hideWalletChip = _a.hideWalletChip,
827
+ hideSupercoinsChip = _a.hideSupercoinsChip,
828
+ hideLoyaltyChip = _a.hideLoyaltyChip;
669
829
  return jsxRuntime.jsxs(ctDesignContainer.Container, tslib.__assign({
670
830
  className: 'flex p-4 pt-0 flex-start flex-gap-1',
671
831
  style: {
@@ -692,7 +852,7 @@ var RewardsSection = function (props) {
692
852
  }),
693
853
  value: superCoinBalance,
694
854
  handleChipClick: supercoinsChipClick,
695
- type: 'supercoins'
855
+ type: 'supercoin'
696
856
  }), walletLoading ? jsxRuntime.jsx(ctDesignShimmer.Shimmer, {
697
857
  width: '50px',
698
858
  height: '32px',
@@ -709,53 +869,58 @@ var RewardsSection = function (props) {
709
869
  }));
710
870
  };
711
871
 
712
- var AccountDropdownContent = function (props) {
713
- var _a = props || {},
714
- handleLogout = _a.handleLogout,
715
- userName = _a.userName,
716
- userMobileNumber = _a.userMobileNumber,
717
- countryCode = _a.countryCode,
718
- userDetailsLoading = _a.userDetailsLoading,
719
- superCoinBalance = _a.fkSupercoinBurnBalance,
720
- walletBalance = _a.walletBalance,
721
- loyaltyType = _a.loyaltyType,
722
- loyaltyLoading = _a.loyaltyLoading,
723
- walletLoading = _a.walletLoading,
724
- superCoinsLoading = _a.superCoinsLoading,
725
- walletChipClick = _a.walletChipClick,
726
- supercoinsChipClick = _a.supercoinsChipClick,
727
- loyaltyChipClick = _a.loyaltyChipClick,
728
- hideLoyaltyChip = _a.hideLoyaltyChip,
729
- hideSupercoinsChip = _a.hideSupercoinsChip,
730
- hideWalletChip = _a.hideWalletChip,
731
- isOpen = _a.isOpen;
872
+ var AccountDropdownContent = function (_a) {
873
+ var isOpen = _a.isOpen;
874
+ var _b = useHeaderContext(),
875
+ handleLogoutClick = _b.handleLogoutClick,
876
+ userName = _b.userName,
877
+ userMobileNumber = _b.userMobileNumber,
878
+ countryCode = _b.countryCode,
879
+ userDetailsLoading = _b.userDetailsLoading,
880
+ loyaltyType = _b.loyaltyType,
881
+ isUserLoggedIn = _b.isUserLoggedIn,
882
+ ravenEventName = _b.ravenEventName,
883
+ ravenPageName = _b.ravenPageName,
884
+ _c = _b.ravenPayload,
885
+ ravenPayload = _c === void 0 ? {} : _c,
886
+ ravenPushCallback = _b.ravenPushCallback;
732
887
  var containerRef = useDropdownAnimation(isOpen).containerRef;
733
- var _b = react.useMemo(function () {
734
- var userGreeting = userName && "Hello ".concat(userName, "!");
735
- var phoneNumber = countryCode && userMobileNumber ? "".concat(countryCode, " ").concat(userMobileNumber) : '';
888
+ var _d = react.useMemo(function () {
736
889
  return {
737
- userGreeting: userGreeting,
738
- phoneNumber: phoneNumber
890
+ userGreeting: userName ? "Hello ".concat(userName, "!") : '',
891
+ phoneNumber: countryCode && userMobileNumber ? "".concat(countryCode, " ").concat(userMobileNumber) : ''
739
892
  };
740
893
  }, [userName, userMobileNumber, countryCode]),
741
- userGreeting = _b.userGreeting,
742
- phoneNumber = _b.phoneNumber;
743
- var handleRedirectClick = function (redirectLink) {
744
- return function () {
745
- window.location.href = redirectLink;
894
+ userGreeting = _d.userGreeting,
895
+ phoneNumber = _d.phoneNumber;
896
+ var generateRavenPayload = function (actionName) {
897
+ var _a;
898
+ return {
899
+ action_name: actionName.toLowerCase().replace(/[\s-]/g, '') + '_account_click',
900
+ action_type: 'click',
901
+ u_utm_source: (_a = getQueryParam('utm_source')) !== null && _a !== void 0 ? _a : 'organic',
902
+ loyalty_type: ravenLoyaltyTypes(loyaltyType)
746
903
  };
747
904
  };
748
- react.useEffect(function () {
905
+ var handleAccountOptionsClick = react.useCallback(function (text, redirectLink) {
906
+ ravenSDKTrigger(isUserLoggedIn, ravenEventName, generateRavenPayload(text), ravenPayload, ravenPushCallback, ravenPageName);
907
+ window.location.href = redirectLink;
908
+ }, [isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName]);
909
+ var handleLogout = react.useCallback(function () {
910
+ ravenSDKTrigger(isUserLoggedIn, ravenEventName, generateRavenPayload(SIGN_OUT_TEXT), ravenPayload, ravenPushCallback, ravenPageName);
911
+ handleLogoutClick();
912
+ }, [isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName, handleLogoutClick]);
913
+ var positionAccountOptionsDiv = react.useCallback(function () {
749
914
  var headerAccBtn = document.getElementById(HEADER_ACCOUNTS_OPTIONS_OPEN_BTN_ID);
750
915
  var accountOptionsElem = document.getElementById(ACCOUNT_OPTIONS_CONTAINER_ID);
751
- var positionAccountOptionsDiv = function () {
752
- var headerBtnRight = headerAccBtn === null || headerAccBtn === void 0 ? void 0 : headerAccBtn.getBoundingClientRect().right;
753
- if (accountOptionsElem && headerBtnRight) {
754
- accountOptionsElem.style.left = "".concat(headerBtnRight - ACCOUNT_OPTIONS_CONTAINER_WIDTH, "px");
755
- }
756
- };
757
- positionAccountOptionsDiv();
916
+ if (headerAccBtn && accountOptionsElem) {
917
+ var headerBtnRight = headerAccBtn.getBoundingClientRect().right;
918
+ accountOptionsElem.style.left = "".concat(headerBtnRight - ACCOUNT_OPTIONS_CONTAINER_WIDTH, "px");
919
+ }
758
920
  }, []);
921
+ react.useEffect(function () {
922
+ positionAccountOptionsDiv();
923
+ }, [positionAccountOptionsDiv]);
759
924
  var renderUserData = function () {
760
925
  var renderContent = function (loading, content, variant, color) {
761
926
  return jsxRuntime.jsx(ctDesignTypography.Typography, tslib.__assign({
@@ -796,20 +961,7 @@ var AccountDropdownContent = function (props) {
796
961
  height: '72px'
797
962
  }, {
798
963
  children: renderUserData()
799
- })), jsxRuntime.jsx(RewardsSection, {
800
- fkSupercoinBurnBalance: superCoinBalance,
801
- walletBalance: walletBalance,
802
- loyaltyType: loyaltyType,
803
- loyaltyLoading: loyaltyLoading,
804
- superCoinsLoading: superCoinsLoading,
805
- walletLoading: walletLoading,
806
- walletChipClick: walletChipClick,
807
- supercoinsChipClick: supercoinsChipClick,
808
- loyaltyChipClick: loyaltyChipClick,
809
- hideLoyaltyChip: hideLoyaltyChip,
810
- hideSupercoinsChip: hideSupercoinsChip,
811
- hideWalletChip: hideWalletChip
812
- }), jsxRuntime.jsxs(ctDesignContainer.Container, tslib.__assign({
964
+ })), jsxRuntime.jsx(RewardsSection, {}), jsxRuntime.jsxs(ctDesignContainer.Container, tslib.__assign({
813
965
  className: 'p-2 flex flex-column',
814
966
  backgroundColor: 'white',
815
967
  style: {
@@ -824,7 +976,9 @@ var AccountDropdownContent = function (props) {
824
976
  redirectionLink = _a.redirectionLink;
825
977
  return jsxRuntime.jsx(ctDesignContainer.Container, tslib.__assign({
826
978
  className: 'p-2 br-8 c-pointer hoverable-container',
827
- onClick: handleRedirectClick(redirectionLink)
979
+ onClick: function () {
980
+ return handleAccountOptionsClick(text, redirectionLink);
981
+ }
828
982
  }, {
829
983
  children: jsxRuntime.jsxs(ctDesignContainer.Container, tslib.__assign({
830
984
  className: 'flex c-pointer',
@@ -863,33 +1017,48 @@ var AccountDropdownContent = function (props) {
863
1017
  }));
864
1018
  };
865
1019
 
866
- var UserAccount = function (props) {
867
- var handleLogout = props.handleLogout,
868
- userDetailsLoading = props.userDetailsLoading,
869
- userName = props.userName,
870
- userMobileNumber = props.userMobileNumber,
871
- countryCode = props.countryCode,
872
- fkSupercoinBurnBalance = props.fkSupercoinBurnBalance,
873
- walletBalance = props.walletBalance,
874
- loyaltyType = props.loyaltyType,
875
- walletLoading = props.walletLoading,
876
- superCoinsLoading = props.superCoinsLoading,
877
- loyaltyLoading = props.loyaltyLoading,
878
- loyaltyChipClick = props.loyaltyChipClick,
879
- supercoinsChipClick = props.supercoinsChipClick,
880
- walletChipClick = props.walletChipClick,
881
- hideLoyaltyChip = props.hideLoyaltyChip,
882
- hideSupercoinsChip = props.hideSupercoinsChip,
883
- hideWalletChip = props.hideWalletChip,
884
- isNovacThemeEnabled = props.isNovacThemeEnabled;
885
- var _a = useHoverDropdown({
1020
+ var UserAccount = function () {
1021
+ var _a = useHeaderContext(),
1022
+ isNovacThemeEnabled = _a.isNovacThemeEnabled,
1023
+ ravenEventName = _a.ravenEventName,
1024
+ _b = _a.ravenPayload,
1025
+ ravenPayload = _b === void 0 ? {} : _b,
1026
+ ravenPushCallback = _a.ravenPushCallback,
1027
+ isUserLoggedIn = _a.isUserLoggedIn,
1028
+ loyaltyType = _a.loyaltyType,
1029
+ ravenPageName = _a.ravenPageName;
1030
+ var _c = useHoverDropdown({
886
1031
  openDelay: 0
887
1032
  }),
888
- isDropdownVisible = _a.isDropdownVisible,
889
- handleOnMouseEnter = _a.handleOnMouseEnter,
890
- handleOnMouseLeave = _a.handleOnMouseLeave,
891
- handleDropdownMouseEnter = _a.handleDropdownMouseEnter,
892
- handleDropdownMouseLeave = _a.handleDropdownMouseLeave;
1033
+ isDropdownVisible = _c.isDropdownVisible,
1034
+ handleOnMouseEnter = _c.handleOnMouseEnter,
1035
+ handleOnMouseLeave = _c.handleOnMouseLeave,
1036
+ handleDropdownMouseEnter = _c.handleDropdownMouseEnter,
1037
+ handleDropdownMouseLeave = _c.handleDropdownMouseLeave;
1038
+ var _d = react.useState(false),
1039
+ scrolled = _d[0],
1040
+ setScrolled = _d[1];
1041
+ react.useEffect(function () {
1042
+ var handleScroll = function () {
1043
+ setScrolled(window.scrollY >= 100);
1044
+ };
1045
+ window.addEventListener('scroll', handleScroll);
1046
+ return function () {
1047
+ return window.removeEventListener('scroll', handleScroll);
1048
+ };
1049
+ }, []);
1050
+ var effectiveNovacThemeEnabled = isNovacThemeEnabled && !scrolled;
1051
+ var triggerRavenEventOnHover = react.useCallback(function () {
1052
+ var _a;
1053
+ var utmSource = (_a = getQueryParam('utm_source')) !== null && _a !== void 0 ? _a : 'organic';
1054
+ var defaultPayload = {
1055
+ action_name: "".concat(MY_ACCOUNT_TEXT.toLowerCase().replace(/[\s-]/g, ''), "_header_hover"),
1056
+ action_type: 'hover',
1057
+ u_utm_source: utmSource,
1058
+ loyalty_type: ravenLoyaltyTypes(loyaltyType)
1059
+ };
1060
+ ravenSDKTrigger(isUserLoggedIn, ravenEventName, defaultPayload, ravenPayload, ravenPushCallback, ravenPageName);
1061
+ }, [isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName, loyaltyType]);
893
1062
  return jsxRuntime.jsxs(ctDesignContainer.Container, {
894
1063
  children: [jsxRuntime.jsxs(ctDesignContainer.Container, tslib.__assign({
895
1064
  className: "flex px-3 py-2 flex-middle br-12 h-100p c-pointer",
@@ -898,26 +1067,27 @@ var UserAccount = function (props) {
898
1067
  height: 64
899
1068
  },
900
1069
  onMouseEnter: function () {
901
- return handleOnMouseEnter(0);
1070
+ handleOnMouseEnter(0);
1071
+ triggerRavenEventOnHover();
902
1072
  },
903
1073
  onMouseLeave: handleOnMouseLeave,
904
1074
  id: HEADER_ACCOUNTS_OPTIONS_OPEN_BTN_ID
905
1075
  }, {
906
1076
  children: [jsxRuntime.jsx(ctDesignIcons.MyAccount, {
907
- color: isDropdownVisible ? '#FF4F17' : isNovacThemeEnabled ? '#FFF' : '#1A1A1A'
1077
+ color: isDropdownVisible ? '#FF4F17' : effectiveNovacThemeEnabled ? '#FFF' : '#1A1A1A'
908
1078
  }), jsxRuntime.jsxs(ctDesignContainer.Container, tslib.__assign({
909
1079
  className: 'flex flex-row flex-middle'
910
1080
  }, {
911
1081
  children: [jsxRuntime.jsx(ctDesignTypography.Typography, tslib.__assign({
912
1082
  variant: 'B2',
913
1083
  className: 'c-pointer',
914
- color: isDropdownVisible ? 'secondary' : isNovacThemeEnabled ? 'neutral' : 'primary'
1084
+ color: isDropdownVisible ? 'secondary' : effectiveNovacThemeEnabled ? 'neutral' : 'primary'
915
1085
  }, {
916
- children: "My Account"
1086
+ children: MY_ACCOUNT_TEXT
917
1087
  })), jsxRuntime.jsx(ctDesignIcons.ChevronDown, {
918
1088
  width: 20,
919
1089
  height: 20,
920
- fill: isDropdownVisible ? '#FF4F17' : isNovacThemeEnabled ? '#FFF' : '#1A1A1A'
1090
+ fill: isDropdownVisible ? '#FF4F17' : effectiveNovacThemeEnabled ? '#FFF' : '#1A1A1A'
921
1091
  })]
922
1092
  }))]
923
1093
  })), jsxRuntime.jsx(HeaderAnimatedMask, tslib.__assign({
@@ -928,23 +1098,6 @@ var UserAccount = function (props) {
928
1098
  onMaskClick: handleDropdownMouseLeave
929
1099
  }, {
930
1100
  children: jsxRuntime.jsx(AccountDropdownContent, {
931
- handleLogout: handleLogout,
932
- userDetailsLoading: userDetailsLoading,
933
- userName: userName,
934
- userMobileNumber: userMobileNumber,
935
- countryCode: countryCode,
936
- loyaltyType: loyaltyType,
937
- walletBalance: walletBalance,
938
- fkSupercoinBurnBalance: fkSupercoinBurnBalance,
939
- walletLoading: walletLoading,
940
- superCoinsLoading: superCoinsLoading,
941
- loyaltyLoading: loyaltyLoading,
942
- loyaltyChipClick: loyaltyChipClick,
943
- walletChipClick: walletChipClick,
944
- supercoinsChipClick: supercoinsChipClick,
945
- hideLoyaltyChip: hideLoyaltyChip,
946
- hideSupercoinsChip: hideSupercoinsChip,
947
- hideWalletChip: hideWalletChip,
948
1101
  isOpen: isDropdownVisible
949
1102
  })
950
1103
  }))]
@@ -952,49 +1105,86 @@ var UserAccount = function (props) {
952
1105
  };
953
1106
 
954
1107
  var Header = function (props) {
955
- var superCoinsLoading = props.superCoinsLoading,
956
- fkSupercoinBurnBalance = props.fkSupercoinBurnBalance,
957
- onLoginButtonClick = props.onLoginButtonClick,
958
- _a = props.showAllLobs,
959
- showAllLobs = _a === void 0 ? false : _a,
960
- selectedLOB = props.selectedLOB,
961
- isUserLoggedIn = props.isUserLoggedIn,
962
- handleLogoutClick = props.handleLogoutClick,
963
- walletBalance = props.walletBalance,
964
- walletLoading = props.walletLoading,
965
- loyaltyLoading = props.loyaltyLoading,
966
- loyaltyType = props.loyaltyType,
967
- userDetailsLoading = props.userDetailsLoading,
968
- userName = props.userName,
969
- userMobileNumber = props.userMobileNumber,
970
- countryCode = props.countryCode,
971
- loyaltyChipClick = props.loyaltyChipClick,
972
- supercoinsChipClick = props.supercoinsChipClick,
973
- walletChipClick = props.walletChipClick,
974
- hideLoyaltyChip = props.hideLoyaltyChip,
975
- hideSupercoinsChip = props.hideSupercoinsChip,
976
- hideWalletChip = props.hideWalletChip;
977
- props.ravenPayload;
978
- props.ravenPushCallback;
979
- var _c = props.isNovacThemeEnabled,
980
- isNovacThemeEnabled = _c === void 0 ? false : _c;
981
- var _d = useHoverDropdown({
1108
+ return jsxRuntime.jsx(HeaderProvider, tslib.__assign({
1109
+ value: props
1110
+ }, {
1111
+ children: jsxRuntime.jsx(HeaderContent, {})
1112
+ }));
1113
+ };
1114
+ var HeaderContent = function () {
1115
+ var _a;
1116
+ var _b = useHeaderContext(),
1117
+ onLoginButtonClick = _b.onLoginButtonClick,
1118
+ _c = _b.showAllLobs,
1119
+ showAllLobs = _c === void 0 ? false : _c,
1120
+ isUserLoggedIn = _b.isUserLoggedIn,
1121
+ loyaltyType = _b.loyaltyType,
1122
+ _d = _b.isNovacThemeEnabled,
1123
+ isNovacThemeEnabled = _d === void 0 ? false : _d,
1124
+ _e = _b.ravenPayload,
1125
+ ravenPayload = _e === void 0 ? {} : _e,
1126
+ ravenPushCallback = _b.ravenPushCallback,
1127
+ ravenPageName = _b.ravenPageName,
1128
+ ravenEventName = _b.ravenEventName;
1129
+ var _f = react.useState(false),
1130
+ scrolled = _f[0],
1131
+ setScrolled = _f[1];
1132
+ react.useEffect(function () {
1133
+ var handleScroll = function () {
1134
+ setScrolled(window.scrollY >= 100);
1135
+ };
1136
+ window.addEventListener('scroll', handleScroll);
1137
+ return function () {
1138
+ return window.removeEventListener('scroll', handleScroll);
1139
+ };
1140
+ }, []);
1141
+ var effectiveNovacThemeEnabled = isNovacThemeEnabled && !scrolled;
1142
+ var headerBackground = effectiveNovacThemeEnabled ? 'transparent' : '#F7FAFF';
1143
+ var _g = useHoverDropdown({
982
1144
  openDelay: 0
983
1145
  }),
984
- isDropdownVisible = _d.isDropdownVisible,
985
- hoveredElemIndex = _d.hoveredElemIndex,
986
- handleOnMouseEnter = _d.handleOnMouseEnter,
987
- handleOnMouseLeave = _d.handleOnMouseLeave,
988
- handleDropdownMouseEnter = _d.handleDropdownMouseEnter,
989
- handleDropdownMouseLeave = _d.handleDropdownMouseLeave;
1146
+ isDropdownVisible = _g.isDropdownVisible,
1147
+ hoveredElemIndex = _g.hoveredElemIndex,
1148
+ handleOnMouseEnter = _g.handleOnMouseEnter,
1149
+ handleOnMouseLeave = _g.handleOnMouseLeave,
1150
+ handleDropdownMouseEnter = _g.handleDropdownMouseEnter,
1151
+ handleDropdownMouseLeave = _g.handleDropdownMouseLeave;
1152
+ var utmSource = (_a = getQueryParam('utm_source')) !== null && _a !== void 0 ? _a : 'organic';
1153
+ var createPayload = react.useCallback(function (actionName, actionType) {
1154
+ return {
1155
+ action_name: actionName,
1156
+ action_type: actionType,
1157
+ u_utm_source: utmSource,
1158
+ loyalty_type: ravenLoyaltyTypes(loyaltyType)
1159
+ };
1160
+ }, [utmSource, loyaltyType]);
1161
+ var handleNavbarOptionsClick = react.useCallback(function (option) {
1162
+ if (option.isClickable && option.link) {
1163
+ var actionName = "".concat(option.text.toLowerCase().replace(/\s/g, ''), "_header_click");
1164
+ var payload = createPayload(actionName, 'click');
1165
+ ravenSDKTrigger(isUserLoggedIn, ravenEventName, payload, ravenPayload, ravenPushCallback, ravenPageName);
1166
+ window.location.href = option.link;
1167
+ }
1168
+ }, [createPayload, isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName]);
1169
+ var handleHomeClick = react.useCallback(function () {
1170
+ var payload = createPayload('home_header_click', 'click');
1171
+ ravenSDKTrigger(isUserLoggedIn, ravenEventName, payload, ravenPayload, ravenPushCallback, ravenPageName);
1172
+ window.location.href = '/';
1173
+ }, [createPayload, isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName]);
1174
+ var triggerRavenEventOnHover = react.useCallback(function (option) {
1175
+ var actionName = "".concat(option.text.toLowerCase().replace(/\s/g, ''), "_header_hover");
1176
+ var payload = createPayload(actionName, 'hover');
1177
+ ravenSDKTrigger(isUserLoggedIn, ravenEventName, payload, ravenPayload, ravenPushCallback, ravenPageName);
1178
+ }, [createPayload, isUserLoggedIn, ravenEventName, ravenPayload, ravenPushCallback, ravenPageName]);
990
1179
  return jsxRuntime.jsxs(jsxRuntime.Fragment, {
991
1180
  children: [jsxRuntime.jsx(ctDesignContainer.Container, tslib.__assign({
992
1181
  className: 'flex t-0 p-sticky w-100p flex-middle flex-center flex-gap-6 flex-no-shrink',
993
1182
  style: {
994
1183
  zIndex: 1000,
995
1184
  height: 64,
996
- borderBottom: isNovacThemeEnabled ? '' : '1px solid #E6E6E6',
997
- background: isNovacThemeEnabled ? '' : '#F7FAFF'
1185
+ borderBottom: effectiveNovacThemeEnabled ? '' : '1px solid #E6E6E6',
1186
+ background: headerBackground,
1187
+ transition: 'background-color 0.3s ease-in-out, border-bottom 0.3s ease-in-out'
998
1188
  }
999
1189
  }, {
1000
1190
  children: jsxRuntime.jsxs(ctDesignContainer.Container, tslib.__assign({
@@ -1006,10 +1196,11 @@ var Header = function (props) {
1006
1196
  }
1007
1197
  }, {
1008
1198
  children: [jsxRuntime.jsxs(ctDesignContainer.Container, tslib.__assign({
1009
- className: 'flex flex-row flex-center flex-middle'
1199
+ className: 'flex flex-row flex-center flex-middle c-pointer',
1200
+ onClick: handleHomeClick
1010
1201
  }, {
1011
1202
  children: [jsxRuntime.jsx(ctDesignIcons.CTLogo, {
1012
- fillColor: isNovacThemeEnabled ? '#FFF' : '#FF4F17'
1203
+ fillColor: effectiveNovacThemeEnabled ? '#FFF' : '#FF4F17'
1013
1204
  }), jsxRuntime.jsx(ctDesignDivider.Divider, {
1014
1205
  style: {
1015
1206
  width: 12,
@@ -1019,7 +1210,7 @@ var Header = function (props) {
1019
1210
  borderBottom: '1px solid #e0e0e0'
1020
1211
  }
1021
1212
  }), jsxRuntime.jsx(ctDesignIcons.Fkcompany, {
1022
- color: isNovacThemeEnabled ? '#FFF' : '#1A1A1A'
1213
+ color: effectiveNovacThemeEnabled ? '#FFF' : '#1A1A1A'
1023
1214
  })]
1024
1215
  })), jsxRuntime.jsxs(ctDesignContainer.Container, tslib.__assign({
1025
1216
  className: 'flex flex-row flex-middle flex-center flex-cg-6'
@@ -1032,7 +1223,10 @@ var Header = function (props) {
1032
1223
  return jsxRuntime.jsxs(ctDesignContainer.Container, {
1033
1224
  children: [jsxRuntime.jsxs(ctDesignContainer.Container, tslib.__assign({
1034
1225
  onMouseEnter: function () {
1035
- return handleOnMouseEnter(index);
1226
+ handleOnMouseEnter(index);
1227
+ if (option.isHoverable) {
1228
+ triggerRavenEventOnHover(option);
1229
+ }
1036
1230
  },
1037
1231
  onMouseLeave: handleOnMouseLeave,
1038
1232
  className: 'flex flex-row flex-middle px-3 py-2 c-pointer p-relative',
@@ -1041,26 +1235,24 @@ var Header = function (props) {
1041
1235
  height: 64
1042
1236
  },
1043
1237
  onClick: function () {
1044
- if (option.isClickable) {
1045
- window.location.href = option.link;
1046
- }
1238
+ return handleNavbarOptionsClick(option);
1047
1239
  }
1048
1240
  }, {
1049
1241
  children: [jsxRuntime.jsx(option.lefticon, {
1050
- color: isHovered ? '#FF4F17' : isNovacThemeEnabled ? '#FFF' : '#1A1A1A'
1242
+ color: isHovered ? '#FF4F17' : effectiveNovacThemeEnabled ? '#FFF' : '#1A1A1A'
1051
1243
  }), jsxRuntime.jsxs(ctDesignContainer.Container, tslib.__assign({
1052
1244
  className: 'flex flex-row flex-middle'
1053
1245
  }, {
1054
1246
  children: [jsxRuntime.jsx(ctDesignTypography.Typography, tslib.__assign({
1055
1247
  variant: 'B2',
1056
- color: isHovered ? 'secondary' : isNovacThemeEnabled ? 'neutral' : 'primary',
1248
+ color: isHovered ? 'secondary' : effectiveNovacThemeEnabled ? 'neutral' : 'primary',
1057
1249
  isClickable: true
1058
1250
  }, {
1059
1251
  children: option.text
1060
1252
  })), option.rightIcon && jsxRuntime.jsx(option.rightIcon, {
1061
1253
  width: 20,
1062
1254
  height: 20,
1063
- fill: isHovered ? '#FF4F17' : isNovacThemeEnabled ? '#FFF' : '#1A1A1A'
1255
+ fill: isHovered ? '#FF4F17' : effectiveNovacThemeEnabled ? '#FFF' : '#1A1A1A'
1064
1256
  })]
1065
1257
  }))]
1066
1258
  }), "nav-option-".concat(index)), jsxRuntime.jsx(HeaderAnimatedMask, tslib.__assign({
@@ -1087,40 +1279,21 @@ var Header = function (props) {
1087
1279
  children: isUserLoggedIn ? jsxRuntime.jsx(ctDesignContainer.Container, tslib.__assign({
1088
1280
  className: 'flex flex-row flex-middle'
1089
1281
  }, {
1090
- children: jsxRuntime.jsx(UserAccount, {
1091
- handleLogout: handleLogoutClick,
1092
- superCoinsLoading: superCoinsLoading,
1093
- fkSupercoinBurnBalance: fkSupercoinBurnBalance,
1094
- walletBalance: walletBalance,
1095
- walletLoading: walletLoading,
1096
- loyaltyLoading: loyaltyLoading,
1097
- loyaltyType: loyaltyType,
1098
- userDetailsLoading: userDetailsLoading,
1099
- userName: userName,
1100
- userMobileNumber: userMobileNumber,
1101
- countryCode: countryCode,
1102
- walletChipClick: walletChipClick,
1103
- supercoinsChipClick: supercoinsChipClick,
1104
- loyaltyChipClick: loyaltyChipClick,
1105
- hideLoyaltyChip: hideLoyaltyChip,
1106
- hideSupercoinsChip: hideSupercoinsChip,
1107
- hideWalletChip: hideWalletChip,
1108
- isNovacThemeEnabled: isNovacThemeEnabled
1109
- })
1282
+ children: jsxRuntime.jsx(UserAccount, {})
1110
1283
  })) : jsxRuntime.jsx(ctDesignButton.Button, tslib.__assign({
1111
- className: "fw-400 fs-14 ".concat(isNovacThemeEnabled ? 'novac-login-button' : 'login-button'),
1284
+ className: "fw-400 fs-14 ".concat(effectiveNovacThemeEnabled ? 'novac-login-button' : 'login-button'),
1112
1285
  onClick: onLoginButtonClick,
1113
1286
  style: {
1114
1287
  width: 153,
1115
1288
  height: 40,
1116
- border: isNovacThemeEnabled ? '1px solid #FFF' : '1px solid #1A1A1A'
1289
+ border: effectiveNovacThemeEnabled ? '1px solid #FFF' : '1px solid #1A1A1A'
1117
1290
  },
1118
1291
  loading: false
1119
1292
  }, {
1120
1293
  children: jsxRuntime.jsx(ctDesignTypography.Typography, tslib.__assign({
1121
1294
  componentNode: 'span',
1122
1295
  variant: 'L2',
1123
- color: isNovacThemeEnabled ? 'neutral' : 'primary'
1296
+ color: effectiveNovacThemeEnabled ? 'neutral' : 'primary'
1124
1297
  }, {
1125
1298
  children: "Login"
1126
1299
  }))
@@ -1128,9 +1301,7 @@ var Header = function (props) {
1128
1301
  })]
1129
1302
  }))]
1130
1303
  }))
1131
- })), showAllLobs && jsxRuntime.jsx(LobsHeader, {
1132
- selectedLOB: selectedLOB
1133
- })]
1304
+ })), showAllLobs && jsxRuntime.jsx(LobsHeader, {})]
1134
1305
  });
1135
1306
  };
1136
1307