@cleartrip/ct-design-header 1.3.0 → 1.4.0-beta-260901-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.
Files changed (40) hide show
  1. package/dist/EliteDropDown/EliteBenefitsContent.d.ts +11 -0
  2. package/dist/EliteDropDown/EliteBenefitsContent.d.ts.map +1 -0
  3. package/dist/EliteDropDown/index.d.ts +7 -0
  4. package/dist/EliteDropDown/index.d.ts.map +1 -0
  5. package/dist/EliteDropDown/style.d.ts +10 -0
  6. package/dist/EliteDropDown/style.d.ts.map +1 -0
  7. package/dist/Header.d.ts.map +1 -1
  8. package/dist/HeaderAnimatedMask /index.d.ts +1 -1
  9. package/dist/HeaderAnimatedMask /index.d.ts.map +1 -1
  10. package/dist/RewardsSection/LoyaltyChips.d.ts +1 -1
  11. package/dist/RewardsSection/LoyaltyChips.d.ts.map +1 -1
  12. package/dist/RewardsSection/index.d.ts.map +1 -1
  13. package/dist/RewardsSection/loyaltyTypes.d.ts +6 -5
  14. package/dist/RewardsSection/loyaltyTypes.d.ts.map +1 -1
  15. package/dist/UserAccount/AccountEliteStrip/EliteStatusBadge.d.ts +8 -0
  16. package/dist/UserAccount/AccountEliteStrip/EliteStatusBadge.d.ts.map +1 -0
  17. package/dist/UserAccount/AccountEliteStrip/index.d.ts +8 -0
  18. package/dist/UserAccount/AccountEliteStrip/index.d.ts.map +1 -0
  19. package/dist/UserAccount/UserAccountDropdown.d.ts.map +1 -1
  20. package/dist/constants.d.ts +29 -3
  21. package/dist/constants.d.ts.map +1 -1
  22. package/dist/ct-design-header.browser.cjs.js +1 -1
  23. package/dist/ct-design-header.browser.cjs.js.map +1 -1
  24. package/dist/ct-design-header.browser.esm.js +1 -1
  25. package/dist/ct-design-header.browser.esm.js.map +1 -1
  26. package/dist/ct-design-header.cjs.js +622 -88
  27. package/dist/ct-design-header.cjs.js.map +1 -1
  28. package/dist/ct-design-header.esm.js +624 -90
  29. package/dist/ct-design-header.esm.js.map +1 -1
  30. package/dist/ct-design-header.umd.js +622 -92
  31. package/dist/ct-design-header.umd.js.map +1 -1
  32. package/dist/hooks/useEliteRaven.d.ts +25 -0
  33. package/dist/hooks/useEliteRaven.d.ts.map +1 -0
  34. package/dist/styles.d.ts +15 -0
  35. package/dist/styles.d.ts.map +1 -1
  36. package/dist/type.d.ts +12 -2
  37. package/dist/type.d.ts.map +1 -1
  38. package/dist/utils.d.ts +33 -1
  39. package/dist/utils.d.ts.map +1 -1
  40. package/package.json +13 -9
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ interface IEliteBenefitsContentProps {
3
+ benefits?: string[];
4
+ ctaText?: string;
5
+ showCta: boolean;
6
+ onCtaClick: () => void;
7
+ hideRedirectionCTA?: boolean;
8
+ }
9
+ declare const EliteBenefitsContent: React.FC<IEliteBenefitsContentProps>;
10
+ export default EliteBenefitsContent;
11
+ //# sourceMappingURL=EliteBenefitsContent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EliteBenefitsContent.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/EliteDropDown/EliteBenefitsContent.tsx"],"names":[],"mappings":";AAMA,UAAU,0BAA0B;IAClC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,QAAA,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,CA6B9D,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ interface IEliteDropDownContentProps {
3
+ isOpen: boolean;
4
+ }
5
+ declare const EliteDropDownContent: React.FC<IEliteDropDownContentProps>;
6
+ export default EliteDropDownContent;
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/EliteDropDown/index.tsx"],"names":[],"mappings":";AAeA,UAAU,0BAA0B;IAClC,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,QAAA,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,CAsE9D,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { CSSProperties } from 'react';
2
+ import { Theme } from '@cleartrip/ct-design-theme';
3
+ export declare const ELITE_DROPDOWN_POSITION_OFFSET = 30;
4
+ export declare const ELITE_DROPDOWN_TOP = "76px";
5
+ export declare const ELITE_DROPDOWN_WIDTH = "360px";
6
+ export declare const ELITE_DROPDOWN_Z_INDEX = 1002;
7
+ export declare const getEliteDropdownContainerStyles: (theme: Theme, contentHeight?: number) => CSSProperties;
8
+ export declare const getEliteBenefitsGridStyles: (theme: Theme) => CSSProperties;
9
+ export declare const getEliteBenefitCardStyles: (theme: Theme) => CSSProperties;
10
+ //# sourceMappingURL=style.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/EliteDropDown/style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAGnD,eAAO,MAAM,8BAA8B,KAAK,CAAC;AACjD,eAAO,MAAM,kBAAkB,SAAS,CAAC;AACzC,eAAO,MAAM,oBAAoB,UAAU,CAAC;AAC5C,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAE3C,eAAO,MAAM,+BAA+B,UAAW,KAAK,kBAAkB,MAAM,KAAG,aAiBrF,CAAC;AAEH,eAAO,MAAM,0BAA0B,UAAW,KAAK,KAAG,aAKxD,CAAC;AAEH,eAAO,MAAM,yBAAyB,UAAW,KAAK,KAAG,aAOvD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../packages/components/Header/src/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAQhE,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAStC,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAMlC,CAAC;AA8NF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../packages/components/Header/src/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAShE,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAUtC,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAMlC,CAAC;AAiQF,eAAe,MAAM,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { PropsWithChildren } from 'react';
2
2
  import { IMaskProps } from './type';
3
- declare function HeaderAnimatedMask({ children, onMaskClick, show, marginTop, handleDropdownMouseEnter, handleDropdownMouseLeave, }: PropsWithChildren<IMaskProps>): import("react/jsx-runtime").JSX.Element;
3
+ declare function HeaderAnimatedMask({ children, onMaskClick, show, marginTop, handleDropdownMouseEnter, handleDropdownMouseLeave, }: PropsWithChildren<IMaskProps>): import("react").JSX.Element;
4
4
  export default HeaderAnimatedMask;
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/HeaderAnimatedMask /index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAa,MAAM,OAAO,CAAC;AAErD,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAGpC,iBAAS,kBAAkB,CAAC,EAC1B,QAAQ,EACR,WAAW,EACX,IAAI,EACJ,SAAS,EACT,wBAAwB,EACxB,wBAAwB,GACzB,EAAE,iBAAiB,CAAC,UAAU,CAAC,2CA2C/B;AAED,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/HeaderAnimatedMask /index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAa,MAAM,OAAO,CAAC;AAErD,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAGpC,iBAAS,kBAAkB,CAAC,EAC1B,QAAQ,EACR,WAAW,EACX,IAAI,EACJ,SAAS,EACT,wBAAwB,EACxB,wBAAwB,GACzB,EAAE,iBAAiB,CAAC,UAAU,CAAC,+BA2C/B;AAED,eAAe,kBAAkB,CAAC"}
@@ -6,6 +6,6 @@ interface LoyaltyChipProps {
6
6
  handleChipClick?: () => void;
7
7
  chevronFillColor?: string;
8
8
  }
9
- declare const LoyaltyChip: ({ icon, borderGradient, backgroundGradient, handleChipClick, chevronFillColor, }: LoyaltyChipProps) => import("react/jsx-runtime").JSX.Element;
9
+ declare const LoyaltyChip: ({ icon, borderGradient, backgroundGradient, handleChipClick, chevronFillColor, }: LoyaltyChipProps) => import("react").JSX.Element;
10
10
  export default LoyaltyChip;
11
11
  //# sourceMappingURL=LoyaltyChips.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LoyaltyChips.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/RewardsSection/LoyaltyChips.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAyB,MAAM,OAAO,CAAC;AAMzD,UAAU,gBAAgB;IACxB,IAAI,EAAE,SAAS,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,QAAA,MAAM,WAAW,qFAMd,gBAAgB,4CAyFlB,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"LoyaltyChips.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/RewardsSection/LoyaltyChips.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAyB,MAAM,OAAO,CAAC;AAYzD,UAAU,gBAAgB;IACxB,IAAI,EAAE,SAAS,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,QAAA,MAAM,WAAW,qFAMd,gBAAgB,gCAwGlB,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/RewardsSection/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAwGhE,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAyE3B,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/RewardsSection/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAyGhE,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAwE3B,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -1,30 +1,31 @@
1
+ /// <reference types="react" />
1
2
  export declare const LOYALTY_DATA: {
2
3
  FkVip: {
3
- icon: import("react/jsx-runtime").JSX.Element;
4
+ icon: import("react").JSX.Element;
4
5
  borderGradient: string;
5
6
  backgroundGradient: string;
6
7
  chevronFillColor: string;
7
8
  };
8
9
  FkPremium: {
9
- icon: import("react/jsx-runtime").JSX.Element;
10
+ icon: import("react").JSX.Element;
10
11
  borderGradient: string;
11
12
  backgroundGradient: string;
12
13
  chevronFillColor: string;
13
14
  };
14
15
  InsiderIcon: {
15
- icon: import("react/jsx-runtime").JSX.Element;
16
+ icon: import("react").JSX.Element;
16
17
  borderGradient: string;
17
18
  backgroundGradient: string;
18
19
  chevronFillColor: string;
19
20
  };
20
21
  InsiderElite: {
21
- icon: import("react/jsx-runtime").JSX.Element;
22
+ icon: import("react").JSX.Element;
22
23
  borderGradient: string;
23
24
  backgroundGradient: string;
24
25
  chevronFillColor: string;
25
26
  };
26
27
  CtLoyalty: {
27
- icon: import("react/jsx-runtime").JSX.Element;
28
+ icon: import("react").JSX.Element;
28
29
  borderGradient: string;
29
30
  backgroundGradient: string;
30
31
  chevronFillColor: string;
@@ -1 +1 @@
1
- {"version":3,"file":"loyaltyTypes.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/RewardsSection/loyaltyTypes.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BxB,CAAC"}
1
+ {"version":3,"file":"loyaltyTypes.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/RewardsSection/loyaltyTypes.tsx"],"names":[],"mappings":";AAGA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BxB,CAAC"}
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { IEliteLoyaltyMetadata } from '../../type';
3
+ interface IEliteStatusBadgeProps {
4
+ metaData: IEliteLoyaltyMetadata;
5
+ }
6
+ declare const EliteStatusBadge: React.FC<IEliteStatusBadgeProps>;
7
+ export default EliteStatusBadge;
8
+ //# sourceMappingURL=EliteStatusBadge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EliteStatusBadge.d.ts","sourceRoot":"","sources":["../../../packages/components/Header/src/UserAccount/AccountEliteStrip/EliteStatusBadge.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAenD,UAAU,sBAAsB;IAC9B,QAAQ,EAAE,qBAAqB,CAAC;CACjC;AAED,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAgBtD,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { IEliteLoyaltyMetadata } from '../../type';
3
+ interface AccountEliteStripProps {
4
+ metaData: IEliteLoyaltyMetadata;
5
+ }
6
+ declare const AccountEliteStrip: React.FC<AccountEliteStripProps>;
7
+ export default AccountEliteStrip;
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/components/Header/src/UserAccount/AccountEliteStrip/index.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAInD,UAAU,sBAAsB;IAC9B,QAAQ,EAAE,qBAAqB,CAAC;CACjC;AAED,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CA8BvD,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"UserAccountDropdown.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/UserAccount/UserAccountDropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAa/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAO/C,QAAA,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAoL1D,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"UserAccountDropdown.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/UserAccount/UserAccountDropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAa/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAgB/C,QAAA,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA4L1D,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
@@ -8,16 +8,34 @@ export declare const MY_TRIPS_URL = "/accounts/trips";
8
8
  export declare const CLEARTRIP_FOR_WORK_URL = "https://business.cleartrip.com/";
9
9
  export declare const SUPPORT_URL = "/support";
10
10
  export declare const PROFILE_DETAILS_URL = "/accounts/profile";
11
+ export declare const ELITE_NAV_TEXT = "Elite";
11
12
  export interface NavbarOption {
12
- lefticon: React.FC<React.SVGProps<SVGSVGElement>>;
13
- text: string;
14
- ravenActionName: string;
13
+ lefticon?: React.FC<React.SVGProps<SVGSVGElement>>;
14
+ text?: string;
15
+ ravenActionName?: string;
15
16
  isHoverable: boolean;
16
17
  isClickable?: boolean;
17
18
  link?: string;
18
19
  rightIcon?: React.FC<React.SVGProps<SVGSVGElement>>;
19
20
  }
20
21
  export declare const NAVBAR_OPTIONS: NavbarOption[];
22
+ export declare const ELITE_HOVER_BUTTON_TEXT = "View membership benefits";
23
+ export declare const ELITE_HOVER_LOGIN_BUTTON_TEXT = "Login to check eligibility";
24
+ export declare const LOYALTY_STATUS: {
25
+ ACTIVE: string;
26
+ INACTIVE: string;
27
+ SUSPENDED: string;
28
+ };
29
+ export declare const DISPLAY_STATUS: {
30
+ ACTIVE: string;
31
+ INACTIVE: string;
32
+ EXPIRING_SOON: string;
33
+ TRACKER_EXPIRING_SOON: string;
34
+ EXPIRED: string;
35
+ ACTIVATING_SOON: string;
36
+ };
37
+ export declare const EliteChipHoverModalBg = "https://rukmini-ct.flixcart.com/f_auto,q_auto/offermgmt-prod/offermgmt/images/banner/desktop_pop_up_elite_bgImage-v2.png";
38
+ export declare const EliteAccountStripBg = "https://rukmini-ct.flixcart.com/fl_progressive,e_sharpen:80,c_fill,dpr_2,f_auto,q_75/offermgmt-prod/offermgmt/images/banner/desktop-accounts-dropdown-elite-bg.png";
21
39
  export declare const LOBS: {
22
40
  FLIGHTS: string;
23
41
  HOTELS: string;
@@ -47,6 +65,14 @@ export declare enum RAVEN_PAGE_NAMES {
47
65
  export declare enum RAVEN_PLATFORMS {
48
66
  DESKTOP = "desktop"
49
67
  }
68
+ export declare const RAVEN_EVENTS: {
69
+ UI_ACTION: string;
70
+ CT_LOYALTY_BENEFITS_POPUP_LOAD: string;
71
+ };
72
+ export declare const RAVEN_ACTIONS: {
73
+ CT_LOYALTY_VIEW_BENEFITS_CLICK: string;
74
+ ELITE_LOGIN_CLICK: string;
75
+ };
50
76
  export declare const LOG_IN_TEXT = "Log in";
51
77
  export declare const THEME_CONFIG: {
52
78
  NOVAC: {
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../packages/components/Header/src/constants.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,eAAO,MAAM,WAAW,aAAa,CAAC;AACtC,eAAO,MAAM,UAAU,YAAY,CAAC;AACpC,eAAO,MAAM,OAAO,SAAS,CAAC;AAC9B,eAAO,MAAM,UAAU,oCAAoC,CAAC;AAC5D,eAAO,MAAM,YAAY,oBAAoB,CAAC;AAC9C,eAAO,MAAM,sBAAsB,oCAAoC,CAAC;AACxE,eAAO,MAAM,WAAW,aAAa,CAAC;AACtC,eAAO,MAAM,mBAAmB,sBAAsB,CAAC;AAEvD,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;CACrD;AAED,eAAO,MAAM,cAAc,EAAE,YAAY,EAgCxC,CAAC;AAEF,eAAO,MAAM,IAAI;;;;;;CAMhB,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;GAgCpB,CAAC;AAEF,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,QAAQ,EAAE,aAAa,EA0BnC,CAAC;AAEF,eAAO,MAAM,yBAAyB,4BAA4B,CAAC;AAEnE,oBAAY,gBAAgB;IAC1B,YAAY,qBAAqB;IACjC,WAAW,eAAe;IAC1B,YAAY,iBAAiB;CAC9B;AAED,oBAAY,eAAe;IACzB,OAAO,YAAY;CACpB;AAED,eAAO,MAAM,WAAW,WAAW,CAAC;AAEpC,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;CAiBxB,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../packages/components/Header/src/constants.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,eAAO,MAAM,WAAW,aAAa,CAAC;AACtC,eAAO,MAAM,UAAU,YAAY,CAAC;AACpC,eAAO,MAAM,OAAO,SAAS,CAAC;AAC9B,eAAO,MAAM,UAAU,oCAAoC,CAAC;AAC5D,eAAO,MAAM,YAAY,oBAAoB,CAAC;AAC9C,eAAO,MAAM,sBAAsB,oCAAoC,CAAC;AACxE,eAAO,MAAM,WAAW,aAAa,CAAC;AACtC,eAAO,MAAM,mBAAmB,sBAAsB,CAAC;AACvD,eAAO,MAAM,cAAc,UAAU,CAAC;AAEtC,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;IACnD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;CACrD;AAED,eAAO,MAAM,cAAc,EAAE,YAAY,EAsCxC,CAAC;AAEF,eAAO,MAAM,uBAAuB,6BAA6B,CAAC;AAClE,eAAO,MAAM,6BAA6B,+BAA+B,CAAC;AAE1E,eAAO,MAAM,cAAc;;;;CAI1B,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;CAO1B,CAAC;AAEF,eAAO,MAAM,qBAAqB,6HAC0F,CAAC;AAC7H,eAAO,MAAM,mBAAmB,uKACsI,CAAC;AAEvK,eAAO,MAAM,IAAI;;;;;;CAMhB,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;GAgCpB,CAAC;AAEF,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,QAAQ,EAAE,aAAa,EA0BnC,CAAC;AAEF,eAAO,MAAM,yBAAyB,4BAA4B,CAAC;AAEnE,oBAAY,gBAAgB;IAC1B,YAAY,qBAAqB;IACjC,WAAW,eAAe;IAC1B,YAAY,iBAAiB;CAC9B;AAED,oBAAY,eAAe;IACzB,OAAO,YAAY;CACpB;AAED,eAAO,MAAM,YAAY;;;CAGxB,CAAC;AAEF,eAAO,MAAM,aAAa;;;CAGzB,CAAC;AAEF,eAAO,MAAM,WAAW,WAAW,CAAC;AAEpC,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;CAiBxB,CAAC"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("tslib"),n=require("react/jsx-runtime"),r=require("react"),t=require("@cleartrip/ct-design-container"),o=require("@cleartrip/ct-design-typography"),i=require("@cleartrip/ct-design-button"),a=require("@cleartrip/ct-design-divider"),s=require("@cleartrip/ct-design-icons"),c=require("styled-components");function l(e){return e&&e.__esModule?e:{default:e}}var d,u,p=l(c),g=[{lefticon:s.Offers,text:"Offers",ravenActionName:"offers",isHoverable:!1,isClickable:!0,link:"/all-offers/?categories=flights"},{lefticon:s.BusinessBag,text:"Business",ravenActionName:"business",rightIcon:s.ChevronDown,isHoverable:!0},{lefticon:s.MyTrips,text:"My Trips",ravenActionName:"mytrips",isHoverable:!1,isClickable:!0,link:"/accounts/trips"},{lefticon:s.SupportIcon,text:"Support",ravenActionName:"support",isHoverable:!1,isClickable:!0,link:"/support"}],h=[{title:"Flights",image:"https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Flights.png?cache=true",link:"/flights"},{title:"Hotels",image:"https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Hotels.png?cache=true",link:"/hotels"},{title:"Buses",image:"https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Buses.png?cache=true",link:"/bus"},{title:"Holidays",image:"https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Packages.png?cache=true",link:"/holidays"}],f=[{title:"AgentBox",subtitle:"For travel agents",details:"One-stop travel solution offering the best deals to our travel agency partners",link:"https://agency.cleartrip.com"},{title:"OutOfOffice",subtitle:"For startups, corporates and SMEs",details:"Manage corporate business travel, smartly",link:"https://ooo.cleartrip.com/",ravenActionName:"ooo"},{title:"MICE",subtitle:"For corporate events",details:"An end-to-end management solution for all your corporate events",link:"https://business.cleartrip.com/"},{title:"API",subtitle:"For developers",details:"Unlock seamless integration and scale with our powerful, reliable APIs",link:"https://business.cleartrip.com/api-customers/more-details"}];exports.RAVEN_PAGE_NAMES=void 0,(d=exports.RAVEN_PAGE_NAMES||(exports.RAVEN_PAGE_NAMES={})).UNIFIED_HOME="unified_homepage",d.HOTELS_HOME="hotel_home",d.FLIGHTS_HOME="flights_home",function(e){e.DESKTOP="desktop"}(u||(u={}));var x={NOVAC:{headerBackground:"transparent",hoverColor:"#FDBA12",logoFill:"#FFF",fkcompanyColor:"#FFF",typographyColor:"#FFF",loginButtonColorVariant:i.ButtonColor.NEUTRAL},DEFAULT:{headerBackground:"#FFFFFF",hoverColor:"#FF4F17",logoFill:"#FF4F17",fkcompanyColor:"#1A1A1A",typographyColor:"#1A1A1A",loginButtonColorVariant:i.ButtonColor.PRIMARY}},m=r.createContext(void 0),v=function(){var e=r.useContext(m);if(!e)throw new Error("useHeaderContext must be used within a HeaderProvider");return e},y=function(r){var t=r.value,o=r.children;return n.jsx(m.Provider,e.__assign({value:t},{children:o}))},_=function(e){var n=Object.keys(e),r=[];return n.forEach((function(n){r.includes(n)?e[n]=Number(e[n]):e[n]=""+e[n]})),e},C=function(e){return"undefined"!=typeof window&&window?new URLSearchParams(window.location.search).get(e):""},b=function(e){switch(e){case"FkVip":return"fk_vip";case"FkPremium":return"fk_plus_premium";case"InsiderIcon":return"myntra_insidericon";case"InsiderElite":return"myntra_insiderelite";default:return""}},k=function(n,r,t,o,i,a){var s;if("function"==typeof i){var c={page_name:a,platform:u.DESKTOP,login_status:n?"yes":"no",domain:null===(s=null===window||void 0===window?void 0:window.location)||void 0===s?void 0:s.hostname},l=_(t),d=_(o),p=e.__assign(e.__assign(e.__assign({},c),l),d);try{1===i.length?i({eventName:r,eventData:p}):i(r,p)}catch(e){return void console.error(e)}}else console.error("ravenPushCallback is not provided or is not a function")},w=function(){var r=v(),i=r.selectedLOB,a=r.isUserLoggedIn,s=r.ravenEventName,c=r.ravenPageName,l=r.ravenPayload,d=void 0===l?{}:l,u=r.ravenPushCallback;return n.jsx(t.Container,e.__assign({display:"flex",alignItems:"center",justifyContent:"center",padding:"16px",background:"#F7FAFF",top:"64px",zIndex:2,css:{gap:24}},{children:h.map((function(r,l){var p=r.title,g=r.link,h=r.image,f=i===p;return n.jsx("a",e.__assign({href:f?void 0:g,style:{textDecoration:"none",pointerEvents:f?"none":"auto"},onClick:function(){return function(e,n){if(!n){var r={action_name:"".concat(e.toLowerCase(),"_tab_click"),action_type:"click"};k(a,s,r,d,u,c)}}(p,f)}},{children:n.jsxs(t.Container,e.__assign({display:"flex",alignItems:"center",width:"116px",height:"48px",justifyContent:"center",cursor:"pointer",css:{gap:8,background:f?"#FFFFFF":"transparent",border:f?"1px solid #E6E6E6":"",borderRadius:"40px",padding:"8px 16px 8px 8px",transition:"background 0.2s ease"}},{children:[n.jsx("img",{src:h,alt:p,width:32,height:32}),n.jsx(o.Typography,e.__assign({variant:f?o.TypographyVariant.HM3:o.TypographyVariant.B1,isClickable:!0},{children:p}))]}))}),l)}))}))};function j(o){var i=o.children,a=o.onMaskClick,s=o.show,c=o.marginTop,l=o.handleDropdownMouseEnter,d=o.handleDropdownMouseLeave;r.useEffect((function(){return s&&(document.body.style.overflow="hidden"),function(){document.body.style.overflow="initial"}}),[s]);var u=function(e,n){var t=r.useState(e),o=t[0],i=t[1],a=r.useRef();return r.useEffect((function(){return e?i(e):a.current=setTimeout((function(){i(!1)}),n),function(){(null==a?void 0:a.current)&&clearTimeout(a.current)}}),[e]),o}(s,300),p=function(e,n){var t=r.useState(!1),o=t[0],i=t[1],a=r.useRef();return r.useEffect((function(){return e&&!o?setTimeout((function(){i(!0)}),0):!e&&o&&(a.current=setTimeout((function(){return i(!1)}),n)),function(){a&&a.current&&clearTimeout(a.current)}}),[n,e]),o}(s,100),g=p;return n.jsxs(n.Fragment,{children:[u&&n.jsx(t.Container,{id:"mask-container",css:{position:"fixed",backgroundColor:"#000",opacity:g?.4:0,width:"100%",height:"100vh",left:0,top:c||0,zIndex:9,transition:"opacity 300ms ease-in"},onClick:a}),u&&n.jsx(t.Container,e.__assign({onMouseEnter:l,onMouseLeave:d},{children:i}))]})}var F,E,L,T,I,M,A=function(e){var n=void 0===e?{}:e,t=n.closeDelay,o=void 0===t?0:t,i=n.openDelay,a=void 0===i?500:i,s=Math.max(o,150),c=r.useState(!1),l=c[0],d=c[1],u=r.useState(null),p=u[0],g=u[1],h=r.useRef(null),f=r.useRef(null),x=r.useRef(!1),m=r.useCallback((function(e){h.current&&clearTimeout(h.current),f.current&&clearTimeout(f.current),x.current=!1,f.current=setTimeout((function(){d(!0),x.current||g(e)}),a)}),[a]),v=r.useCallback((function(){x.current=!0,h.current=setTimeout((function(){d(!1),g(null)}),s)}),[s]),y=r.useCallback((function(){h.current&&clearTimeout(h.current)}),[]),_=r.useCallback((function(){x.current=!0,(null==h?void 0:h.current)&&clearTimeout(h.current),h.current=setTimeout((function(){d(!1),g(null)}),s)}),[]);return r.useEffect((function(){var e=function(e){e.clientY<=0&&(d(!1),g(null))};return window.addEventListener("mouseleave",e),function(){window.removeEventListener("mouseleave",e)}}),[]),{isDropdownVisible:l,hoveredElemIndex:p,handleOnMouseEnter:m,handleOnMouseLeave:v,handleDropdownMouseEnter:y,handleDropdownMouseLeave:_}},D=function(e){var n=r.useRef(null);return r.useEffect((function(){e?function(){if(n.current){var e=n.current.scrollHeight;n.current.style.maxHeight="".concat(e/2,"px"),n.current.style.opacity="0",requestAnimationFrame((function(){n.current&&(n.current.style.transition="max-height 0.3s ease-in-out, opacity 0.3s ease-in-out",n.current.style.maxHeight="".concat(e,"px"),n.current.style.opacity="1")}))}}():function(){if(n.current){var e=n.current.scrollHeight;n.current.style.transition="max-height 0.3s ease-in-out, opacity 0.3s ease-in-out",n.current.style.maxHeight="".concat(e/2,"px"),n.current.style.opacity="0",setTimeout((function(){n.current&&(n.current.style.maxHeight="0px")}),300)}}()}),[e]),{containerRef:n}},N={transition:"background-color 0.2s ease-in-out","&:hover":{backgroundColor:"#ECF3FF"}},B={transition:"background-color 0.2s ease-in-out","&:hover":{backgroundColor:"#FBEFEF"}},P=c.keyframes(F||(F=e.__makeTemplateObject(["\n from {\n transform: translateX(-20px);\n }\n to {\n transform: translateX(0px);\n }\n"],["\n from {\n transform: translateX(-20px);\n }\n to {\n transform: translateX(0px);\n }\n"]))),R=c.keyframes(E||(E=e.__makeTemplateObject(["\n from {\n transform: translateX(-20.01px);\n }\n to {\n transform: translateX(0px);\n }\n"],["\n from {\n transform: translateX(-20.01px);\n }\n to {\n transform: translateX(0px);\n }\n"]))),S={display:"flex",backgroundColor:"black",transition:"background-color 200ms ease","flex-direction":"row",justifyContent:"center",width:"20px",height:"20px",overflow:"hidden",borderRadius:"50%"},H=function(){return n.jsx(t.Container,e.__assign({className:"bd-arrow-container-js",css:S},{children:e.__spreadArray([],Array(3),!0).map((function(r,o){return n.jsx(t.Container,e.__assign({className:"bd-arrow-wrapper-js",display:"flex",alignItems:"center"},{children:n.jsx(s.ArrowRight,{})}),o)}))}))},O=p.default.div.withConfig({displayName:"BusinessDropdown__BDHoverContainer",componentId:"sc-1tsshe4-0"})(L||(L=e.__makeTemplateObject(["\n cursor: pointer;\n width: 200px;\n &:hover {\n .bd-arrow-container-js {\n background-color: rgba(255, 79, 23, 1);\n transition: color 200ms ease;\n }\n .bd-arrow-wrapper-js {\n animation: "," 200ms linear;\n display: flex;\n }\n .color-orange-on-hover-js {\n color: rgba(255, 79, 23, 1);\n transition: background-color 200ms ease;\n }\n }\n &:not(:hover) .bd-arrow-wrapper-js {\n animation: "," 200ms linear backwards;\n }\n"],["\n cursor: pointer;\n width: 200px;\n &:hover {\n .bd-arrow-container-js {\n background-color: rgba(255, 79, 23, 1);\n transition: color 200ms ease;\n }\n .bd-arrow-wrapper-js {\n animation: "," 200ms linear;\n display: flex;\n }\n .color-orange-on-hover-js {\n color: rgba(255, 79, 23, 1);\n transition: background-color 200ms ease;\n }\n }\n &:not(:hover) .bd-arrow-wrapper-js {\n animation: "," 200ms linear backwards;\n }\n"])),P,R),G=function(i){var a=i.isOpen,s=v(),c=s.isUserLoggedIn,l=s.ravenPushCallback,d=s.ravenPageName,u=s.ravenEventName,p=s.loyaltyType,g=s.ravenPayload,h=void 0===g?{}:g,x=r.useState(0),m=x[0],y=x[1],_=D(a).containerRef;r.useEffect((function(){var e=function(){if(_.current){var e=(window.innerWidth-(_.current.offsetWidth||0))/2;e!==m&&y(e)}};return e(),window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[_,m]);var w=r.useCallback((function(e,n,r){var t,o=null!==(t=C("utm_source"))&&void 0!==t?t:"organic",i={action_name:r?"".concat(r,"_business_click"):n?"".concat(n.toLowerCase(),"_business_click"):"",action_type:"click",u_utm_source:o,loyalty_type:b(p)};e&&(k(c,u,i,h,l,d),window.location.href=e)}),[c,u,h,l,d,p]);return n.jsxs(t.Container,e.__assign({ref:_,backgroundColor:"#fff",top:"76px",position:"fixed",left:"".concat(m,"px"),borderRadius:24,boxShadow:"0px 8px 24px 0px rgba(26, 26, 26, 0.10)",width:"fit-content",zIndex:1002,css:{overflow:"hidden",opacity:0}},{children:[n.jsx(t.Container,e.__assign({padding:"20px 24px 20px 24px",backgroundColor:"#FFF1EC"},{children:n.jsx(o.Typography,e.__assign({variant:"HM2"},{children:"Other business services"}))})),n.jsx(t.Container,e.__assign({display:"flex",flexDirection:"row",padding:"24px",columnGap:"48px",width:"fit-content"},{children:f.map((function(r){var i=r.title,a=r.subtitle,s=r.details,c=r.link,l=r.ravenActionName;return n.jsxs(O,e.__assign({className:"bd-hover-container-js",onClick:function(){return w(c,i,l)}},{children:[n.jsxs(t.Container,e.__assign({display:"flex",flexDirection:"column",rowGap:"4px"},{children:[n.jsxs(t.Container,e.__assign({display:"flex",flexDirection:"row",alignItems:"center",columnGap:"8px"},{children:[n.jsx(o.Typography,e.__assign({variant:"HM2",className:"color-orange-on-hover-js",css:{transition:"color 200ms ease"}},{children:i})),n.jsx(H,{})]})),n.jsx(o.Typography,e.__assign({variant:"B3",css:{marginTop:"4px",opacity:.75}},{children:a}))]})),n.jsx(o.Typography,e.__assign({variant:"P3",color:"subheading",css:{marginTop:"12px"}},{children:s}))]}),i)}))}))]}))},V=[{text:"My Profile",icon:n.jsx(s.MyAccount,{width:24,height:24}),redirectionLink:"/accounts/profile"},{text:"My Trips",icon:n.jsx(s.MyTrips,{width:24,height:24}),redirectionLink:"/accounts/trips"},{text:"Saved Cards",icon:n.jsx(s.SavedCard,{}),redirectionLink:"/accounts/expressway"},{text:"Saved Travellers",icon:n.jsx(s.Travellers,{width:24,height:24}),redirectionLink:"/account/travellers"},{text:"Hi-Five",icon:n.jsx(s.HiFive,{}),redirectionLink:"/accounts/hi-five?src=fh"},{text:"Wallet",icon:n.jsx(s.Wallet,{width:24,height:24}),redirectionLink:"/accounts/wallet"},{text:"Settings",icon:n.jsx(s.SettingsCog,{width:24,height:24}),redirectionLink:"/account/settings"},{text:"Privacy Rights",icon:n.jsx(s.PrivacyRights,{}),redirectionLink:"/accounts/personal-data-dashboard"}],U="Logout",W="My Account",q="You are logged in with",z="header-acc-btn",X="account-options",Y=function(o){var i=o.icon,a=o.borderGradient,c=o.backgroundGradient,l=o.handleChipClick,d=o.chevronFillColor,u=v(),p=u.loyaltyType,g=u.isUserLoggedIn,h=u.ravenPushCallback,f=u.ravenPageName,x=u.ravenPayload,m=void 0===x?{}:x,y=u.ravenEventName,_=r.useState(!1),w=_[0],j=_[1],F=r.useCallback((function(){var e;if(l)l();else{var n={action_name:"loyalty_account_click",action_type:"click",u_utm_source:null!==(e=C("utm_source"))&&void 0!==e?e:"organic",loyaltyType:b(p)};k(g,y,n,m,h,f),window.location.href="/all-offers/loyalty-october"}}),[l,p,g,y,m,h,f]);return n.jsxs(t.Container,e.__assign({display:"flex",position:"relative",alignItems:"center",justifyContent:"center",borderRadius:"8px",cursor:"pointer",paddingLeft:"8px",paddingRight:w?"4px":"8px",css:{overflow:"hidden",height:32,paddingLeft:8,transition:"padding-right 0.2s ease-in-out"},onMouseEnter:function(){return j(!0)},onMouseLeave:function(){return j(!1)},onClick:F},{children:[n.jsx(t.Container,{css:{content:'""',position:"absolute",inset:0,borderRadius:"inherit",background:c,zIndex:-2}}),n.jsx(t.Container,{css:{content:'""',position:"absolute",inset:0,borderRadius:"inherit",padding:"1px",background:a,WebkitMask:"linear-gradient(white, white) content-box, linear-gradient(white, white)",WebkitMaskComposite:"destination-out",maskComposite:"exclude",zIndex:-1}}),n.jsx(t.Container,e.__assign({display:"flex",alignItems:"center",position:"relative"},{children:i})),n.jsx(t.Container,e.__assign({display:"flex",alignItems:"center",css:{overflow:"hidden",maxWidth:w?16:0,transition:"max-width 0.2s ease-in-out, opacity 0.2s ease-in-out",opacity:w?.5:0}},{children:n.jsx(s.HeaderChevronRight,{color:d})}))]}))};exports.LOBS_VALUES=void 0,(T=exports.LOBS_VALUES||(exports.LOBS_VALUES={})).FLIGHTS="Flights",T.HOTELS="Hotels",T.BUSES="Buses",T.TRAINS="Trains",T.HOLIDAYS="Holidays",exports.LoyaltyType=void 0,(I=exports.LoyaltyType||(exports.LoyaltyType={})).FkVip="FkVip",I.FkPremium="FkPremium",I.InsiderIcon="InsiderIcon",I.InsiderElite="InsiderElite",I.CtLoyalty="CtLoyalty";var K=((M={})[exports.LoyaltyType.FkVip]={icon:n.jsx(s.FkBlackIcon,{}),borderGradient:"linear-gradient(217.07deg, #0B182A 19.65%, #434E57 54.8%, #595952 89.95%)",backgroundGradient:"linear-gradient(217.07deg, #0B182A 19.65%, #434E57 54.8%, #595952 89.95%)",chevronFillColor:"#FFF"},M[exports.LoyaltyType.FkPremium]={icon:n.jsx(s.FkGold,{}),borderGradient:"linear-gradient(230.68deg, rgba(243, 179, 39, 0) 10.1%, #F3B327 45.74%)",backgroundGradient:"#191717",chevronFillColor:"#FFF"},M[exports.LoyaltyType.InsiderIcon]={icon:n.jsx(s.InsiderIcon,{}),borderGradient:"linear-gradient(230.68deg, rgba(208, 175, 101, 0) 10.1%, #D0AF65 45.74%)",backgroundGradient:"linear-gradient(111deg, #2E3042 0%, #1A1C23 100%)",chevronFillColor:"#FFF"},M[exports.LoyaltyType.InsiderElite]={icon:n.jsx(s.InsiderElite,{}),borderGradient:"linear-gradient(230.68deg, rgba(208, 175, 101, 0) 10.1%, #D0AF65 45.74%)",backgroundGradient:"linear-gradient(111deg, #2E3042 0%, #1A1C23 100%)",chevronFillColor:"#FFF"},M[exports.LoyaltyType.CtLoyalty]={icon:n.jsx(s.CtLoyalty,{}),borderGradient:"linear-gradient(230.68deg, rgba(243, 179, 39, 0) 10.1%, #F3B327 45.74%)",backgroundGradient:"linear-gradient(110.82deg, #FFF9EC 0%, #FEE3A8 100%)",chevronFillColor:"#1A1A1A"},M),J=function(i){var a=i.icon,c=i.handleChipClick,l=i.value,d=i.type,u=v(),p=u.loyaltyType,g=u.isUserLoggedIn,h=u.ravenPushCallback,f=u.ravenPageName,x=u.ravenEventName,m=u.ravenPayload,y=void 0===m?{}:m,_=r.useState(!1),w=_[0],j=_[1],F=r.useCallback((function(){var e;if(c)c();else{var n=null!==(e=C("utm_source"))&&void 0!==e?e:"organic",r={action_name:"".concat(d,"_account_click"),action_type:"click",u_utm_source:n,loyaltyType:b(p)};k(g,x,r,y,h,f);var t={supercoin:"/all-offers/supercoins/",wallet:"/accounts/wallet"};t[d]&&(window.location.href=t[d])}}),[c,d,p,g,x,y,h,f]);return n.jsxs(t.Container,e.__assign({display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"8px",cursor:"pointer",css:{height:32,paddingLeft:8,paddingRight:w?4:8,transition:"padding-right 0.2s ease-in-out",background:w?"#ffd7ca":"#ffe6df"},onMouseEnter:function(){return j(!0)},onMouseLeave:function(){return j(!1)},onClick:F},{children:[n.jsxs(t.Container,e.__assign({display:"flex",alignItems:"center",css:{gap:"4px"}},{children:[a,n.jsx(o.Typography,e.__assign({variant:"B3",isClickable:!0},{children:l}))]})),n.jsx(t.Container,e.__assign({display:"flex",alignItems:"center",css:{overflow:"hidden",maxWidth:w?16:0,transition:"max-width 0.2s ease-in-out, opacity 0.2s ease-in-out",opacity:w?1:0}},{children:n.jsx(s.HeaderChevronRight,{})}))]}))},Q=function(){var r,o=v(),i=o.loyaltyType,a=o.fkSupercoinBurnBalance,c=void 0===a?0:a,l=o.walletBalance,d=void 0===l?0:l,u=o.loyaltyLoading,p=o.superCoinsLoading,g=o.walletLoading,h=o.walletChipClick,f=o.supercoinsChipClick,x=o.loyaltyChipClick,m=o.hideWalletChip,y=o.hideSupercoinsChip,_=o.hideLoyaltyChip;return u||i&&K[i]&&!_||(p||!y)||(g||!m)?n.jsxs(t.Container,e.__assign({display:"flex",padding:"0 16px 16px 16px",justifyContent:"flex-start",css:{alignSelf:"stretch",gap:"4px"}},{children:[u?n.jsx(t.Container,{width:"50px",height:"32px",borderRadius:"8px",backgroundColor:"#efefef"}):i&&K[i]&&!_&&n.jsx(Y,{icon:K[i].icon,borderGradient:K[i].borderGradient,backgroundGradient:K[i].backgroundGradient,chevronFillColor:(null===(r=K[i])||void 0===r?void 0:r.chevronFillColor)||"#FFF",handleChipClick:x}),p?n.jsx(t.Container,{width:"50px",height:"32px",borderRadius:"8px",backgroundColor:"#efefef"}):!y&&n.jsx(J,{icon:n.jsx(s.Supercoin,{width:20,height:20}),value:c,handleChipClick:f,type:"supercoin"}),g?n.jsx(t.Container,{width:"50px",height:"32px",borderRadius:"8px",backgroundColor:"#efefef"}):!m&&n.jsx(J,{icon:n.jsx(s.Wallet,{width:20,height:20}),value:d,handleChipClick:h,type:"wallet"})]})):null},Z=function(i){var c=i.isOpen,l=v(),d=l.handleLogoutClick,u=l.userName,p=l.userMobileNumber,g=l.countryCode,h=l.userDetailsLoading,f=l.loyaltyType,x=l.isUserLoggedIn,m=l.ravenEventName,y=l.ravenPageName,_=l.ravenPayload,w=void 0===_?{}:_,j=l.ravenPushCallback,F=D(c).containerRef,E=r.useMemo((function(){return{userGreeting:u?"Hello ".concat(u,"!"):"",phoneNumber:g&&p?"".concat(g," ").concat(p):""}}),[u,p,g]),L=E.userGreeting,T=E.phoneNumber,I=function(e){var n;return{action_name:e.toLowerCase().replace(/[\s-]/g,"")+"_account_click",action_type:"click",u_utm_source:null!==(n=C("utm_source"))&&void 0!==n?n:"organic",loyalty_type:b(f)}},M=r.useCallback((function(e,n){k(x,m,I(e),w,j,y),window.location.href=n}),[x,m,w,j,y]);r.useCallback((function(){k(x,m,I(U),w,j,y),d()}),[x,m,w,j,y,d]);var A=r.useCallback((function(){var e=document.getElementById(z),n=document.getElementById(X);if(e&&n){var r=e.getBoundingClientRect().right;n.style.left="".concat(r-328,"px")}}),[]);r.useEffect((function(){A()}),[A]);var P;return n.jsxs(t.Container,e.__assign({id:X,ref:F,display:"flex",flexDirection:"column",borderRadius:"16px",zIndex:1002,top:"76px",position:"fixed",css:{opacity:0,overflow:"hidden"},width:"".concat(328,"px"),background:"#FFF1EC"},{children:[n.jsx(t.Container,e.__assign({padding:"16px",height:"76px"},{children:(P=function(r,i,a,s){return n.jsx(o.Typography,e.__assign({variant:a,color:s},{children:r?n.jsx(t.Container,{height:"HM3"===a?"18px":"12px",width:"HM3"===a?"140px":"200px",backgroundColor:"#efefef",borderRadius:"8px"}):i}))},n.jsx(t.Container,e.__assign({display:"flex",flexDirection:"column",css:{gap:"4px"}},{children:L?n.jsxs(n.Fragment,{children:[P(h,L,"HM3","primary"),P(h,"".concat(q," ").concat(T),"P3","subheading")]}):n.jsxs(n.Fragment,{children:[P(h,q,"P3","subheading"),P(h,T,"HM3","primary")]})})))})),n.jsx(Q,{}),n.jsxs(t.Container,e.__assign({display:"flex",flexDirection:"column",padding:"8px",backgroundColor:"white",rowGap:"8px",css:{borderBottomLeftRadius:12,borderBottomRightRadius:12}},{children:[V.map((function(r){var i=r.text,a=r.icon,s=r.redirectionLink;return n.jsx(t.Container,e.__assign({padding:"8px",borderRadius:"8px",cursor:"pointer",onClick:function(){return M(i,s)},css:N},{children:n.jsxs(t.Container,e.__assign({display:"flex",cursor:"pointer",css:{columnGap:"8px"}},{children:[a,n.jsx(o.Typography,e.__assign({variant:"P1",css:{display:"flex",alignItems:"center",cursor:"pointer"}},{children:i}))]}))}),"account-option-".concat(i))})),n.jsx(a.Divider,{css:{borderBottom:"1px dashed #E6E6E6"}}),n.jsxs(t.Container,e.__assign({display:"flex",padding:"8px",borderRadius:"8px",cursor:"pointer",columnGap:"8px",onClick:d,css:B},{children:[n.jsx(s.Signout,{height:24,width:24}),n.jsx(o.Typography,e.__assign({variant:"P1",css:{display:"flex",alignItems:"center",cursor:"pointer"},color:"warning"},{children:U}))]}))]}))]}))},$=function(){var i=v(),a=i.isNovacThemeEnabled,c=i.ravenEventName,l=i.ravenPayload,d=void 0===l?{}:l,u=i.ravenPushCallback,p=i.isUserLoggedIn,g=i.loyaltyType,h=i.ravenPageName,f=A({openDelay:0}),m=f.isDropdownVisible,y=f.handleOnMouseEnter,_=f.handleOnMouseLeave,w=f.handleDropdownMouseEnter,F=f.handleDropdownMouseLeave,E=r.useState(!1),L=E[0],T=E[1];r.useEffect((function(){var e=function(){T(window.scrollY>=50)};return window.addEventListener("scroll",e),function(){return window.removeEventListener("scroll",e)}}),[]);var I=a&&!L?x.NOVAC:x.DEFAULT,M=I.hoverColor,D=I.typographyColor,N=r.useCallback((function(){var e,n=null!==(e=C("utm_source"))&&void 0!==e?e:"organic",r={action_name:"".concat(W.toLowerCase().replace(/[\s-]/g,""),"_header_hover"),action_type:"hover",u_utm_source:n,loyalty_type:b(g)};k(p,c,r,d,u,h)}),[p,c,d,u,h,g]);return n.jsxs(t.Container,{children:[n.jsxs(t.Container,e.__assign({display:"flex",padding:"8px 12px",alignItems:"center",borderRadius:"12px",height:"100%",cursor:"pointer",css:{columnGap:8,height:64},onMouseEnter:function(){y(0),N()},onMouseLeave:_,id:z},{children:[n.jsx(s.MyAccount,{color:m?M:D}),n.jsxs(t.Container,e.__assign({display:"flex",flexDirection:"row",alignItems:"center"},{children:[n.jsx(o.Typography,e.__assign({variant:"B2",css:{cursor:"pointer"},colorCode:m?M:D},{children:W})),n.jsx(s.ChevronDown,{width:20,height:20,fill:m?M:D})]}))]})),n.jsx(j,e.__assign({show:m,marginTop:"64px",handleDropdownMouseEnter:w,handleDropdownMouseLeave:F,onMaskClick:F},{children:n.jsx(Z,{isOpen:m})}))]})},ee=function(){var c,l=v(),d=l.onLoginButtonClick,u=l.showAllLobs,p=void 0!==u&&u,h=l.isUserLoggedIn,f=l.loyaltyType,m=l.isNovacThemeEnabled,y=void 0!==m&&m,_=l.ravenPayload,F=void 0===_?{}:_,E=l.ravenPushCallback,L=l.ravenPageName,T=l.ravenEventName,I=r.useState(!1),M=I[0],D=I[1];r.useEffect((function(){var e=function(){D(window.scrollY>=50)};return window.addEventListener("scroll",e),function(){return window.removeEventListener("scroll",e)}}),[]);var N,B=y&&!M?x.NOVAC:x.DEFAULT,P=B.headerBackground,R=B.logoFill,S=B.loginButtonColorVariant,H=B.hoverColor,O=B.fkcompanyColor,V=B.typographyColor,U=A({openDelay:0}),W=U.isDropdownVisible,q=U.hoveredElemIndex,z=U.handleOnMouseEnter,X=U.handleOnMouseLeave,Y=U.handleDropdownMouseEnter,K=U.handleDropdownMouseLeave,J=null!==(c=C("utm_source"))&&void 0!==c?c:"organic",Q=r.useCallback((function(e,n){return{action_name:e,action_type:n,u_utm_source:J,loyalty_type:b(f)}}),[J,f]),Z=r.useCallback((function(e){if(e.isClickable&&e.link){var n="".concat(e.text.toLowerCase().replace(/\s/g,""),"_header_click"),r=Q(n,"click");k(h,T,r,F,E,L),window.location.href=e.link}}),[Q,h,T,F,E,L]),ee=r.useCallback((function(){var e=Q("home_header_click","click");k(h,T,e,F,E,L),window.location.href="/"}),[Q,h,T,F,E,L]),ne=r.useCallback((function(e){var n="".concat(e.text.toLowerCase().replace(/\s/g,""),"_header_hover"),r=Q(n,"hover");k(h,T,r,F,E,L)}),[Q,h,T,F,E,L]);return n.jsxs(n.Fragment,{children:[n.jsx(t.Container,e.__assign({display:"flex",top:0,position:"sticky",width:"100%",alignItems:"center",justifyContent:"center",zIndex:1e3,height:"64px",background:P,css:{gap:"24px",flexShrink:0,borderBottom:"transparent"===P?"":"1px solid #E6E6E6",transition:"background-color 0.3s ease-in-out, border-bottom 0.3s ease-in-out"}},{children:n.jsxs(t.Container,e.__assign({display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 28px",flex:1,css:{gap:"24px",maxWidth:1440}},{children:[n.jsxs(t.Container,e.__assign({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",cursor:"pointer",onClick:ee},{children:[n.jsx(s.CTLogo,{fillColor:R}),n.jsx(a.Divider,{css:{width:12,marginLeft:2,marginRight:2,transform:"rotate(90deg)",borderBottom:"1px solid #e0e0e0"}}),n.jsx(s.Fkcompany,{color:O})]})),n.jsxs(t.Container,e.__assign({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",columnGap:"24px"},{children:[n.jsx(t.Container,e.__assign({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",columnGap:"4px"},{children:g.map((function(r,i){var a=r.text,s=r.lefticon,c=r.rightIcon,l=r.isHoverable,d=q===i;return n.jsxs(t.Container,{children:[n.jsxs(t.Container,e.__assign({onMouseEnter:function(){z(i),r.isHoverable&&ne(r)},onMouseLeave:X,display:"flex",flexDirection:"row",alignItems:"center",padding:"8px 12px 8px 12px",cursor:"pointer",position:"relative",columnGap:8,height:"64px",onClick:function(){return Z(r)}},{children:[n.jsx(s,{color:d?H:V}),n.jsxs(t.Container,e.__assign({display:"flex",flexDirection:"row",alignItems:"center"},{children:[n.jsx(o.Typography,e.__assign({variant:"B2",colorCode:d?H:V,isClickable:!0},{children:a})),c&&n.jsx(c,{width:20,height:20,fill:d?H:V})]}))]}),"nav-option-".concat(i)),n.jsx(j,e.__assign({show:q===i&&l&&W,marginTop:"64px",handleDropdownMouseEnter:Y,handleDropdownMouseLeave:K,onMaskClick:K},{children:n.jsx(G,{isOpen:q===i&&l&&W})}))]})}))})),h&&n.jsx(a.Divider,{css:{width:12,margin:"0 -18px",transform:"rotate(90deg)",borderBottom:"1px solid #e0e0e0"}}),n.jsx(t.Container,{children:h?n.jsx(t.Container,e.__assign({display:"flex",flexDirection:"row",alignItems:"center"},{children:n.jsx($,{})})):n.jsx(i.Button,e.__assign({onClick:d,css:e.__assign({width:153,height:40},(N="transparent"===P,N?{backgroundColor:"transparent !important","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.25)!important"}}:{backgroundColor:"transparent !important","&:hover":{backgroundColor:"#F3F3F3 !important"}})),loading:!1,color:S,variant:i.ButtonVariant.OUTLINE},{children:"Log in"}))})]}))]}))})),p&&n.jsx(w,{})]})};exports.Header=function(r){return n.jsx(y,e.__assign({value:r},{children:n.jsx(ee,{})}))};
1
+ "use strict";var e=require("tslib"),n=require("react/jsx-runtime"),t=require("react"),r=require("@cleartrip/ct-design-container"),i=require("@cleartrip/ct-design-typography"),o=require("@cleartrip/ct-design-button"),a=require("@cleartrip/ct-design-divider"),s=require("@cleartrip/ct-design-loyalty-pill"),l=require("@cleartrip/ct-design-icons"),c=require("@cleartrip/ct-design-common-utils"),u=require("styled-components"),d=require("@cleartrip/ct-design-intersection-observer"),p=require("@cleartrip/ct-design-theme");function g(e){return e&&e.__esModule?e:{default:e}}var f,h,x=g(u),v="Elite",m=[{lefticon:l.Offers,text:"Offers",ravenActionName:"offers",isHoverable:!1,isClickable:!0,link:"/all-offers/?categories=flights"},{lefticon:l.BusinessBag,text:"Business",ravenActionName:"business",rightIcon:l.ChevronDown,isHoverable:!0},{lefticon:l.MyTrips,text:"My Trips",ravenActionName:"mytrips",isHoverable:!1,isClickable:!0,link:"/accounts/trips"},{lefticon:l.SupportIcon,text:"Support",ravenActionName:"support",isHoverable:!1,isClickable:!0,link:"/support"},{text:v,ravenActionName:"",isHoverable:!0,isClickable:!1}],_="SUSPENDED",y="ACTIVE",C="INACTIVE",b="EXPIRING_SOON",k="TRACKER_EXPIRING_SOON",w="EXPIRED",j="ACTIVATING_SOON",E=[{title:"Flights",image:"https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Flights.png?cache=true",link:"/flights"},{title:"Hotels",image:"https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Hotels.png?cache=true",link:"/hotels"},{title:"Buses",image:"https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Buses.png?cache=true",link:"/bus"},{title:"Holidays",image:"https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Packages.png?cache=true",link:"/holidays"}],L=[{title:"AgentBox",subtitle:"For travel agents",details:"One-stop travel solution offering the best deals to our travel agency partners",link:"https://agency.cleartrip.com"},{title:"OutOfOffice",subtitle:"For startups, corporates and SMEs",details:"Manage corporate business travel, smartly",link:"https://ooo.cleartrip.com/",ravenActionName:"ooo"},{title:"MICE",subtitle:"For corporate events",details:"An end-to-end management solution for all your corporate events",link:"https://business.cleartrip.com/"},{title:"API",subtitle:"For developers",details:"Unlock seamless integration and scale with our powerful, reliable APIs",link:"https://business.cleartrip.com/api-customers/more-details"}];exports.RAVEN_PAGE_NAMES=void 0,(f=exports.RAVEN_PAGE_NAMES||(exports.RAVEN_PAGE_NAMES={})).UNIFIED_HOME="unified_homepage",f.HOTELS_HOME="hotel_home",f.FLIGHTS_HOME="flights_home",function(e){e.DESKTOP="desktop"}(h||(h={}));var F="ui_action",T="ct_loyalty_benefits_popup_load",I="ct_loyalty_view_benefits_click",N="elite_login_click",D={NOVAC:{headerBackground:"transparent",hoverColor:"#FDBA12",logoFill:"#FFF",fkcompanyColor:"#FFF",typographyColor:"#FFF",loginButtonColorVariant:o.ButtonColor.NEUTRAL},DEFAULT:{headerBackground:"#FFFFFF",hoverColor:"#FF4F17",logoFill:"#FF4F17",fkcompanyColor:"#1A1A1A",typographyColor:"#1A1A1A",loginButtonColorVariant:o.ButtonColor.PRIMARY}},A=t.createContext(void 0),S=function(){var e=t.useContext(A);if(!e)throw new Error("useHeaderContext must be used within a HeaderProvider");return e},P=function(t){var r=t.value,i=t.children;return n.jsx(A.Provider,e.__assign({value:r},{children:i}))},M=function(e){var n=Object.keys(e),t=[];return n.forEach(function(n){t.includes(n)?e[n]=Number(e[n]):e[n]=""+e[n]}),e},R=function(e){return"undefined"!=typeof window&&window?new URLSearchParams(window.location.search).get(e):""},B=function(e){switch(e){case"FkVip":return"fk_vip";case"FkPremium":return"fk_plus_premium";case"InsiderIcon":return"myntra_insidericon";case"InsiderElite":return"myntra_insiderelite";default:return""}},O=function(n,t,r,i,o,a){var s;if("function"==typeof o){var l={page_name:a,platform:h.DESKTOP,login_status:n?"yes":"no",domain:null===(s=null===window||void 0===window?void 0:window.location)||void 0===s?void 0:s.hostname},c=M(r),u=M(i),d=e.__assign(e.__assign(e.__assign({},l),c),u);try{1===o.length?o({eventName:t,eventData:d}):o(t,d)}catch(e){return void console.error(e)}}else console.error("ravenPushCallback is not provided or is not a function")},H=function(e,n){var t,r,i=null===(r=null===(t=null==e?void 0:e.find(function(e){return"LOYALTY"===(null==e?void 0:e.usecase)}))||void 0===t?void 0:t.content)||void 0===r?void 0:r[0],o=null==i?void 0:i.metaData;return c.isEmpty(i)||c.isEmpty(o)||(null==o?void 0:o.loyaltyName)!==n||(null==o?void 0:o.loyaltyStatus)===_?null:i||null},G=function(e){return H(e,s.LoyaltyProgram.ELITE)},U=function(e){var n,t;return null!==(t=null===(n=G(e))||void 0===n?void 0:n.metaData)&&void 0!==t?t:null},V=function(e){return H(e,s.LoyaltyProgram.FK_BLACK)},q=function(e,n){var t;if(void 0===n&&(n=!0),!n)return s.EliteLoyaltyPillStateEnum.LOGGED_OUT;switch(null===(t=U(e))||void 0===t?void 0:t.displayStatus){case y:case j:return s.EliteLoyaltyPillStateEnum.UNLOCKED;case b:return s.EliteLoyaltyPillStateEnum.EXPIRING;default:return s.EliteLoyaltyPillStateEnum.LOCKED}},X=function(e){return!!U(e)},z=function(e){return(null==e?void 0:e.displayStatus)===y||(null==e?void 0:e.displayStatus)===b},W=function(e){var n=e.displayStatus,t=e.unlockDate;switch(n){case j:var r=function(e){if(!e)return"";var n=e.match(/^(\d{4})-(\d{2})-(\d{2})/),t=n?new Date(Number(n[1]),Number(n[2])-1,Number(n[3])):new Date(e);if(Number.isNaN(t.getTime()))return"";var r=t.getDate(),i=t.toLocaleDateString("en-GB",{month:"short"});return"".concat(r).concat(function(e){if(e>=11&&e<=13)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}(r)," ").concat(i)}(t);return{prefix:"Your",suffix:r?"benefits unlock on ".concat(r):"benefits unlock soon"};case C:case k:case w:return{prefix:"Unlock",suffix:"membership"};default:return{prefix:"Your",suffix:"membership"}}},Y=function(e){e&&(window.location.href=e)},K=function(e){switch(e){case y:return"active";case b:return"expiring_soon";case C:return"inactive";default:return"na"}},J=function(){var t=S(),o=t.selectedLOB,a=t.isUserLoggedIn,s=t.ravenEventName,l=t.ravenPageName,c=t.ravenPayload,u=void 0===c?{}:c,d=t.ravenPushCallback;return n.jsx(r.Container,e.__assign({display:"flex",alignItems:"center",justifyContent:"center",padding:"16px",background:"#F7FAFF",top:"64px",zIndex:2,css:{gap:24}},{children:E.map(function(t,c){var p=t.title,g=t.link,f=t.image,h=o===p;return n.jsx("a",e.__assign({href:h?void 0:g,style:{textDecoration:"none",pointerEvents:h?"none":"auto"},onClick:function(){return function(e,n){if(!n){var t={action_name:"".concat(e.toLowerCase(),"_tab_click"),action_type:"click"};O(a,s,t,u,d,l)}}(p,h)}},{children:n.jsxs(r.Container,e.__assign({display:"flex",alignItems:"center",width:"116px",height:"48px",justifyContent:"center",cursor:"pointer",css:{gap:8,background:h?"#FFFFFF":"transparent",border:h?"1px solid #E6E6E6":"",borderRadius:"40px",padding:"8px 16px 8px 8px",transition:"background 0.2s ease"}},{children:[n.jsx("img",{src:f,alt:p,width:32,height:32}),n.jsx(i.Typography,e.__assign({variant:h?i.TypographyVariant.HM3:i.TypographyVariant.B1,isClickable:!0},{children:p}))]}))}),c)})}))};function Q(i){var o=i.children,a=i.onMaskClick,s=i.show,l=i.marginTop,c=i.handleDropdownMouseEnter,u=i.handleDropdownMouseLeave;t.useEffect(function(){return s&&(document.body.style.overflow="hidden"),function(){document.body.style.overflow="initial"}},[s]);var d=function(e,n){var r=t.useState(e),i=r[0],o=r[1],a=t.useRef();return t.useEffect(function(){return e?o(e):a.current=setTimeout(function(){o(!1)},n),function(){(null==a?void 0:a.current)&&clearTimeout(a.current)}},[e]),i}(s,300),p=function(e,n){var r=t.useState(!1),i=r[0],o=r[1],a=t.useRef();return t.useEffect(function(){return e&&!i?setTimeout(function(){o(!0)},0):!e&&i&&(a.current=setTimeout(function(){return o(!1)},n)),function(){a&&a.current&&clearTimeout(a.current)}},[n,e]),i}(s,100),g=p;return n.jsxs(n.Fragment,{children:[d&&n.jsx(r.Container,{id:"mask-container",css:{position:"fixed",backgroundColor:"#000",opacity:g?.4:0,width:"100%",height:"100vh",left:0,top:l||0,zIndex:9,transition:"opacity 300ms ease-in"},onClick:a}),d&&n.jsx(r.Container,e.__assign({onMouseEnter:c,onMouseLeave:u},{children:o}))]})}var Z,$,ee,ne,te,re,ie=function(e){var n=void 0===e?{}:e,r=n.closeDelay,i=void 0===r?0:r,o=n.openDelay,a=void 0===o?500:o,s=Math.max(i,150),l=t.useState(!1),c=l[0],u=l[1],d=t.useState(null),p=d[0],g=d[1],f=t.useRef(null),h=t.useRef(null),x=t.useRef(!1),v=t.useCallback(function(e){f.current&&clearTimeout(f.current),h.current&&clearTimeout(h.current),x.current=!1,h.current=setTimeout(function(){u(!0),x.current||g(e)},a)},[a]),m=t.useCallback(function(){x.current=!0,f.current=setTimeout(function(){u(!1),g(null)},s)},[s]),_=t.useCallback(function(){f.current&&clearTimeout(f.current)},[]),y=t.useCallback(function(){x.current=!0,(null==f?void 0:f.current)&&clearTimeout(f.current),f.current=setTimeout(function(){u(!1),g(null)},s)},[]);return t.useEffect(function(){var e=function(e){e.clientY<=0&&(u(!1),g(null))};return window.addEventListener("mouseleave",e),function(){window.removeEventListener("mouseleave",e)}},[]),{isDropdownVisible:c,hoveredElemIndex:p,handleOnMouseEnter:v,handleOnMouseLeave:m,handleDropdownMouseEnter:_,handleDropdownMouseLeave:y}},oe=function(e){var n=t.useRef(null);return t.useEffect(function(){e?function(){if(n.current){var e=n.current.scrollHeight;n.current.style.maxHeight="".concat(e/2,"px"),n.current.style.opacity="0",requestAnimationFrame(function(){n.current&&(n.current.style.transition="max-height 0.3s ease-in-out, opacity 0.3s ease-in-out",n.current.style.maxHeight="".concat(e,"px"),n.current.style.opacity="1")})}}():function(){if(n.current){var e=n.current.scrollHeight;n.current.style.transition="max-height 0.3s ease-in-out, opacity 0.3s ease-in-out",n.current.style.maxHeight="".concat(e/2,"px"),n.current.style.opacity="0",setTimeout(function(){n.current&&(n.current.style.maxHeight="0px")},300)}}()},[e]),{containerRef:n}},ae={transition:"background-color 0.2s ease-in-out","&:hover":{backgroundColor:"#ECF3FF"}},se={transition:"background-color 0.2s ease-in-out","&:hover":{backgroundColor:"#FBEFEF"}},le=u.keyframes(Z||(Z=e.__makeTemplateObject(["\n from {\n transform: translateX(-20px);\n }\n to {\n transform: translateX(0px);\n }\n"],["\n from {\n transform: translateX(-20px);\n }\n to {\n transform: translateX(0px);\n }\n"]))),ce=u.keyframes($||($=e.__makeTemplateObject(["\n from {\n transform: translateX(-20.01px);\n }\n to {\n transform: translateX(0px);\n }\n"],["\n from {\n transform: translateX(-20.01px);\n }\n to {\n transform: translateX(0px);\n }\n"]))),ue={display:"flex",backgroundColor:"black",transition:"background-color 200ms ease","flex-direction":"row",justifyContent:"center",width:"20px",height:"20px",overflow:"hidden",borderRadius:"50%"},de=function(e){return{background:"linear-gradient(90deg, #fce9ff 26.53%, #ffefee 88.06%)",padding:"".concat(e.spacing[2]," ").concat(e.spacing[4]),display:"flex",justifyContent:"space-between",alignItems:"center"}},pe=function(e){return{display:"flex",flexDirection:"column",alignSelf:"center",margin:"auto ".concat(e.spacing[1])}},ge=function(){return n.jsx(r.Container,e.__assign({className:"bd-arrow-container-js",css:ue},{children:e.__spreadArray([],Array(3),!0).map(function(t,i){return n.jsx(r.Container,e.__assign({className:"bd-arrow-wrapper-js",display:"flex",alignItems:"center"},{children:n.jsx(l.ArrowRight,{})}),i)})}))},fe=x.default.div.withConfig({displayName:"BusinessDropdown__BDHoverContainer",componentId:"sc-1tsshe4-0"})(ee||(ee=e.__makeTemplateObject(["\n cursor: pointer;\n width: 200px;\n &:hover {\n .bd-arrow-container-js {\n background-color: rgba(255, 79, 23, 1);\n transition: color 200ms ease;\n }\n .bd-arrow-wrapper-js {\n animation: "," 200ms linear;\n display: flex;\n }\n .color-orange-on-hover-js {\n color: rgba(255, 79, 23, 1);\n transition: background-color 200ms ease;\n }\n }\n &:not(:hover) .bd-arrow-wrapper-js {\n animation: "," 200ms linear backwards;\n }\n"],["\n cursor: pointer;\n width: 200px;\n &:hover {\n .bd-arrow-container-js {\n background-color: rgba(255, 79, 23, 1);\n transition: color 200ms ease;\n }\n .bd-arrow-wrapper-js {\n animation: "," 200ms linear;\n display: flex;\n }\n .color-orange-on-hover-js {\n color: rgba(255, 79, 23, 1);\n transition: background-color 200ms ease;\n }\n }\n &:not(:hover) .bd-arrow-wrapper-js {\n animation: "," 200ms linear backwards;\n }\n"])),le,ce),he=function(o){var a=o.isOpen,s=S(),l=s.isUserLoggedIn,c=s.ravenPushCallback,u=s.ravenPageName,d=s.ravenEventName,p=s.loyaltyType,g=s.ravenPayload,f=void 0===g?{}:g,h=t.useState(0),x=h[0],v=h[1],m=oe(a).containerRef;t.useEffect(function(){var e=function(){if(m.current){var e=(window.innerWidth-(m.current.offsetWidth||0))/2;e!==x&&v(e)}};return e(),window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}},[m,x]);var _=t.useCallback(function(e,n,t){var r,i=null!==(r=R("utm_source"))&&void 0!==r?r:"organic",o={action_name:t?"".concat(t,"_business_click"):n?"".concat(n.toLowerCase(),"_business_click"):"",action_type:"click",u_utm_source:i,loyalty_type:B(p)};e&&(O(l,d,o,f,c,u),window.location.href=e)},[l,d,f,c,u,p]);return n.jsxs(r.Container,e.__assign({ref:m,backgroundColor:"#fff",top:"76px",position:"fixed",left:"".concat(x,"px"),borderRadius:24,boxShadow:"0px 8px 24px 0px rgba(26, 26, 26, 0.10)",width:"fit-content",zIndex:1002,css:{overflow:"hidden",opacity:0}},{children:[n.jsx(r.Container,e.__assign({padding:"20px 24px 20px 24px",backgroundColor:"#FFF1EC"},{children:n.jsx(i.Typography,e.__assign({variant:"HM2"},{children:"Other business services"}))})),n.jsx(r.Container,e.__assign({display:"flex",flexDirection:"row",padding:"24px",columnGap:"48px",width:"fit-content"},{children:L.map(function(t){var o=t.title,a=t.subtitle,s=t.details,l=t.link,c=t.ravenActionName;return n.jsxs(fe,e.__assign({className:"bd-hover-container-js",onClick:function(){return _(l,o,c)}},{children:[n.jsxs(r.Container,e.__assign({display:"flex",flexDirection:"column",rowGap:"4px"},{children:[n.jsxs(r.Container,e.__assign({display:"flex",flexDirection:"row",alignItems:"center",columnGap:"8px"},{children:[n.jsx(i.Typography,e.__assign({variant:"HM2",className:"color-orange-on-hover-js",css:{transition:"color 200ms ease"}},{children:o})),n.jsx(ge,{})]})),n.jsx(i.Typography,e.__assign({variant:"B3",css:{marginTop:"4px",opacity:.75}},{children:a}))]})),n.jsx(i.Typography,e.__assign({variant:"P3",color:"subheading",css:{marginTop:"12px"}},{children:s}))]}),o)})}))]}))},xe=function(){var n=S(),r=n.eliteDetails,i=n.ravenPushCallback,o=n.ravenPageName,a=n.isUserLoggedIn,s=n.ravenPayload,l=void 0===s?{}:s,u=t.useMemo(function(){return function(e){var n,t,r=G(e);if(c.isEmpty(null==r?void 0:r.metaData))return{};var i=null!=r?r:{},o=i.metaData,a=i.constraintList,s=i.partnerProgram,l=i.allotmentDate,u=i.viewExpiryDate;i.lifetimeSavings;var d=null!==(n=null==a?void 0:a[0])&&void 0!==n?n:{},p=d.target,g=d.bookingCount;return{elite_status:null!==(t=K(null==o?void 0:o.displayStatus))&&void 0!==t?t:"na",elite_progress:p?"".concat(g,"/").concat(p):"na",partner_program_source:null!=s?s:"na",elite_unlock_date:null!=l?l:"na",elite_membership_end_date:null!=u?u:"na"}}(r)},[r]),d=t.useMemo(function(){return function(e){switch(e){case exports.RAVEN_PAGE_NAMES.FLIGHTS_HOME:return"a_";case exports.RAVEN_PAGE_NAMES.HOTELS_HOME:return"h_";default:return"u_"}}(o)},[o]),p=t.useCallback(function(n,t){void 0===t&&(t={}),i&&O(a,"".concat(d).concat(n),e.__assign(e.__assign({},u),t),l,i,o)},[a,u,d,l,i,o]);return{ravenEventPrefix:d,ravenAttributes:u,ravenPushCallback:i,isUserLoggedIn:a,ravenPageName:o,triggerRavenEvent:p}},ve=function(e,n){return{position:"fixed",top:"76px",width:"360px",zIndex:1002,backgroundColor:e.color.background.neutral,borderRadius:e.border.radius[16],boxShadow:e.elevation.bottomE3,overflow:"hidden",opacity:0,backgroundImage:"url(".concat("https://rukmini-ct.flixcart.com/f_auto,q_auto/offermgmt-prod/offermgmt/images/banner/desktop_pop_up_elite_bgImage-v2.png",")"),backgroundSize:n?"100% ".concat(n,"px"):"100% auto",backgroundPosition:"top center",backgroundRepeat:"no-repeat",paddingLeft:e.spacing[7],paddingRight:e.spacing[7],paddingBottom:e.spacing[9]}},me=function(e){return{display:"grid",gridTemplateColumns:"1fr 1fr",gap:e.spacing[3],margin:"".concat(e.spacing[4]," 0 ").concat(e.spacing[6])}},_e=function(e){return{display:"flex",alignItems:"center",justifyContent:"center",padding:e.spacing[3],backgroundColor:e.color.text.neutral50,borderRadius:e.border.radius[16]}},ye=function(t){var a=t.benefits,s=void 0===a?[]:a,l=t.ctaText,c=t.showCta,u=t.onCtaClick,d=t.hideRedirectionCTA,g=void 0!==d&&d,f=p.useTheme();return n.jsxs(n.Fragment,{children:[(null==s?void 0:s.length)>0&&n.jsx(r.Container,e.__assign({css:me(f)},{children:null==s?void 0:s.map(function(t,o){return n.jsx(r.Container,e.__assign({css:_e(f)},{children:n.jsx(i.Typography,e.__assign({variant:"HM3",className:"ta-center"},{children:t}))}),o)})})),c&&l&&!g&&n.jsx(o.Button,e.__assign({className:"w-100p",onClick:u},{children:l}))]})},Ce=function(i){var o=i.isOpen,a=p.useTheme(),s=S(),c=s.eliteDetails,u=s.onLoginButtonClick,g=s.hideEliteRedirectionCTA,f=void 0!==g&&g,h=U(c),x=xe(),v=x.isUserLoggedIn,m=x.triggerRavenEvent,_=oe(o).containerRef,y=t.useState(),C=y[0],b=y[1],k=t.useState(),w=k[0],j=k[1],E=function(e){var n,t,r;return null!==(r=null===(t=(null!==(n=null==e?void 0:e.benefits)&&void 0!==n?n:[]).filter(function(e){return null==e?void 0:e.title}))||void 0===t?void 0:t.map(function(e){return e.title}))&&void 0!==r?r:[]}(h);t.useLayoutEffect(function(){if(_.current){var e=_.current.getBoundingClientRect(),n=e.left,t=e.width;b(n-t/2+30),j(_.current.scrollHeight)}},[_]);var L=t.useCallback(function(){m(T)},[m]),D=t.useCallback(function(){(null==h?void 0:h.redirectionUrl)&&(m(F,{action_name:I}),Y(h.redirectionUrl))},[h,m]),A=t.useCallback(function(){m(F,{action_name:N}),u({isEliteLogin:!0})},[u,m]),P=!v||!!(null==h?void 0:h.redirectionUrl),M=v?"View membership benefits":"Login to check eligibility",R=v?D:A;return h?n.jsx(d.IntersectionObserver,e.__assign({onIntersection:L},{children:n.jsxs(r.Container,e.__assign({ref:_,className:"o-0",css:e.__assign(e.__assign({},ve(a,w)),{left:C&&"".concat(C,"px")})},{children:[n.jsx(r.Container,e.__assign({className:"ta-center",css:{marginTop:a.spacing[9]}},{children:n.jsx(l.EliteText,{width:120,height:48})})),n.jsx(ye,{benefits:E,showCta:P,ctaText:M,onCtaClick:R,hideRedirectionCTA:f})]}))})):null},be=[{text:"My Profile",icon:n.jsx(l.MyAccount,{width:24,height:24}),redirectionLink:"/accounts/profile"},{text:"My Trips",icon:n.jsx(l.MyTrips,{width:24,height:24}),redirectionLink:"/accounts/trips"},{text:"Saved Cards",icon:n.jsx(l.SavedCard,{}),redirectionLink:"/accounts/expressway"},{text:"Saved Travellers",icon:n.jsx(l.Travellers,{width:24,height:24}),redirectionLink:"/account/travellers"},{text:"Hi-Five",icon:n.jsx(l.HiFive,{}),redirectionLink:"/accounts/hi-five?src=fh"},{text:"Wallet",icon:n.jsx(l.Wallet,{width:24,height:24}),redirectionLink:"/accounts/wallet"},{text:"Settings",icon:n.jsx(l.SettingsCog,{width:24,height:24}),redirectionLink:"/account/settings"},{text:"Privacy Rights",icon:n.jsx(l.PrivacyRights,{}),redirectionLink:"/accounts/personal-data-dashboard"}],ke="Logout",we="My Account",je="You are logged in with",Ee="header-acc-btn",Le="account-options",Fe=function(i){var o=i.icon,a=i.borderGradient,s=i.backgroundGradient,c=i.handleChipClick,u=i.chevronFillColor,d=S(),p=d.loyaltyType,g=d.isUserLoggedIn,f=d.ravenPushCallback,h=d.ravenPageName,x=d.ravenPayload,v=void 0===x?{}:x,m=d.ravenEventName,_=d.eliteDetails,y=t.useState(!1),C=y[0],b=y[1],k=t.useCallback(function(){var e,n;if(c)c();else{var t={action_name:"loyalty_account_click",action_type:"click",u_utm_source:null!==(e=R("utm_source"))&&void 0!==e?e:"organic",loyaltyType:B(p)};O(g,m,t,v,f,h);var r=null===(n=function(e){var n,t;return null!==(t=null===(n=V(e))||void 0===n?void 0:n.metaData)&&void 0!==t?t:null}(_))||void 0===n?void 0:n.redirectionUrl;r&&Y(r)}},[c,p,g,m,v,f,h,_]);return n.jsxs(r.Container,e.__assign({display:"flex",position:"relative",alignItems:"center",justifyContent:"center",borderRadius:"8px",cursor:"pointer",paddingLeft:"8px",paddingRight:C?"4px":"8px",css:{overflow:"hidden",height:32,paddingLeft:8,transition:"padding-right 0.2s ease-in-out"},onMouseEnter:function(){return b(!0)},onMouseLeave:function(){return b(!1)},onClick:k},{children:[n.jsx(r.Container,{css:{content:'""',position:"absolute",inset:0,borderRadius:"inherit",background:s,zIndex:-2}}),n.jsx(r.Container,{css:{content:'""',position:"absolute",inset:0,borderRadius:"inherit",padding:"1px",background:a,WebkitMask:"linear-gradient(white, white) content-box, linear-gradient(white, white)",WebkitMaskComposite:"destination-out",maskComposite:"exclude",zIndex:-1}}),n.jsx(r.Container,e.__assign({display:"flex",alignItems:"center",position:"relative"},{children:o})),n.jsx(r.Container,e.__assign({display:"flex",alignItems:"center",css:{overflow:"hidden",maxWidth:C?16:0,transition:"max-width 0.2s ease-in-out, opacity 0.2s ease-in-out",opacity:C?.5:0}},{children:n.jsx(l.HeaderChevronRight,{color:u})}))]}))};exports.LOBS_VALUES=void 0,(ne=exports.LOBS_VALUES||(exports.LOBS_VALUES={})).FLIGHTS="Flights",ne.HOTELS="Hotels",ne.BUSES="Buses",ne.TRAINS="Trains",ne.HOLIDAYS="Holidays",exports.LoyaltyType=void 0,(te=exports.LoyaltyType||(exports.LoyaltyType={})).FkVip="FkVip",te.FkPremium="FkPremium",te.InsiderIcon="InsiderIcon",te.InsiderElite="InsiderElite",te.CtLoyalty="CtLoyalty",te.Elite="ELITE";var Te=((re={})[exports.LoyaltyType.FkVip]={icon:n.jsx(l.FkBlackIcon,{}),borderGradient:"linear-gradient(217.07deg, #0B182A 19.65%, #434E57 54.8%, #595952 89.95%)",backgroundGradient:"linear-gradient(217.07deg, #0B182A 19.65%, #434E57 54.8%, #595952 89.95%)",chevronFillColor:"#FFF"},re[exports.LoyaltyType.FkPremium]={icon:n.jsx(l.FkGold,{}),borderGradient:"linear-gradient(230.68deg, rgba(243, 179, 39, 0) 10.1%, #F3B327 45.74%)",backgroundGradient:"#191717",chevronFillColor:"#FFF"},re[exports.LoyaltyType.InsiderIcon]={icon:n.jsx(l.InsiderIcon,{}),borderGradient:"linear-gradient(230.68deg, rgba(208, 175, 101, 0) 10.1%, #D0AF65 45.74%)",backgroundGradient:"linear-gradient(111deg, #2E3042 0%, #1A1C23 100%)",chevronFillColor:"#FFF"},re[exports.LoyaltyType.InsiderElite]={icon:n.jsx(l.InsiderElite,{}),borderGradient:"linear-gradient(230.68deg, rgba(208, 175, 101, 0) 10.1%, #D0AF65 45.74%)",backgroundGradient:"linear-gradient(111deg, #2E3042 0%, #1A1C23 100%)",chevronFillColor:"#FFF"},re[exports.LoyaltyType.CtLoyalty]={icon:n.jsx(l.CtLoyalty,{}),borderGradient:"linear-gradient(230.68deg, rgba(243, 179, 39, 0) 10.1%, #F3B327 45.74%)",backgroundGradient:"linear-gradient(110.82deg, #FFF9EC 0%, #FEE3A8 100%)",chevronFillColor:"#1A1A1A"},re),Ie=function(o){var a=o.icon,s=o.handleChipClick,c=o.value,u=o.type,d=S(),p=d.loyaltyType,g=d.isUserLoggedIn,f=d.ravenPushCallback,h=d.ravenPageName,x=d.ravenEventName,v=d.ravenPayload,m=void 0===v?{}:v,_=t.useState(!1),y=_[0],C=_[1],b=t.useCallback(function(){var e;if(s)s();else{var n=null!==(e=R("utm_source"))&&void 0!==e?e:"organic",t={action_name:"".concat(u,"_account_click"),action_type:"click",u_utm_source:n,loyaltyType:B(p)};O(g,x,t,m,f,h);var r={supercoin:"/all-offers/supercoins/",wallet:"/accounts/wallet"};r[u]&&(window.location.href=r[u])}},[s,u,p,g,x,m,f,h]);return n.jsxs(r.Container,e.__assign({display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"8px",cursor:"pointer",css:{height:32,paddingLeft:8,paddingRight:y?4:8,transition:"padding-right 0.2s ease-in-out",background:y?"#ffd7ca":"#ffe6df"},onMouseEnter:function(){return C(!0)},onMouseLeave:function(){return C(!1)},onClick:b},{children:[n.jsxs(r.Container,e.__assign({display:"flex",alignItems:"center",css:{gap:"4px"}},{children:[a,n.jsx(i.Typography,e.__assign({variant:"B3",isClickable:!0},{children:c}))]})),n.jsx(r.Container,e.__assign({display:"flex",alignItems:"center",css:{overflow:"hidden",maxWidth:y?16:0,transition:"max-width 0.2s ease-in-out, opacity 0.2s ease-in-out",opacity:y?1:0}},{children:n.jsx(l.HeaderChevronRight,{})}))]}))},Ne=function(){var t=S(),i=t.eliteDetails,o=t.fkSupercoinBurnBalance,a=void 0===o?0:o,s=t.walletBalance,c=void 0===s?0:s,u=t.loyaltyLoading,d=t.superCoinsLoading,p=t.walletLoading,g=t.walletChipClick,f=t.supercoinsChipClick,h=t.loyaltyChipClick,x=t.hideWalletChip,v=t.hideSupercoinsChip,m=t.hideLoyaltyChip,_=Te[exports.LoyaltyType.FkVip],y=function(e){return!!V(e)}(i)&&!m&&!!_;return u||y||(d||!v)||(p||!x)?n.jsxs(r.Container,e.__assign({display:"flex",padding:"0 16px 16px 16px",justifyContent:"flex-start",css:{alignSelf:"stretch",gap:"4px"}},{children:[u?n.jsx(r.Container,{width:"50px",height:"32px",borderRadius:"8px",backgroundColor:"#efefef"}):y&&n.jsx(Fe,{icon:_.icon,borderGradient:_.borderGradient,backgroundGradient:_.backgroundGradient,chevronFillColor:_.chevronFillColor||"#FFF",handleChipClick:h}),d?n.jsx(r.Container,{width:"50px",height:"32px",borderRadius:"8px",backgroundColor:"#efefef"}):!v&&n.jsx(Ie,{icon:n.jsx(l.Supercoin,{width:20,height:20}),value:a,handleChipClick:f,type:"supercoin"}),p?n.jsx(r.Container,{width:"50px",height:"32px",borderRadius:"8px",backgroundColor:"#efefef"}):!x&&n.jsx(Ie,{icon:n.jsx(l.Wallet,{width:20,height:20}),value:c,handleChipClick:g,type:"wallet"})]})):null},De="ACTIVE",Ae="EXPIRING SOON",Se=function(e,n){return{background:n?e.color.badge.alertYellow500:e.color.badge.successGreen500,borderRadius:"4px",padding:"4px"}},Pe=function(t){var o=t.metaData,a=p.useTheme();if(!z(o))return null;var s=o.displayStatus===b;return n.jsx(r.Container,e.__assign({css:Se(a,s)},{children:n.jsx(i.Typography,e.__assign({color:"neutral750",variant:"B4CAPS"},{children:s?Ae:De}))}))},Me=function(o){var a=o.metaData,s=p.useTheme(),c=xe().triggerRavenEvent,u=a.redirectionUrl,d=t.useMemo(function(){return W(a)},[a]),g=d.prefix,f=d.suffix,h=t.useCallback(function(){u&&(c(F,{action_name:I}),Y(u))},[u,c]);return n.jsxs(r.Container,e.__assign({className:"account-elite-section ".concat(u?"c-pointer":""),css:de(s),onClick:h},{children:[n.jsxs(i.Typography,e.__assign({variant:"B2",className:"flex"},{children:[g," ",n.jsx(l.EliteText,{className:"elite-txt-svg",style:pe(s)})," ",f," ",u&&n.jsx(l.HeaderChevronRight,{width:20,height:20})]})),n.jsx(Pe,{metaData:a})]}))},Re=function(o){var s=o.isOpen,c=S(),u=c.handleLogoutClick,d=c.userName,p=c.userMobileNumber,g=c.countryCode,f=c.userDetailsLoading,h=c.loyaltyType,x=c.eliteDetails,v=c.hideEliteRedirectionCTA,m=void 0!==v&&v,_=c.isUserLoggedIn,y=c.ravenEventName,C=c.ravenPageName,b=c.ravenPayload,k=void 0===b?{}:b,w=c.ravenPushCallback,j=U(x),E=oe(s).containerRef,L=t.useMemo(function(){return{userGreeting:d?"Hello ".concat(d,"!"):"",phoneNumber:g&&p?"".concat(g," ").concat(p):""}},[d,p,g]),F=L.userGreeting,T=L.phoneNumber,I=function(e){var n;return{action_name:e.toLowerCase().replace(/[\s-]/g,"")+"_account_click",action_type:"click",u_utm_source:null!==(n=R("utm_source"))&&void 0!==n?n:"organic",loyalty_type:B(h)}},N=t.useCallback(function(e,n){O(_,y,I(e),k,w,C),window.location.href=n},[_,y,k,w,C]);t.useCallback(function(){O(_,y,I(ke),k,w,C),u()},[_,y,k,w,C,u]);var D=t.useCallback(function(){var e=document.getElementById(Ee),n=document.getElementById(Le);if(e&&n){var t=e.getBoundingClientRect().right;n.style.left="".concat(t-328,"px")}},[]);t.useEffect(function(){D()},[D]);var A,P,M;return n.jsxs(r.Container,e.__assign({id:Le,ref:E,display:"flex",flexDirection:"column",borderRadius:"16px",zIndex:1002,top:"76px",position:"fixed",css:{opacity:0,overflow:"hidden"},width:"".concat(328,"px"),background:"#FFF1EC"},{children:[n.jsxs(r.Container,e.__assign({css:(P=z(j),M="https://rukmini-ct.flixcart.com/fl_progressive,e_sharpen:80,c_fill,dpr_2,f_auto,q_75/offermgmt-prod/offermgmt/images/banner/desktop-accounts-dropdown-elite-bg.png",P?{backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center",backgroundImage:"url(".concat(M,")")}:{})},{children:[n.jsx(r.Container,e.__assign({padding:"16px",height:"76px"},{children:(A=function(t,o,a,s){return n.jsx(i.Typography,e.__assign({variant:a,color:s},{children:t?n.jsx(r.Container,{height:"HM3"===a?"18px":"12px",width:"HM3"===a?"140px":"200px",backgroundColor:"#efefef",borderRadius:"8px"}):o}))},n.jsx(r.Container,e.__assign({display:"flex",flexDirection:"column",css:{gap:"4px"}},{children:F?n.jsxs(n.Fragment,{children:[A(f,F,"HM3","primary"),A(f,"".concat(je," ").concat(T),"P3","subheading")]}):n.jsxs(n.Fragment,{children:[A(f,je,"P3","subheading"),A(f,T,"HM3","primary")]})})))})),n.jsx(Ne,{})]})),X(x)&&j&&!m&&n.jsx(Me,{metaData:j}),n.jsxs(r.Container,e.__assign({display:"flex",flexDirection:"column",padding:"8px",backgroundColor:"white",rowGap:"8px",css:{borderBottomLeftRadius:12,borderBottomRightRadius:12}},{children:[be.map(function(t){var o=t.text,a=t.icon,s=t.redirectionLink;return n.jsx(r.Container,e.__assign({padding:"8px",borderRadius:"8px",cursor:"pointer",onClick:function(){return N(o,s)},css:ae},{children:n.jsxs(r.Container,e.__assign({display:"flex",cursor:"pointer",css:{columnGap:"8px"}},{children:[a,n.jsx(i.Typography,e.__assign({variant:"P1",css:{display:"flex",alignItems:"center",cursor:"pointer"}},{children:o}))]}))}),"account-option-".concat(o))}),n.jsx(a.Divider,{css:{borderBottom:"1px dashed #E6E6E6"}}),n.jsxs(r.Container,e.__assign({display:"flex",padding:"8px",borderRadius:"8px",cursor:"pointer",columnGap:"8px",onClick:u,css:se},{children:[n.jsx(l.Signout,{height:24,width:24}),n.jsx(i.Typography,e.__assign({variant:"P1",css:{display:"flex",alignItems:"center",cursor:"pointer"},color:"warning"},{children:ke}))]}))]}))]}))},Be=function(){var o=S(),a=o.isNovacThemeEnabled,s=o.ravenEventName,c=o.ravenPayload,u=void 0===c?{}:c,d=o.ravenPushCallback,p=o.isUserLoggedIn,g=o.loyaltyType,f=o.ravenPageName,h=ie({openDelay:0}),x=h.isDropdownVisible,v=h.handleOnMouseEnter,m=h.handleOnMouseLeave,_=h.handleDropdownMouseEnter,y=h.handleDropdownMouseLeave,C=t.useState(!1),b=C[0],k=C[1];t.useEffect(function(){var e=function(){k(window.scrollY>=50)};return window.addEventListener("scroll",e),function(){return window.removeEventListener("scroll",e)}},[]);var w=a&&!b?D.NOVAC:D.DEFAULT,j=w.hoverColor,E=w.typographyColor,L=t.useCallback(function(){var e,n=null!==(e=R("utm_source"))&&void 0!==e?e:"organic",t={action_name:"".concat(we.toLowerCase().replace(/[\s-]/g,""),"_header_hover"),action_type:"hover",u_utm_source:n,loyalty_type:B(g)};O(p,s,t,u,d,f)},[p,s,u,d,f,g]);return n.jsxs(r.Container,{children:[n.jsxs(r.Container,e.__assign({display:"flex",padding:"8px 12px",alignItems:"center",borderRadius:"12px",height:"100%",cursor:"pointer",css:{columnGap:8,height:64},onMouseEnter:function(){v(0),L()},onMouseLeave:m,id:Ee},{children:[n.jsx(l.MyAccount,{color:x?j:E}),n.jsxs(r.Container,e.__assign({display:"flex",flexDirection:"row",alignItems:"center"},{children:[n.jsx(i.Typography,e.__assign({variant:"B2",css:{cursor:"pointer"},colorCode:x?j:E},{children:we})),n.jsx(l.ChevronDown,{width:20,height:20,fill:x?j:E})]}))]})),n.jsx(Q,e.__assign({show:x,marginTop:"64px",handleDropdownMouseEnter:_,handleDropdownMouseLeave:y,onMaskClick:y},{children:n.jsx(Re,{isOpen:x})}))]})},Oe=function(){var c,u=S(),d=u.onLoginButtonClick,p=u.showAllLobs,g=void 0!==p&&p,f=u.isUserLoggedIn,h=u.loyaltyType,x=u.eliteDetails,_=u.isNovacThemeEnabled,y=void 0!==_&&_,C=u.ravenPayload,b=void 0===C?{}:C,k=u.ravenPushCallback,w=u.ravenPageName,j=u.ravenEventName,E=u.hideNavbar,L=void 0!==E&&E,F=t.useState(!1),T=F[0],I=F[1];t.useEffect(function(){var e=function(){I(window.scrollY>=50)};return window.addEventListener("scroll",e),function(){return window.removeEventListener("scroll",e)}},[]);var N,A=y&&!T?D.NOVAC:D.DEFAULT,P=A.headerBackground,M=A.logoFill,H=A.loginButtonColorVariant,G=A.hoverColor,U=A.fkcompanyColor,V=A.typographyColor,z=ie({openDelay:0}),W=z.isDropdownVisible,Y=z.hoveredElemIndex,K=z.handleOnMouseEnter,Z=z.handleOnMouseLeave,$=z.handleDropdownMouseEnter,ee=z.handleDropdownMouseLeave,ne=null!==(c=R("utm_source"))&&void 0!==c?c:"organic",te=t.useCallback(function(e,n){return{action_name:e,action_type:n,u_utm_source:ne,loyalty_type:B(h)}},[ne,h]),re=t.useCallback(function(e){var n;if(e.isClickable&&e.link){var t="".concat(null===(n=e.text)||void 0===n?void 0:n.toLowerCase().replace(/\s/g,""),"_header_click"),r=te(t,"click");O(f,j,r,b,k,w),window.location.href=e.link}},[te,f,j,b,k,w]),oe=t.useCallback(function(){var e=te("home_header_click","click");O(f,j,e,b,k,w),window.location.href="/"},[te,f,j,b,k,w]),ae=t.useCallback(function(e){var n,t="".concat(null===(n=e.text)||void 0===n?void 0:n.toLowerCase().replace(/\s/g,""),"_header_hover"),r=te(t,"hover");O(f,j,r,b,k,w)},[te,f,j,b,k,w]);return n.jsxs(n.Fragment,{children:[n.jsx(r.Container,e.__assign({display:"flex",top:0,position:"sticky",width:"100%",alignItems:"center",justifyContent:"center",zIndex:1e3,height:"64px",background:P,css:{gap:"24px",flexShrink:0,borderBottom:"transparent"===P?"":"1px solid #E6E6E6",transition:"background-color 0.3s ease-in-out, border-bottom 0.3s ease-in-out"}},{children:n.jsxs(r.Container,e.__assign({display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 28px",flex:1,css:{gap:"24px",maxWidth:1440}},{children:[n.jsxs(r.Container,e.__assign({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",cursor:"pointer",onClick:oe},{children:[n.jsx(l.CTLogo,{fillColor:M}),n.jsx(a.Divider,{css:{width:12,marginLeft:2,marginRight:2,transform:"rotate(90deg)",borderBottom:"1px solid #e0e0e0"}}),n.jsx(l.Fkcompany,{color:U})]})),!L&&n.jsxs(r.Container,e.__assign({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",columnGap:"24px"},{children:[n.jsx(r.Container,e.__assign({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",columnGap:"4px"},{children:m.map(function(t,o){var a=t.text,l=t.lefticon,c=t.rightIcon,u=t.isHoverable,d=Y===o,p=a===v;if(p&&!X(x))return null;var g=Y===o&&u&&W;return n.jsxs(r.Container,{children:[n.jsx(r.Container,e.__assign({onMouseEnter:function(){K(o),t.isHoverable&&!p&&ae(t)},onMouseLeave:Z,display:"flex",flexDirection:"row",alignItems:"center",padding:p?"":"8px 12px 8px 12px",cursor:"pointer",position:"relative",columnGap:8,height:"64px",onClick:function(){return re(t)}},{children:p?n.jsx(s.EliteLoyaltyPill,{state:q(x,f),animate:!0,onHover:function(){}}):n.jsxs(n.Fragment,{children:[l&&n.jsx(l,{color:d?G:V}),n.jsxs(r.Container,e.__assign({display:"flex",flexDirection:"row",alignItems:"center"},{children:[n.jsx(i.Typography,e.__assign({variant:"B2",colorCode:d?G:V,isClickable:!0},{children:a})),c&&n.jsx(c,{width:20,height:20,fill:d?G:V})]}))]})})),n.jsx(Q,e.__assign({show:g,marginTop:"64px",handleDropdownMouseEnter:$,handleDropdownMouseLeave:ee,onMaskClick:ee},{children:p?n.jsx(Ce,{isOpen:g}):n.jsx(he,{isOpen:g})}))]},"nav-option-".concat(o))})})),f&&n.jsx(a.Divider,{css:{width:12,margin:"0 -18px",transform:"rotate(90deg)",borderBottom:"1px solid #e0e0e0"}}),n.jsx(r.Container,{children:f?n.jsx(r.Container,e.__assign({display:"flex",flexDirection:"row",alignItems:"center"},{children:n.jsx(Be,{})})):n.jsx(o.Button,e.__assign({onClick:function(){return d()},css:e.__assign({width:153,height:40},(N="transparent"===P,N?{backgroundColor:"transparent !important","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.25)!important"}}:{backgroundColor:"transparent !important","&:hover":{backgroundColor:"#F3F3F3 !important"}})),loading:!1,color:H,variant:o.ButtonVariant.OUTLINE},{children:"Log in"}))})]}))]}))})),g&&n.jsx(J,{})]})};exports.Header=function(t){return n.jsx(P,e.__assign({value:t},{children:n.jsx(Oe,{})}))};
2
2
  //# sourceMappingURL=ct-design-header.browser.cjs.js.map