@cleartrip/ct-design-header 1.2.0-SNAPSHOT-header-v0.9.0.0 → 1.2.0-SNAPSHOT-header-v0.11.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.
- package/dist/BusinessDropdown/index.d.ts.map +1 -1
- package/dist/Header.d.ts.map +1 -1
- package/dist/HeaderAnimatedMask /hooks.d.ts.map +1 -1
- package/dist/LobsHeader/index.d.ts.map +1 -1
- package/dist/RewardsSection/LoyaltyChips.d.ts.map +1 -1
- package/dist/RewardsSection/index.d.ts.map +1 -1
- package/dist/UserAccount/UserAccountDropdown.d.ts.map +1 -1
- package/dist/UserAccount/accountOptions.d.ts +1 -0
- package/dist/UserAccount/accountOptions.d.ts.map +1 -1
- package/dist/UserAccount/index.d.ts.map +1 -1
- package/dist/constants.d.ts +34 -31
- package/dist/constants.d.ts.map +1 -1
- package/dist/ct-design-header.browser.cjs.js +1 -1
- package/dist/ct-design-header.browser.cjs.js.map +1 -1
- package/dist/ct-design-header.browser.esm.js +1 -1
- package/dist/ct-design-header.browser.esm.js.map +1 -1
- package/dist/ct-design-header.cjs.js +390 -148
- package/dist/ct-design-header.cjs.js.map +1 -1
- package/dist/ct-design-header.esm.js +391 -149
- package/dist/ct-design-header.esm.js.map +1 -1
- package/dist/ct-design-header.umd.js +390 -148
- package/dist/ct-design-header.umd.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/type.d.ts +17 -1
- package/dist/type.d.ts.map +1 -1
- package/dist/utils.d.ts +8 -0
- package/dist/utils.d.ts.map +1 -0
- package/package.json +7 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/BusinessDropdown/index.tsx"],"names":[],"mappings":";AAQA,OAAO,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/BusinessDropdown/index.tsx"],"names":[],"mappings":";AAQA,OAAO,eAAe,CAAC;AAIvB,UAAU,wBAAwB;IAChC,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,QAAA,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CA4F/D,CAAC;AAcF,eAAe,uBAAuB,CAAC"}
|
package/dist/Header.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../packages/components/Header/src/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
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;AAKtC,OAAO,cAAc,CAAC;AAItB,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAMlC,CAAC;AAmOF,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/HeaderAnimatedMask /hooks.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/HeaderAnimatedMask /hooks.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,iBAAiB,SAAU,OAAO,gBAAgB,MAAM,YAmBpE,CAAC;AAMF,eAAO,MAAM,kBAAkB,gDAsB9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/LobsHeader/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/LobsHeader/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EA2CvB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoyaltyChips.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/RewardsSection/LoyaltyChips.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/RewardsSection/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserAccountDropdown.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/UserAccount/UserAccountDropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
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;AAI/C,OAAO,eAAe,CAAC;AAGvB,QAAA,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAmL1D,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IAccountOptionsPopupConfig } from '../type';
|
|
2
2
|
export declare const ACCOUNT_OPTIONS_POPUP_CONFIG: IAccountOptionsPopupConfig[];
|
|
3
3
|
export declare const SIGN_OUT_TEXT = "Logout";
|
|
4
|
+
export declare const MY_ACCOUNT_TEXT = "My Account";
|
|
4
5
|
export declare const LOGGEDIN_USER_TEXT = "You are logged in with";
|
|
5
6
|
export declare const HEADER_ACCOUNTS_OPTIONS_OPEN_BTN_ID = "header-acc-btn";
|
|
6
7
|
export declare const ACCOUNT_OPTIONS_CONTAINER_ID = "account-options";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accountOptions.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/UserAccount/accountOptions.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAErD,eAAO,MAAM,4BAA4B,EAAE,0BAA0B,EAyCpE,CAAC;AAEF,eAAO,MAAM,aAAa,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"accountOptions.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/UserAccount/accountOptions.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAErD,eAAO,MAAM,4BAA4B,EAAE,0BAA0B,EAyCpE,CAAC;AAEF,eAAO,MAAM,aAAa,WAAW,CAAC;AACtC,eAAO,MAAM,eAAe,eAAe,CAAC;AAE5C,eAAO,MAAM,kBAAkB,2BAA2B,CAAC;AAE3D,eAAO,MAAM,mCAAmC,mBAAmB,CAAC;AACpE,eAAO,MAAM,4BAA4B,oBAAoB,CAAC;AAC9D,eAAO,MAAM,+BAA+B,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/UserAccount/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/components/Header/src/UserAccount/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAahE,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAsFxB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { ButtonColor } from '@cleartrip/ct-design-button';
|
|
2
3
|
export declare const FLIGHTS_URL = "/flights";
|
|
3
4
|
export declare const HOTELS_URL = "/hotels";
|
|
4
5
|
export declare const BUS_URL = "/bus";
|
|
@@ -7,30 +8,16 @@ export declare const MY_TRIPS_URL = "/account/trips";
|
|
|
7
8
|
export declare const CLEARTRIP_FOR_WORK_URL = "https://business.cleartrip.com/";
|
|
8
9
|
export declare const SUPPORT_URL = "/support";
|
|
9
10
|
export declare const PROFILE_DETAILS_URL = "/accounts/profile";
|
|
10
|
-
export
|
|
11
|
-
lefticon:
|
|
11
|
+
export interface NavbarOption {
|
|
12
|
+
lefticon: React.FC<React.SVGProps<SVGSVGElement>>;
|
|
12
13
|
text: string;
|
|
14
|
+
ravenActionName: string;
|
|
13
15
|
isHoverable: boolean;
|
|
14
|
-
isClickable
|
|
15
|
-
link
|
|
16
|
-
rightIcon?:
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
text: string;
|
|
20
|
-
rightIcon: import("react").FC<import("react").SVGProps<SVGSVGElement>>;
|
|
21
|
-
isHoverable: boolean;
|
|
22
|
-
isClickable?: undefined;
|
|
23
|
-
link?: undefined;
|
|
24
|
-
} | {
|
|
25
|
-
lefticon: ({ color }: {
|
|
26
|
-
color?: string | undefined;
|
|
27
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
-
text: string;
|
|
29
|
-
isHoverable: boolean;
|
|
30
|
-
isClickable: boolean;
|
|
31
|
-
link: string;
|
|
32
|
-
rightIcon?: undefined;
|
|
33
|
-
})[];
|
|
16
|
+
isClickable?: boolean;
|
|
17
|
+
link?: string;
|
|
18
|
+
rightIcon?: React.FC<React.SVGProps<SVGSVGElement>>;
|
|
19
|
+
}
|
|
20
|
+
export declare const NAVBAR_OPTIONS: NavbarOption[];
|
|
34
21
|
export declare const LOBS: {
|
|
35
22
|
FLIGHTS: string;
|
|
36
23
|
HOTELS: string;
|
|
@@ -43,24 +30,40 @@ export declare const LOB_DATA: {
|
|
|
43
30
|
image: string;
|
|
44
31
|
link: string;
|
|
45
32
|
}[];
|
|
46
|
-
export
|
|
47
|
-
title: string;
|
|
48
|
-
subtitle: string;
|
|
49
|
-
details: string;
|
|
50
|
-
link?: undefined;
|
|
51
|
-
} | {
|
|
33
|
+
export interface BDConfigProps {
|
|
52
34
|
title: string;
|
|
53
35
|
subtitle: string;
|
|
54
36
|
details: string;
|
|
55
37
|
link: string;
|
|
56
|
-
|
|
38
|
+
ravenActionName?: string;
|
|
39
|
+
}
|
|
40
|
+
export declare const bdConfig: BDConfigProps[];
|
|
57
41
|
export declare const BUSINESS_DROPDOWN_HEADING = "Other business services";
|
|
58
42
|
export declare enum RAVEN_PAGE_NAMES {
|
|
59
43
|
UNIFIED_HOME = "unified_homepage",
|
|
60
|
-
HOTELS_HOME = "
|
|
61
|
-
FLIGHTS_HOME = "
|
|
44
|
+
HOTELS_HOME = "hotel_home",
|
|
45
|
+
FLIGHTS_HOME = "flights_home"
|
|
62
46
|
}
|
|
63
47
|
export declare enum RAVEN_PLATFORMS {
|
|
64
48
|
DESKTOP = "desktop"
|
|
65
49
|
}
|
|
50
|
+
export declare const LOG_IN_TEXT = "Log in";
|
|
51
|
+
export declare const THEME_CONFIG: {
|
|
52
|
+
NOVAC: {
|
|
53
|
+
headerBackground: string;
|
|
54
|
+
hoverColor: string;
|
|
55
|
+
logoFill: string;
|
|
56
|
+
fkcompanyColor: string;
|
|
57
|
+
typographyColor: string;
|
|
58
|
+
loginButtonColorVariant: ButtonColor;
|
|
59
|
+
};
|
|
60
|
+
DEFAULT: {
|
|
61
|
+
headerBackground: string;
|
|
62
|
+
hoverColor: string;
|
|
63
|
+
logoFill: string;
|
|
64
|
+
fkcompanyColor: string;
|
|
65
|
+
typographyColor: string;
|
|
66
|
+
loginButtonColorVariant: ButtonColor;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
66
69
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../packages/components/Header/src/constants.ts"],"names":[],"mappings":";
|
|
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,mCAAmC,CAAC;AAC3D,eAAO,MAAM,YAAY,mBAAmB,CAAC;AAC7C,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;;;;GA+BpB,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;AAGpC,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;CAiBxB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e,n,i=require("tslib"),t=require("react/jsx-runtime"),r=require("react"),o=require("@cleartrip/ct-design-container"),a=require("@cleartrip/ct-design-typography"),s=require("@cleartrip/ct-design-button"),l=require("@cleartrip/ct-design-divider"),c=require("@cleartrip/ct-design-icons"),d=[{lefticon:c.Offers,text:"Offers",isHoverable:!1,isClickable:!0,link:"all-offers/?categories=flights"},{lefticon:c.BusinessBag,text:"Business",rightIcon:c.ChevronDown,isHoverable:!0},{lefticon:c.MyTrips,text:"My Trips",isHoverable:!1,isClickable:!0,link:"/account/trips"},{lefticon:c.SupportIcon,text:"Support",isHoverable:!1,isClickable:!0,link:"/support"}],u=[{title:"Flights",image:"https://rukmini-ct.flixcart.com/f_auto,w_48,h_48,dpr_2/offermgmt-prod/offermgmt/images/banner/flight_uhp.png?cache=true",link:"/flights"},{title:"Hotels",image:"https://rukmini-ct.flixcart.com/f_auto,w_48,h_48,dpr_2/offermgmt-prod/offermgmt/images/banner/hotel_uhp.png?cache=true",link:"/hotels"},{title:"Buses",image:"https://rukmini-ct.flixcart.com/f_auto,w_40,h_40,dpr_2/offermgmt-prod/offermgmt/images/banner/bus_uhp.png?cache=true",link:"/bus"},{title:"Trains",image:"https://rukmini-ct.flixcart.com/f_auto,w_40,h_40,dpr_2/offermgmt-prod/offermgmt/images/banner/train_uhp.png?cache=true",link:"/pages/trains/appOnly"},{title:"Packages",image:"https://rukmini-ct.flixcart.com/f_auto,w_40,h_40,dpr_2/offermgmt-prod/offermgmt/images/banner/holiday_uhp.png?cache=true",link:"/holidays"}],p=[{title:"AgentBox",subtitle:"For travel agents",details:"One-stop travel solution offering the best deals to our travel agency partners"},{title:"OutOfOffice",subtitle:"For startups, corporates and SMEs",details:"Manage corporate business travel, smartly"},{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"}];!function(e){e.UNIFIED_HOME="unified_homepage",e.HOTELS_HOME="hotels_homepage",e.FLIGHTS_HOME="flights_homepage"}(e||(e={})),function(e){e.DESKTOP="desktop"}(n||(n={}));var h=r.createContext(void 0),g=function(){var e=r.useContext(h);if(!e)throw new Error("useHeaderContext must be used within a HeaderProvider");return e},x=function(e){var n=e.value,r=e.children;return t.jsx(h.Provider,i.__assign({value:n},{children:r}))},f=function(){var e=g().selectedLOB;return t.jsx(o.Container,i.__assign({display:"flex",alignItems:"center",justifyContent:"center",padding:"16px",height:"64",background:"#F3F5FA",top:"64px",zIndex:2,css:{gap:40}},{children:u.map((function(n,r){return t.jsxs(o.Container,i.__assign({display:"flex",alignItems:"center",cursor:"pointer",css:{gap:8,background:e===n.title?"#FFFFFF":"transparent",borderRadius:e===n.title?"40px":"0",padding:e===n.title?"8px 16px 8px 8px":"0"},onClick:function(){window.location.href=n.link}},{children:[t.jsx("img",{src:n.image,alt:n.title,width:32,height:32}),t.jsx(a.Typography,i.__assign({variant:"P1",style:{fontWeight:e===n.title?600:500},isClickable:!0},{children:n.title}))]}),r)}))}))};function m(e){var n=e.children,a=e.onMaskClick,s=e.show,l=e.marginTop,c=e.handleDropdownMouseEnter,d=e.handleDropdownMouseLeave;r.useEffect((function(){return s&&(document.body.style.overflow="hidden"),function(){document.body.style.overflow="initial"}}),[s]);var u=function(e,n){var i=r.useState(e),t=i[0],o=i[1],a=r.useRef();return r.useEffect((function(){return e?o(e):a.current=setTimeout((function(){o(!1)}),n),function(){(null==a?void 0:a.current)&&clearTimeout(a.current)}}),[e]),t}(s,300),p=function(e,n){var i=r.useState(!1),t=i[0],o=i[1],a=r.useRef();return r.useEffect((function(){return e&&!t?setTimeout((function(){o(!0)}),0):!e&&t&&(a.current=setTimeout((function(){return o(!1)}),n)),function(){a&&a.current&&clearTimeout(a.current)}}),[n,e]),t}(s,100),h=p;return t.jsxs(t.Fragment,{children:[u&&t.jsx(o.Container,{id:"mask-container",css:{position:"fixed",backgroundColor:"#000",opacity:h?.4:0,width:"100%",height:"100vh",left:0,top:l||0,zIndex:9,transition:"opacity 300ms ease-in"},onClick:a}),u&&t.jsx(o.Container,i.__assign({onMouseEnter:c,onMouseLeave:d},{children:n}))]})}var y,v,C,_=function(e){var n=void 0===e?{}:e,i=n.closeDelay,t=void 0===i?0:i,o=n.openDelay,a=void 0===o?500:o,s=Math.max(t,150),l=r.useState(!1),c=l[0],d=l[1],u=r.useState(null),p=u[0],h=u[1],g=r.useRef(null),x=r.useRef(null),f=r.useRef(!1),m=r.useCallback((function(e){g.current&&clearTimeout(g.current),x.current&&clearTimeout(x.current),f.current=!1,x.current=setTimeout((function(){d(!0),f.current||h(e)}),a)}),[a]),y=r.useCallback((function(){f.current=!0,g.current=setTimeout((function(){d(!1),h(null)}),s)}),[s]),v=r.useCallback((function(){g.current&&clearTimeout(g.current)}),[]),C=r.useCallback((function(){f.current=!0,(null==g?void 0:g.current)&&clearTimeout(g.current),g.current=setTimeout((function(){d(!1),h(null)}),s)}),[]);return r.useEffect((function(){var e=function(e){e.clientY<=0&&(d(!1),h(null))};return window.addEventListener("mouseleave",e),function(){window.removeEventListener("mouseleave",e)}}),[]),{isDropdownVisible:c,hoveredElemIndex:p,handleOnMouseEnter:m,handleOnMouseLeave:y,handleDropdownMouseEnter:v,handleDropdownMouseLeave:C}},w=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}},b=function(e){var n=e.isOpen,s=r.useState(0),l=s[0],c=s[1],d=w(n).containerRef;return r.useEffect((function(){var e=function(){if(d.current){var e=(window.innerWidth-(d.current.offsetWidth||0))/2;e!==l&&c(e)}};return e(),window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[d,l]),t.jsxs(o.Container,i.__assign({ref:d,backgroundColor:"#fff",top:"76px",position:"fixed",left:"".concat(l,"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:[t.jsx(o.Container,i.__assign({padding:"20px 24px 20px 24px",backgroundColor:"#FFF1EC"},{children:t.jsx(a.Typography,i.__assign({variant:"HM2",css:{lineHeight:"24px"}},{children:"Other business services"}))})),t.jsx(o.Container,i.__assign({display:"flex",flexDirection:"row",padding:"24px",columnGap:"48px",width:"fit-content"},{children:p.map((function(e){var n=e.title,r=e.subtitle,s=e.details;return t.jsxs(o.Container,i.__assign({cursor:"pointer",width:"200px",className:"bd-hover-container"},{children:[t.jsxs(o.Container,i.__assign({display:"flex",flexDirection:"row",alignItems:"center",columnGap:"8px"},{children:[t.jsx(a.Typography,i.__assign({variant:"HM2",className:"color-orange-on-hover"},{children:n})),t.jsx(F,{})]})),t.jsx(a.Typography,i.__assign({variant:"B3",css:{marginTop:"4px",opacity:.75}},{children:r})),t.jsx(a.Typography,i.__assign({variant:"P3",color:"subheading",css:{marginTop:"12px"}},{children:s}))]}),n)}))}))]}))},F=function(){return t.jsx(o.Container,i.__assign({className:"bd-arrow-container"},{children:i.__spreadArray([],Array(3),!0).map((function(e,n){return t.jsx(o.Container,i.__assign({className:"bd-arrow-wrapper"},{children:t.jsx(c.ArrowRight,{})}),n)}))}))},j=[{text:"My Profile",icon:t.jsx(c.MyAccount,{width:24,height:24}),redirectionLink:"/accounts/profile"},{text:"My Trips",icon:t.jsx(c.MyTrips,{width:24,height:24}),redirectionLink:"/accounts/trips"},{text:"Saved Cards",icon:t.jsx(c.SavedCard,{}),redirectionLink:"/accounts/expressway"},{text:"Saved Travellers",icon:t.jsx(c.Travellers,{width:24,height:24}),redirectionLink:"/account/travellers"},{text:"Hi-Five",icon:t.jsx(c.HiFive,{}),redirectionLink:"/accounts/hi-five?src=fh"},{text:"Wallet",icon:t.jsx(c.Wallet,{width:24,height:24}),redirectionLink:"/accounts/wallet"},{text:"Settings",icon:t.jsx(c.SettingsCog,{width:24,height:24}),redirectionLink:"/account/settings"},{text:"Privacy Rights",icon:t.jsx(c.PrivacyRights,{}),redirectionLink:"accounts/personal-data-dashboard"}],k="You are logged in with",L="header-acc-btn",E="account-options",I=function(e){var n=e.icon,a=e.borderGradient,s=e.backgroundGradient,l=e.handleChipClick,d=e.chevronFillColor,u=r.useState(!1),p=u[0],h=u[1];return t.jsxs(o.Container,i.__assign({display:"flex",position:"relative",alignItems:"center",justifyContent:"center",borderRadius:"8px",cursor:"pointer",paddingLeft:"8px",paddingRight:p?"4px":"8px",css:{overflow:"hidden",height:32,paddingLeft:8,transition:"padding-right 0.2s ease-in-out"},onMouseEnter:function(){return h(!0)},onMouseLeave:function(){return h(!1)},onClick:function(){window.location.href="/",l&&l()}},{children:[t.jsx(o.Container,{style:{content:'""',position:"absolute",inset:0,borderRadius:"inherit",background:s,zIndex:-2}}),t.jsx(o.Container,{style:{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}}),t.jsx(o.Container,i.__assign({display:"flex",alignItems:"center",position:"relative"},{children:n})),t.jsx(o.Container,i.__assign({display:"flex",alignItems:"center",style:{overflow:"hidden",maxWidth:p?16:0,transition:"max-width 0.2s ease-in-out, opacity 0.2s ease-in-out",opacity:p?.5:0}},{children:t.jsx(c.HeaderChevronRight,{color:d})}))]}))};exports.LOBS_VALUES=void 0,(y=exports.LOBS_VALUES||(exports.LOBS_VALUES={})).FLIGHTS="Flights",y.HOTELS="Hotels",y.BUSES="Buses",y.TRAINS="Trains",y.PACKAGES="Packages",exports.LoyaltyType=void 0,(v=exports.LoyaltyType||(exports.LoyaltyType={})).FkVip="FkVip",v.FkPremium="FkPremium",v.InsiderIcon="InsiderIcon",v.InsiderElite="InsiderElite",v.CtLoyalty="CtLoyalty";var T=((C={})[exports.LoyaltyType.FkVip]={icon:t.jsx(c.FkVip,{}),borderGradient:"linear-gradient(222.13deg, rgba(243, 179, 39, 0) 2.08%, #F3B327 85.17%)",backgroundGradient:"linear-gradient(111deg, #360042 0%, #540061 100%)",chevronFillColor:"#FFF"},C[exports.LoyaltyType.FkPremium]={icon:t.jsx(c.FkPremium,{}),borderGradient:"linear-gradient(230.68deg, rgba(243, 179, 39, 0) 10.1%, #F3B327 45.74%)",backgroundGradient:"linear-gradient(180deg, #04176A 0%, #082395 100%)",chevronFillColor:"#FFF"},C[exports.LoyaltyType.InsiderIcon]={icon:t.jsx(c.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"},C[exports.LoyaltyType.InsiderElite]={icon:t.jsx(c.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"},C[exports.LoyaltyType.CtLoyalty]={icon:t.jsx(c.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"},C),M=function(e){var n=e.icon,s=e.handleChipClick,l=e.value,d=e.type,u=r.useState(!1),p=u[0],h=u[1];return t.jsxs(o.Container,i.__assign({display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"8px",cursor:"pointer",style:{height:32,paddingLeft:8,paddingRight:p?4:8,transition:"padding-right 0.2s ease-in-out",background:p?"#ffd7ca":"#ffe6df"},onMouseEnter:function(){return h(!0)},onMouseLeave:function(){return h(!1)},onClick:function(){"supercoins"===d?window.location.href="/supercoins":"wallet"===d&&(window.location.href="/wallet"),s&&s()}},{children:[t.jsxs(o.Container,i.__assign({display:"flex",alignItems:"center",css:{gap:"4px"}},{children:[n,t.jsx(a.Typography,i.__assign({variant:"B3",isClickable:!0},{children:l}))]})),t.jsx(o.Container,i.__assign({display:"flex",alignItems:"center",style:{overflow:"hidden",maxWidth:p?16:0,transition:"max-width 0.2s ease-in-out, opacity 0.2s ease-in-out",opacity:p?1:0}},{children:t.jsx(c.HeaderChevronRight,{})}))]}))},A=function(){var e,n=g(),r=n.loyaltyType,a=n.fkSupercoinBurnBalance,s=void 0===a?0:a,l=n.walletBalance,d=void 0===l?0:l,u=n.loyaltyLoading,p=n.superCoinsLoading,h=n.walletLoading,x=n.walletChipClick,f=n.supercoinsChipClick,m=n.loyaltyChipClick,y=n.hideWalletChip,v=n.hideSupercoinsChip,C=n.hideLoyaltyChip;return t.jsxs(o.Container,i.__assign({display:"flex",padding:"0 16px 16px 16px",justifyContent:"flex-start",css:{alignSelf:"stretch",gap:"4px"}},{children:[u?t.jsx(o.Container,{width:"50px",height:"32px",borderRadius:"8px",backgroundColor:"#efefef"}):r&&T[r]&&!C&&t.jsx(I,{icon:T[r].icon,borderGradient:T[r].borderGradient,backgroundGradient:T[r].backgroundGradient,chevronFillColor:(null===(e=T[r])||void 0===e?void 0:e.chevronFillColor)||"#FFF",handleChipClick:m}),p?t.jsx(o.Container,{width:"50px",height:"32px",borderRadius:"8px",backgroundColor:"#efefef"}):!v&&t.jsx(M,{icon:t.jsx(c.Supercoin,{width:20,height:20}),value:s,handleChipClick:f,type:"supercoins"}),h?t.jsx(o.Container,{width:"50px",height:"32px",borderRadius:"8px",backgroundColor:"#efefef"}):!y&&t.jsx(M,{icon:t.jsx(c.Wallet,{width:20,height:20}),value:d,handleChipClick:x,type:"wallet"})]}))},D=function(e){var n=e.isOpen,s=g(),d=s.handleLogoutClick,u=s.userName,p=s.userMobileNumber,h=s.countryCode,x=s.userDetailsLoading,f=w(n).containerRef,m=r.useMemo((function(){return{userGreeting:u&&"Hello ".concat(u,"!"),phoneNumber:h&&p?"".concat(h," ").concat(p):""}}),[u,p,h]),y=m.userGreeting,v=m.phoneNumber;r.useEffect((function(){var e,n=document.getElementById(L),i=document.getElementById(E);e=null==n?void 0:n.getBoundingClientRect().right,i&&e&&(i.style.left="".concat(e-328,"px"))}),[]);var C;return t.jsxs(o.Container,i.__assign({id:E,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:[t.jsx(o.Container,i.__assign({padding:"16px",height:"72px"},{children:(C=function(e,n,r,s){return t.jsx(a.Typography,i.__assign({variant:r,color:s},{children:e?t.jsx(o.Container,{height:"HM3"===r?"18px":"12px",width:"HM3"===r?"140px":"200px",backgroundColor:"#efefef",borderRadius:"8px"}):n}))},t.jsx(o.Container,i.__assign({display:"flex",flexDirection:"column",css:{gap:"4px"}},{children:y?t.jsxs(t.Fragment,{children:[C(x,y,"HM3","primary"),C(x,"".concat(k," ").concat(v),"P3","subheading")]}):t.jsxs(t.Fragment,{children:[C(x,k,"P3","subheading"),C(x,v,"HM3","primary")]})})))})),t.jsx(A,{}),t.jsxs(o.Container,i.__assign({display:"flex",flexDirection:"column",padding:"8px",backgroundColor:"white",rowGap:"8px",style:{borderBottomLeftRadius:12,borderBottomRightRadius:12}},{children:[j.map((function(e){var n,r=e.text,s=e.icon,l=e.redirectionLink;return t.jsx(o.Container,i.__assign({className:"hoverable-container",padding:"8px",borderRadius:"8px",cursor:"pointer",onClick:(n=l,function(){window.location.href=n})},{children:t.jsxs(o.Container,i.__assign({display:"flex",cursor:"pointer",style:{columnGap:"8px"}},{children:[s,t.jsx(a.Typography,i.__assign({variant:"P1",css:{display:"flex",alignItems:"center",cursor:"pointer"}},{children:r}))]}))}),"account-option-".concat(r))})),t.jsx(l.Divider,{style:{borderBottom:"1px dashed #E6E6E6"}}),t.jsxs(o.Container,i.__assign({className:"logout-button",display:"flex",padding:"8px",borderRadius:"8px",cursor:"pointer",onClick:d},{children:[t.jsx(c.Signout,{height:24,width:24}),t.jsx(a.Typography,i.__assign({variant:"P1",css:{display:"flex",alignItems:"center",cursor:"pointer"},color:"warning"},{children:"Logout"}))]}))]}))]}))},S=function(){var e=g().isNovacThemeEnabled,n=_({openDelay:0}),s=n.isDropdownVisible,l=n.handleOnMouseEnter,d=n.handleOnMouseLeave,u=n.handleDropdownMouseEnter,p=n.handleDropdownMouseLeave,h=r.useState(!1),x=h[0],f=h[1];r.useEffect((function(){var e=function(){f(window.scrollY>=100)};return window.addEventListener("scroll",e),function(){return window.removeEventListener("scroll",e)}}),[]);var y=e&&!x,v=y?"#FFB8A5":"#FF4F17";return t.jsxs(o.Container,{children:[t.jsxs(o.Container,i.__assign({display:"flex",padding:"8px 12px",alignItems:"center",borderRadius:"12px",height:"100%",cursor:"pointer",style:{columnGap:8,height:64},onMouseEnter:function(){return l(0)},onMouseLeave:d,id:L},{children:[t.jsx(c.MyAccount,{color:s?v:y?"#FFF":"#1A1A1A"}),t.jsxs(o.Container,i.__assign({display:"flex",flexDirection:"row",alignItems:"center"},{children:[t.jsx(a.Typography,i.__assign({variant:"B2",css:{cursor:"pointer"},colorCode:s?v:y?"#FFF":"#1A1A1A"},{children:"My Account"})),t.jsx(c.ChevronDown,{width:20,height:20,fill:s?v:y?"#FFF":"#1A1A1A"})]}))]})),t.jsx(m,i.__assign({show:s,marginTop:"64px",handleDropdownMouseEnter:u,handleDropdownMouseLeave:p,onMaskClick:p},{children:t.jsx(D,{isOpen:s})}))]})},H=function(){var e=g(),n=e.onLoginButtonClick,u=e.showAllLobs,p=void 0!==u&&u,h=e.isUserLoggedIn;e.loyaltyType;var x=e.isNovacThemeEnabled,y=void 0!==x&&x;e.ravenPayload,e.ravenPushCallback,e.ravenPageName,e.ravenEventName;var v=r.useState(!1),C=v[0],w=v[1];r.useEffect((function(){var e=function(){w(window.scrollY>=100)};return window.addEventListener("scroll",e),function(){return window.removeEventListener("scroll",e)}}),[]);var F=y&&!C,j=F?"transparent":"#F7FAFF",k=F?"#FFB8A5":"#FF4F17",L=_({openDelay:0}),E=L.isDropdownVisible,I=L.hoveredElemIndex,T=L.handleOnMouseEnter,M=L.handleOnMouseLeave,A=L.handleDropdownMouseEnter,D=L.handleDropdownMouseLeave;return t.jsxs(t.Fragment,{children:[t.jsx(o.Container,i.__assign({display:"flex",top:0,position:"sticky",width:"100%",alignItems:"center",justifyContent:"center",zIndex:1e3,height:"64px",background:j,css:{gap:"24px",flexShrink:0,borderBottom:F?"":"1px solid #E6E6E6",transition:"background-color 0.3s ease-in-out, border-bottom 0.3s ease-in-out"}},{children:t.jsxs(o.Container,i.__assign({display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 28px",flex:1,style:{gap:"24px",maxWidth:1440}},{children:[t.jsxs(o.Container,i.__assign({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",cursor:"pointer",paddingLeft:"16px",onClick:function(){window.location.href="/"}},{children:[t.jsx(c.CTLogo,{fillColor:F?"#FFF":"#FF4F17"}),t.jsx(l.Divider,{css:{width:12,marginLeft:2,marginRight:2,transform:"rotate(90deg)",borderBottom:"1px solid #e0e0e0"}}),t.jsx(c.Fkcompany,{color:F?"#FFF":"#1A1A1A"})]})),t.jsxs(o.Container,i.__assign({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",columnGap:"24px"},{children:[t.jsx(o.Container,i.__assign({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",columnGap:"4px"},{children:d.map((function(e,n){var r=I===n;return t.jsxs(o.Container,{children:[t.jsxs(o.Container,i.__assign({onMouseEnter:function(){return T(n)},onMouseLeave:M,display:"flex",flexDirection:"row",alignItems:"center",padding:"8px 12px 8px 12px",cursor:"pointer",position:"relative",columnGap:8,height:"64px",onClick:function(){e.link&&e.isClickable&&(window.location.href=e.link)}},{children:[t.jsx(e.lefticon,{color:r?k:F?"#FFF":"#1A1A1A"}),t.jsxs(o.Container,i.__assign({display:"flex",flexDirection:"row",alignItems:"center"},{children:[t.jsx(a.Typography,i.__assign({variant:"B2",colorCode:r?k:F?"#FFF":"#1A1A1A",isClickable:!0},{children:e.text})),e.rightIcon&&t.jsx(e.rightIcon,{width:20,height:20,fill:r?k:F?"#FFF":"#1A1A1A"})]}))]}),"nav-option-".concat(n)),t.jsx(m,i.__assign({show:I===n&&e.isHoverable&&E,marginTop:"64px",handleDropdownMouseEnter:A,handleDropdownMouseLeave:D,onMaskClick:D},{children:t.jsx(b,{isOpen:I===n&&e.isHoverable&&E})}))]})}))})),h&&t.jsx(l.Divider,{style:{width:12,margin:"0 -18px",transform:"rotate(90deg)",borderBottom:"1px solid #e0e0e0"}}),t.jsx(o.Container,{children:h?t.jsx(o.Container,i.__assign({display:"flex",flexDirection:"row",alignItems:"center"},{children:t.jsx(S,{})})):t.jsx(s.Button,i.__assign({className:"fw-400 fs-14 ".concat(F?"novac-login-button":"login-button"),onClick:n,style:{width:153,height:40,border:F?"1px solid #FFF":"1px solid #1A1A1A"},loading:!1},{children:t.jsx(a.Typography,i.__assign({componentNode:"span",variant:"L2",color:F?"neutral":"primary"},{children:"Login"}))}))})]}))]}))})),p&&t.jsx(f,{})]})};exports.Header=function(e){return t.jsx(x,i.__assign({value:e},{children:t.jsx(H,{})}))};
|
|
1
|
+
"use strict";var e,n,r=require("tslib"),i=require("react/jsx-runtime"),t=require("react"),o=require("@cleartrip/ct-design-container"),a=require("@cleartrip/ct-design-typography"),s=require("@cleartrip/ct-design-button"),c=require("@cleartrip/ct-design-divider"),l=require("@cleartrip/ct-design-icons"),u=[{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:"/account/trips"},{lefticon:l.SupportIcon,text:"Support",ravenActionName:"support",isHoverable:!1,isClickable:!0,link:"/support"}],d=[{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:"Trains",image:"https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Trains.png?cache=true",link:"/pages/trains/appOnly"},{title:"Packages",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"}],p=[{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,(e=exports.RAVEN_PAGE_NAMES||(exports.RAVEN_PAGE_NAMES={})).UNIFIED_HOME="unified_homepage",e.HOTELS_HOME="hotel_home",e.FLIGHTS_HOME="flights_home",function(e){e.DESKTOP="desktop"}(n||(n={}));var g={NOVAC:{headerBackground:"transparent",hoverColor:"#FFB8A5",logoFill:"#FFF",fkcompanyColor:"#FFF",typographyColor:"#FFF",loginButtonColorVariant:s.ButtonColor.NEUTRAL},DEFAULT:{headerBackground:"#F7FAFF",hoverColor:"#FF4F17",logoFill:"#FF4F17",fkcompanyColor:"#1A1A1A",typographyColor:"#1A1A1A",loginButtonColorVariant:s.ButtonColor.PRIMARY}},h=t.createContext(void 0),f=function(){var e=t.useContext(h);if(!e)throw new Error("useHeaderContext must be used within a HeaderProvider");return e},x=function(e){var n=e.value,t=e.children;return i.jsx(h.Provider,r.__assign({value:n},{children:t}))},v=function(){var e=f().selectedLOB;return i.jsx(o.Container,r.__assign({display:"flex",alignItems:"center",justifyContent:"center",padding:"16px",height:"64",background:"#F3F5FA",top:"64px",zIndex:2,css:{gap:40}},{children:d.map((function(n,t){var s=n.title,c=n.link,l=n.image;return i.jsxs(o.Container,r.__assign({display:"flex",alignItems:"center",cursor:"pointer",css:{gap:8,background:e===s?"#FFFFFF":"transparent",borderRadius:e===s?"40px":"0",padding:e===s?"8px 16px 8px 8px":"0"},onClick:function(){window.location.href=c}},{children:[i.jsx("img",{src:l,alt:s,width:32,height:32}),i.jsx(a.Typography,r.__assign({variant:e===s?a.TypographyVariant.HM3:a.TypographyVariant.B1,isClickable:!0},{children:s}))]}),t)}))}))};function y(e){var n=e.children,a=e.onMaskClick,s=e.show,c=e.marginTop,l=e.handleDropdownMouseEnter,u=e.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 i.jsxs(i.Fragment,{children:[d&&i.jsx(o.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}),d&&i.jsx(o.Container,r.__assign({onMouseEnter:l,onMouseLeave:u},{children:n}))]})}var m,_,C,b=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),c=t.useState(!1),l=c[0],u=c[1],d=t.useState(null),p=d[0],g=d[1],h=t.useRef(null),f=t.useRef(null),x=t.useRef(!1),v=t.useCallback((function(e){h.current&&clearTimeout(h.current),f.current&&clearTimeout(f.current),x.current=!1,f.current=setTimeout((function(){u(!0),x.current||g(e)}),a)}),[a]),y=t.useCallback((function(){x.current=!0,h.current=setTimeout((function(){u(!1),g(null)}),s)}),[s]),m=t.useCallback((function(){h.current&&clearTimeout(h.current)}),[]),_=t.useCallback((function(){x.current=!0,(null==h?void 0:h.current)&&clearTimeout(h.current),h.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:l,hoveredElemIndex:p,handleOnMouseEnter:v,handleOnMouseLeave:y,handleDropdownMouseEnter:m,handleDropdownMouseLeave:_}},k=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}},w=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},j=function(e){return"undefined"!=typeof window&&window?new URLSearchParams(window.location.search).get(e):""},F=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""}},E=function(e,i,t,o,a,s){var c;if("function"==typeof a){var l={page_name:s,platform:n.DESKTOP,login_status:e?"yes":"no",domain:null===(c=null===window||void 0===window?void 0:window.location)||void 0===c?void 0:c.host},u=w(t),d=w(o),p=r.__assign(r.__assign(r.__assign({},l),u),d);try{1===a.length?a({eventName:i,eventData:p}):a(i,p)}catch(e){return void console.error(e)}}else console.error("ravenPushCallback is not provided or is not a function")},L=function(e){var n=e.isOpen,s=f(),c=s.isUserLoggedIn,l=s.ravenPushCallback,u=s.ravenPageName,d=s.ravenEventName,g=s.loyaltyType,h=s.ravenPayload,x=void 0===h?{}:h,v=t.useState(0),y=v[0],m=v[1],_=k(n).containerRef;t.useEffect((function(){var e=function(){if(_.current){var e=(window.innerWidth-(_.current.offsetWidth||0))/2;e!==y&&m(e)}};return e(),window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[_,y]);var C=t.useCallback((function(e,n,r){var i,t=null!==(i=j("utm_source"))&&void 0!==i?i:"organic",o={action_name:r?"".concat(r,"_business_click"):n?"".concat(n.toLowerCase(),"_business_click"):"",action_type:"click",u_utm_source:t,loyalty_type:F(g)};e&&(E(c,d,o,x,l,u),window.location.href=e)}),[c,d,x,l,u,g]);return i.jsxs(o.Container,r.__assign({ref:_,backgroundColor:"#fff",top:"76px",position:"fixed",left:"".concat(y,"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:[i.jsx(o.Container,r.__assign({padding:"20px 24px 20px 24px",backgroundColor:"#FFF1EC"},{children:i.jsx(a.Typography,r.__assign({variant:"HM2"},{children:"Other business services"}))})),i.jsx(o.Container,r.__assign({display:"flex",flexDirection:"row",padding:"24px",columnGap:"48px",width:"fit-content"},{children:p.map((function(e){var n=e.title,t=e.subtitle,s=e.details,c=e.link,l=e.ravenActionName;return i.jsxs(o.Container,r.__assign({cursor:"pointer",width:"200px",className:"bd-hover-container",onClick:function(){return C(c,n,l)}},{children:[i.jsxs(o.Container,r.__assign({display:"flex",flexDirection:"row",alignItems:"center",columnGap:"8px"},{children:[i.jsx(a.Typography,r.__assign({variant:"HM2",className:"color-orange-on-hover"},{children:n})),i.jsx(T,{})]})),i.jsx(a.Typography,r.__assign({variant:"B3",css:{marginTop:"4px",opacity:.75}},{children:t})),i.jsx(a.Typography,r.__assign({variant:"P3",color:"subheading",css:{marginTop:"12px"}},{children:s}))]}),n)}))}))]}))},T=function(){return i.jsx(o.Container,r.__assign({className:"bd-arrow-container"},{children:r.__spreadArray([],Array(3),!0).map((function(e,n){return i.jsx(o.Container,r.__assign({className:"bd-arrow-wrapper"},{children:i.jsx(l.ArrowRight,{})}),n)}))}))},I=[{text:"My Profile",icon:i.jsx(l.MyAccount,{width:24,height:24}),redirectionLink:"/accounts/profile"},{text:"My Trips",icon:i.jsx(l.MyTrips,{width:24,height:24}),redirectionLink:"/accounts/trips"},{text:"Saved Cards",icon:i.jsx(l.SavedCard,{}),redirectionLink:"/accounts/expressway"},{text:"Saved Travellers",icon:i.jsx(l.Travellers,{width:24,height:24}),redirectionLink:"/account/travellers"},{text:"Hi-Five",icon:i.jsx(l.HiFive,{}),redirectionLink:"/accounts/hi-five?src=fh"},{text:"Wallet",icon:i.jsx(l.Wallet,{width:24,height:24}),redirectionLink:"/accounts/wallet"},{text:"Settings",icon:i.jsx(l.SettingsCog,{width:24,height:24}),redirectionLink:"/account/settings"},{text:"Privacy Rights",icon:i.jsx(l.PrivacyRights,{}),redirectionLink:"accounts/personal-data-dashboard"}],M="Logout",A="My Account",N="You are logged in with",P="header-acc-btn",D="account-options",B=function(e){var n=e.icon,a=e.borderGradient,s=e.backgroundGradient,c=e.handleChipClick,u=e.chevronFillColor,d=f(),p=d.loyaltyType,g=d.isUserLoggedIn,h=d.ravenPushCallback,x=d.ravenPageName,v=d.ravenPayload,y=void 0===v?{}:v,m=d.ravenEventName,_=t.useState(!1),C=_[0],b=_[1],k=t.useCallback((function(){var e;if(c)c();else{var n={action_name:"loyalty_account_click",action_type:"click",u_utm_source:null!==(e=j("utm_source"))&&void 0!==e?e:"organic",loyaltyType:F(p)};E(g,m,n,y,h,x),window.location.href="/all-offers/loyalty-october"}}),[c,p,g,m,y,h,x]);return i.jsxs(o.Container,r.__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:[i.jsx(o.Container,{css:{content:'""',position:"absolute",inset:0,borderRadius:"inherit",background:s,zIndex:-2}}),i.jsx(o.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}}),i.jsx(o.Container,r.__assign({display:"flex",alignItems:"center",position:"relative"},{children:n})),i.jsx(o.Container,r.__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:i.jsx(l.HeaderChevronRight,{color:u})}))]}))};exports.LOBS_VALUES=void 0,(m=exports.LOBS_VALUES||(exports.LOBS_VALUES={})).FLIGHTS="Flights",m.HOTELS="Hotels",m.BUSES="Buses",m.TRAINS="Trains",m.PACKAGES="Packages",exports.LoyaltyType=void 0,(_=exports.LoyaltyType||(exports.LoyaltyType={})).FkVip="FkVip",_.FkPremium="FkPremium",_.InsiderIcon="InsiderIcon",_.InsiderElite="InsiderElite",_.CtLoyalty="CtLoyalty";var R=((C={})[exports.LoyaltyType.FkVip]={icon:i.jsx(l.FkVip,{}),borderGradient:"linear-gradient(222.13deg, rgba(243, 179, 39, 0) 2.08%, #F3B327 85.17%)",backgroundGradient:"linear-gradient(111deg, #360042 0%, #540061 100%)",chevronFillColor:"#FFF"},C[exports.LoyaltyType.FkPremium]={icon:i.jsx(l.FkPremium,{}),borderGradient:"linear-gradient(230.68deg, rgba(243, 179, 39, 0) 10.1%, #F3B327 45.74%)",backgroundGradient:"linear-gradient(180deg, #04176A 0%, #082395 100%)",chevronFillColor:"#FFF"},C[exports.LoyaltyType.InsiderIcon]={icon:i.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"},C[exports.LoyaltyType.InsiderElite]={icon:i.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"},C[exports.LoyaltyType.CtLoyalty]={icon:i.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"},C),S=function(e){var n=e.icon,s=e.handleChipClick,c=e.value,u=e.type,d=f(),p=d.loyaltyType,g=d.isUserLoggedIn,h=d.ravenPushCallback,x=d.ravenPageName,v=d.ravenEventName,y=d.ravenPayload,m=void 0===y?{}:y,_=t.useState(!1),C=_[0],b=_[1],k=t.useCallback((function(){var e;if(s)s();else{var n=null!==(e=j("utm_source"))&&void 0!==e?e:"organic",r={action_name:"".concat(u,"_account_click"),action_type:"click",u_utm_source:n,loyaltyType:F(p)};E(g,v,r,m,h,x);var i={supercoin:"/all-offers/supercoins/",wallet:"/accounts/wallet"};i[u]&&(window.location.href=i[u])}}),[s,u,p,g,v,m,h,x]);return i.jsxs(o.Container,r.__assign({display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"8px",cursor:"pointer",css:{height:32,paddingLeft:8,paddingRight:C?4:8,transition:"padding-right 0.2s ease-in-out",background:C?"#ffd7ca":"#ffe6df"},onMouseEnter:function(){return b(!0)},onMouseLeave:function(){return b(!1)},onClick:k},{children:[i.jsxs(o.Container,r.__assign({display:"flex",alignItems:"center",css:{gap:"4px"}},{children:[n,i.jsx(a.Typography,r.__assign({variant:"B3",isClickable:!0},{children:c}))]})),i.jsx(o.Container,r.__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?1:0}},{children:i.jsx(l.HeaderChevronRight,{})}))]}))},H=function(){var e,n=f(),t=n.loyaltyType,a=n.fkSupercoinBurnBalance,s=void 0===a?0:a,c=n.walletBalance,u=void 0===c?0:c,d=n.loyaltyLoading,p=n.superCoinsLoading,g=n.walletLoading,h=n.walletChipClick,x=n.supercoinsChipClick,v=n.loyaltyChipClick,y=n.hideWalletChip,m=n.hideSupercoinsChip,_=n.hideLoyaltyChip;return d||t&&R[t]&&!_||(p||!m)||(g||!y)?i.jsxs(o.Container,r.__assign({display:"flex",padding:"0 16px 16px 16px",justifyContent:"flex-start",css:{alignSelf:"stretch",gap:"4px"}},{children:[d?i.jsx(o.Container,{width:"50px",height:"32px",borderRadius:"8px",backgroundColor:"#efefef"}):t&&R[t]&&!_&&i.jsx(B,{icon:R[t].icon,borderGradient:R[t].borderGradient,backgroundGradient:R[t].backgroundGradient,chevronFillColor:(null===(e=R[t])||void 0===e?void 0:e.chevronFillColor)||"#FFF",handleChipClick:v}),p?i.jsx(o.Container,{width:"50px",height:"32px",borderRadius:"8px",backgroundColor:"#efefef"}):!m&&i.jsx(S,{icon:i.jsx(l.Supercoin,{width:20,height:20}),value:s,handleChipClick:x,type:"supercoin"}),g?i.jsx(o.Container,{width:"50px",height:"32px",borderRadius:"8px",backgroundColor:"#efefef"}):!y&&i.jsx(S,{icon:i.jsx(l.Wallet,{width:20,height:20}),value:u,handleChipClick:h,type:"wallet"})]})):null},O=function(e){var n=e.isOpen,s=f(),u=s.handleLogoutClick,d=s.userName,p=s.userMobileNumber,g=s.countryCode,h=s.userDetailsLoading,x=s.loyaltyType,v=s.isUserLoggedIn,y=s.ravenEventName,m=s.ravenPageName,_=s.ravenPayload,C=void 0===_?{}:_,b=s.ravenPushCallback,w=k(n).containerRef,L=t.useMemo((function(){return{userGreeting:d?"Hello ".concat(d,"!"):"",phoneNumber:g&&p?"".concat(g," ").concat(p):""}}),[d,p,g]),T=L.userGreeting,A=L.phoneNumber,B=function(e){var n;return{action_name:e.toLowerCase().replace(/[\s-]/g,"")+"_account_click",action_type:"click",u_utm_source:null!==(n=j("utm_source"))&&void 0!==n?n:"organic",loyalty_type:F(x)}},R=t.useCallback((function(e,n){E(v,y,B(e),C,b,m),window.location.href=n}),[v,y,C,b,m]);t.useCallback((function(){E(v,y,B(M),C,b,m),u()}),[v,y,C,b,m,u]);var S=t.useCallback((function(){var e=document.getElementById(P),n=document.getElementById(D);if(e&&n){var r=e.getBoundingClientRect().right;n.style.left="".concat(r-328,"px")}}),[]);t.useEffect((function(){S()}),[S]);var O;return i.jsxs(o.Container,r.__assign({id:D,ref:w,display:"flex",flexDirection:"column",borderRadius:"16px",zIndex:1002,top:"76px",position:"fixed",css:{opacity:0,overflow:"hidden"},width:"".concat(328,"px"),background:"#FFF1EC"},{children:[i.jsx(o.Container,r.__assign({padding:"16px",height:"76px"},{children:(O=function(e,n,t,s){return i.jsx(a.Typography,r.__assign({variant:t,color:s},{children:e?i.jsx(o.Container,{height:"HM3"===t?"18px":"12px",width:"HM3"===t?"140px":"200px",backgroundColor:"#efefef",borderRadius:"8px"}):n}))},i.jsx(o.Container,r.__assign({display:"flex",flexDirection:"column",css:{gap:"4px"}},{children:T?i.jsxs(i.Fragment,{children:[O(h,T,"HM3","primary"),O(h,"".concat(N," ").concat(A),"P3","subheading")]}):i.jsxs(i.Fragment,{children:[O(h,N,"P3","subheading"),O(h,A,"HM3","primary")]})})))})),i.jsx(H,{}),i.jsxs(o.Container,r.__assign({display:"flex",flexDirection:"column",padding:"8px",backgroundColor:"white",rowGap:"8px",css:{borderBottomLeftRadius:12,borderBottomRightRadius:12}},{children:[I.map((function(e){var n=e.text,t=e.icon,s=e.redirectionLink;return i.jsx(o.Container,r.__assign({className:"hoverable-container",padding:"8px",borderRadius:"8px",cursor:"pointer",onClick:function(){return R(n,s)}},{children:i.jsxs(o.Container,r.__assign({display:"flex",cursor:"pointer",css:{columnGap:"8px"}},{children:[t,i.jsx(a.Typography,r.__assign({variant:"P1",css:{display:"flex",alignItems:"center",cursor:"pointer"}},{children:n}))]}))}),"account-option-".concat(n))})),i.jsx(c.Divider,{css:{borderBottom:"1px dashed #E6E6E6"}}),i.jsxs(o.Container,r.__assign({className:"logout-button",display:"flex",padding:"8px",borderRadius:"8px",cursor:"pointer",onClick:u},{children:[i.jsx(l.Signout,{height:24,width:24}),i.jsx(a.Typography,r.__assign({variant:"P1",css:{display:"flex",alignItems:"center",cursor:"pointer"},color:"warning"},{children:M}))]}))]}))]}))},G=function(){var e=f(),n=e.isNovacThemeEnabled,s=e.ravenEventName,c=e.ravenPayload,u=void 0===c?{}:c,d=e.ravenPushCallback,p=e.isUserLoggedIn,h=e.loyaltyType,x=e.ravenPageName,v=b({openDelay:0}),m=v.isDropdownVisible,_=v.handleOnMouseEnter,C=v.handleOnMouseLeave,k=v.handleDropdownMouseEnter,w=v.handleDropdownMouseLeave,L=t.useState(!1),T=L[0],I=L[1];t.useEffect((function(){var e=function(){I(window.scrollY>=100)};return window.addEventListener("scroll",e),function(){return window.removeEventListener("scroll",e)}}),[]);var M=n&&!T?g.NOVAC:g.DEFAULT,N=M.hoverColor,D=M.typographyColor,B=t.useCallback((function(){var e,n=null!==(e=j("utm_source"))&&void 0!==e?e:"organic",r={action_name:"".concat(A.toLowerCase().replace(/[\s-]/g,""),"_header_hover"),action_type:"hover",u_utm_source:n,loyalty_type:F(h)};E(p,s,r,u,d,x)}),[p,s,u,d,x,h]);return i.jsxs(o.Container,{children:[i.jsxs(o.Container,r.__assign({display:"flex",padding:"8px 12px",alignItems:"center",borderRadius:"12px",height:"100%",cursor:"pointer",css:{columnGap:8,height:64},onMouseEnter:function(){_(0),B()},onMouseLeave:C,id:P},{children:[i.jsx(l.MyAccount,{color:m?N:D}),i.jsxs(o.Container,r.__assign({display:"flex",flexDirection:"row",alignItems:"center"},{children:[i.jsx(a.Typography,r.__assign({variant:"B2",css:{cursor:"pointer"},colorCode:m?N:D},{children:A})),i.jsx(l.ChevronDown,{width:20,height:20,fill:m?N:D})]}))]})),i.jsx(y,r.__assign({show:m,marginTop:"64px",handleDropdownMouseEnter:k,handleDropdownMouseLeave:w,onMaskClick:w},{children:i.jsx(O,{isOpen:m})}))]})},V=function(){var e,n=f(),d=n.onLoginButtonClick,p=n.showAllLobs,h=void 0!==p&&p,x=n.isUserLoggedIn,m=n.loyaltyType,_=n.isNovacThemeEnabled,C=void 0!==_&&_,k=n.ravenPayload,w=void 0===k?{}:k,T=n.ravenPushCallback,I=n.ravenPageName,M=n.ravenEventName,A=t.useState(!1),N=A[0],P=A[1];t.useEffect((function(){var e=function(){P(window.scrollY>=100)};return window.addEventListener("scroll",e),function(){return window.removeEventListener("scroll",e)}}),[]);var D=C&&!N?g.NOVAC:g.DEFAULT,B=D.headerBackground,R=D.logoFill,S=D.loginButtonColorVariant,H=D.hoverColor,O=D.fkcompanyColor,V=D.typographyColor,U=b({openDelay:0}),W=U.isDropdownVisible,q=U.hoveredElemIndex,z=U.handleOnMouseEnter,Y=U.handleOnMouseLeave,K=U.handleDropdownMouseEnter,J=U.handleDropdownMouseLeave,Q=null!==(e=j("utm_source"))&&void 0!==e?e:"organic",X=t.useCallback((function(e,n){return{action_name:e,action_type:n,u_utm_source:Q,loyalty_type:F(m)}}),[Q,m]),Z=t.useCallback((function(e){if(e.isClickable&&e.link){var n="".concat(e.text.toLowerCase().replace(/\s/g,""),"_header_click"),r=X(n,"click");E(x,M,r,w,T,I),window.location.href=e.link}}),[X,x,M,w,T,I]),$=t.useCallback((function(){var e=X("home_header_click","click");E(x,M,e,w,T,I),window.location.href="/"}),[X,x,M,w,T,I]),ee=t.useCallback((function(e){var n="".concat(e.text.toLowerCase().replace(/\s/g,""),"_header_hover"),r=X(n,"hover");E(x,M,r,w,T,I)}),[X,x,M,w,T,I]);return i.jsxs(i.Fragment,{children:[i.jsx(o.Container,r.__assign({display:"flex",top:0,position:"sticky",width:"100%",alignItems:"center",justifyContent:"center",zIndex:1e3,height:"64px",background:B,css:{gap:"24px",flexShrink:0,borderBottom:"transparent"===B?"":"1px solid #E6E6E6",transition:"background-color 0.3s ease-in-out, border-bottom 0.3s ease-in-out"}},{children:i.jsxs(o.Container,r.__assign({display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 28px",flex:1,css:{gap:"24px",maxWidth:1440}},{children:[i.jsxs(o.Container,r.__assign({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",cursor:"pointer",onClick:$},{children:[i.jsx(l.CTLogo,{fillColor:R}),i.jsx(c.Divider,{css:{width:12,marginLeft:2,marginRight:2,transform:"rotate(90deg)",borderBottom:"1px solid #e0e0e0"}}),i.jsx(l.Fkcompany,{color:O})]})),i.jsxs(o.Container,r.__assign({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",columnGap:"24px"},{children:[i.jsx(o.Container,r.__assign({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",columnGap:"4px"},{children:u.map((function(e,n){var t=e.text,s=e.lefticon,c=e.rightIcon,l=e.isHoverable,u=q===n;return i.jsxs(o.Container,{children:[i.jsxs(o.Container,r.__assign({onMouseEnter:function(){z(n),e.isHoverable&&ee(e)},onMouseLeave:Y,display:"flex",flexDirection:"row",alignItems:"center",padding:"8px 12px 8px 12px",cursor:"pointer",position:"relative",columnGap:8,height:"64px",onClick:function(){return Z(e)}},{children:[i.jsx(s,{color:u?H:V}),i.jsxs(o.Container,r.__assign({display:"flex",flexDirection:"row",alignItems:"center"},{children:[i.jsx(a.Typography,r.__assign({variant:"B2",colorCode:u?H:V,isClickable:!0},{children:t})),c&&i.jsx(c,{width:20,height:20,fill:u?H:V})]}))]}),"nav-option-".concat(n)),i.jsx(y,r.__assign({show:q===n&&l&&W,marginTop:"64px",handleDropdownMouseEnter:K,handleDropdownMouseLeave:J,onMaskClick:J},{children:i.jsx(L,{isOpen:q===n&&l&&W})}))]})}))})),x&&i.jsx(c.Divider,{css:{width:12,margin:"0 -18px",transform:"rotate(90deg)",borderBottom:"1px solid #e0e0e0"}}),i.jsx(o.Container,{children:x?i.jsx(o.Container,r.__assign({display:"flex",flexDirection:"row",alignItems:"center"},{children:i.jsx(G,{})})):i.jsx(s.Button,r.__assign({variant:"outline",color:S,className:"".concat("transparent"===B?"novac-login-button":"login-button"),onClick:d,css:{width:153,height:40},loading:!1},{children:i.jsx(a.Typography,r.__assign({componentNode:"span",variant:"L2",color:S===s.ButtonColor.NEUTRAL?"neutral":"primary"},{children:"Log in"}))}))})]}))]}))})),h&&i.jsx(v,{})]})};exports.Header=function(e){return i.jsx(x,r.__assign({value:e},{children:i.jsx(V,{})}))};
|
|
2
2
|
//# sourceMappingURL=ct-design-header.browser.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ct-design-header.browser.cjs.js","sources":["../packages/components/Header/src/constants.ts","../packages/components/Header/src/context/HeaderProvider.tsx","../packages/components/Header/src/LobsHeader/index.tsx","../packages/components/Header/src/HeaderAnimatedMask /index.tsx","../packages/components/Header/src/HeaderAnimatedMask /hooks.ts","../packages/components/Header/src/hooks/useHoverDropdown.tsx","../packages/components/Header/src/LobsHeader/type.ts","../packages/components/Header/src/type.ts","../packages/components/Header/src/hooks/useDropdownAnimation.tsx","../packages/components/Header/src/BusinessDropdown/index.tsx","../packages/components/Header/src/UserAccount/accountOptions.tsx","../packages/components/Header/src/RewardsSection/LoyaltyChips.tsx","../packages/components/Header/src/RewardsSection/loyaltyTypes.tsx","../packages/components/Header/src/RewardsSection/index.tsx","../packages/components/Header/src/UserAccount/UserAccountDropdown.tsx","../packages/components/Header/src/UserAccount/index.tsx","../packages/components/Header/src/Header.tsx"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"names":["RAVEN_PAGE_NAMES","RAVEN_PLATFORMS","NAVBAR_OPTIONS","lefticon","Offers","text","isHoverable","isClickable","link","BusinessBag","rightIcon","ChevronDown","MyTrips","SupportIcon","LOB_DATA","title","image","bdConfig","subtitle","details","HeaderContext","createContext","undefined","useHeaderContext","context","useContext","Error","HeaderProvider","_a","value","children","_jsx","Provider","__assign","LobsHeader","selectedLOB","jsx","Container","display","alignItems","justifyContent","padding","height","background","top","zIndex","css","gap","map","item","index","_jsxs","jsxs","cursor","borderRadius","onClick","window","location","href","src","alt","width","Typography","variant","style","fontWeight","HeaderAnimatedMask","onMaskClick","show","marginTop","handleDropdownMouseEnter","handleDropdownMouseLeave","useEffect","document","body","overflow","showFlagProxy","unmountDelay","useState","showComponent","setShowComponent","timerRef","useRef","current","setTimeout","clearTimeout","useDelayedUnmount","triggerTransition","isMounted","hasTransitionedIn","setHasTransitionedIn","timeoutIdRef","useMountTransition","triggerOpenTransition","_Fragment","id","position","backgroundColor","opacity","left","transition","onMouseEnter","onMouseLeave","LOBS_VALUES","LoyaltyType","useHoverDropdown","_b","_c","closeDelay","closeDelayArg","_d","openDelay","Math","max","_e","isDropdownVisible","setIsDropdownVisible","_f","hoveredElemIndex","setHoveredElemIndex","timeoutRef","openTimeoutRef","cancelElementHover","handleOnMouseEnter","useCallback","handleOnMouseLeave","handleMouseLeaveWindow","event","clientY","addEventListener","removeEventListener","useDropdownAnimation","isOpen","containerRef","fullHeight_1","scrollHeight","maxHeight","concat","requestAnimationFrame","openDropdown","fullHeight","closeDropdown","BusinessDropdownContent","leftPosition","setLeftPosition","updatePosition","newLeft","innerWidth","offsetWidth","ref","boxShadow","lineHeight","flexDirection","columnGap","className","AnimatedArrow","color","__spreadArray","Array","_","ArrowRight","ACCOUNT_OPTIONS_POPUP_CONFIG","icon","MyAccount","redirectionLink","SavedCard","Travellers","HiFive","Wallet","SettingsCog","PrivacyRights","LOGGEDIN_USER_TEXT","HEADER_ACCOUNTS_OPTIONS_OPEN_BTN_ID","ACCOUNT_OPTIONS_CONTAINER_ID","LoyaltyChip","borderGradient","backgroundGradient","handleChipClick","chevronFillColor","isHovered","setIsHovered","paddingLeft","paddingRight","content","inset","WebkitMask","WebkitMaskComposite","maskComposite","maxWidth","HeaderChevronRight","LOYALTY_DATA","FkVip","FkPremium","InsiderIcon","InsiderElite","CtLoyalty","ExpandableItem","type","RewardsSection","selectedLoyaltyType","loyaltyType","superCoinBalance","walletBalance","loyaltyLoading","superCoinsLoading","walletLoading","walletChipClick","supercoinsChipClick","loyaltyChipClick","hideWalletChip","hideSupercoinsChip","hideLoyaltyChip","alignSelf","Supercoin","AccountDropdownContent","handleLogoutClick","userName","userMobileNumber","countryCode","userDetailsLoading","useMemo","userGreeting","phoneNumber","headerBtnRight","headerAccBtn","getElementById","accountOptionsElem","getBoundingClientRect","right","renderContent","loading","rowGap","borderBottomLeftRadius","borderBottomRightRadius","redirectLink","Divider","borderBottom","Signout","UserAccount","isNovacThemeEnabled","scrolled","setScrolled","handleScroll","scrollY","effectiveNovacThemeEnabled","hoverColor","colorCode","fill","HeaderContent","onLoginButtonClick","showAllLobs","isUserLoggedIn","ravenPayload","headerBackground","flexShrink","flex","CTLogo","fillColor","marginLeft","marginRight","transform","Fkcompany","option","margin","Button","border","componentNode","props"],"mappings":"iBA6GYA,EAMAC,2RAxGCC,EAAiB,CAC5B,CACEC,SAAUC,EAAMA,OAChBC,KAAM,SACNC,aAAa,EACbC,aAAa,EACbC,KAZsB,kCAcxB,CACEL,SAAUM,EAAWA,YACrBJ,KAAM,WACNK,UAAWC,EAAWA,YACtBL,aAAa,GAEf,CACEH,SAAUS,EAAOA,QACjBP,KAAM,WACNC,aAAa,EACbC,aAAa,EACbC,KAxBwB,kBA0B1B,CACEL,SAAUU,EAAWA,YACrBR,KAAM,UACNC,aAAa,EACbC,aAAa,EACbC,KA7BuB,aAyCdM,EAAW,CACtB,CACEC,MATO,UAUPC,MACE,0HACFR,KAAM,YAER,CACEO,MAdM,SAeNC,MACE,yHACFR,KAAM,WAER,CACEO,MAjBK,QAkBLC,MACE,uHACFR,KAAM,QAER,CACEO,MAzBK,SA0BLC,MACE,yHACFR,KAAM,yBAER,CACEO,MA9BQ,WA+BRC,MACE,2HACFR,KAAM,cAIGS,EAAW,CACtB,CACEF,MAAO,WACPG,SAAU,oBACVC,QAAS,kFAEX,CACEJ,MAAO,cACPG,SAAU,oCACVC,QAAS,6CAEX,CACEJ,MAAO,OACPG,SAAU,uBACVC,QAAS,kEACTX,KAAM,mCAER,CACEO,MAAO,MACPG,SAAU,iBACVC,QAAS,yEACTX,KAAM,+DAMV,SAAYR,GACVA,EAAA,aAAA,mBACAA,EAAA,YAAA,kBACAA,EAAA,aAAA,kBACD,CAJD,CAAYA,IAAAA,EAIX,CAAA,IAED,SAAYC,GACVA,EAAA,QAAA,SACD,CAFD,CAAYA,IAAAA,EAEX,CAAA,IClHD,IAAMmB,EAAgBC,EAAAA,mBAAwCC,GAEjDC,EAAmB,WAC9B,IAAMC,EAAUC,aAAWL,GAC3B,IAAKI,EACH,MAAM,IAAIE,MAAM,yDAElB,OAAOF,CACT,EAEaG,EAA+E,SAACC,OAAEC,EAAKD,EAAAC,MAAEC,EAAQF,EAA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4M,cAAc,OACd3M,QAAQ,KACR6F,MAAOwF,EAA6B,UAAY,WAGrC,CAAAtN,SAAA,2BAOxB4N,GAAe3N,EAAAK,IAACF,EAAa,CAAA,KAGpC,iBA7MuC,SAACyO,GACtC,OACE5O,EAAAK,IAACT,EAAcM,WAAA,CAACJ,MAAO8O,GAAK,CAAA7O,SAC1BC,EAAAA,IAACyN,EAAgB,MAGvB"}
|
|
1
|
+
{"version":3,"file":"ct-design-header.browser.cjs.js","sources":["../packages/components/Header/src/constants.ts","../packages/components/Header/src/context/HeaderProvider.tsx","../packages/components/Header/src/LobsHeader/index.tsx","../packages/components/Header/src/HeaderAnimatedMask /index.tsx","../packages/components/Header/src/HeaderAnimatedMask /hooks.ts","../packages/components/Header/src/hooks/useHoverDropdown.tsx","../packages/components/Header/src/LobsHeader/type.ts","../packages/components/Header/src/type.ts","../packages/components/Header/src/hooks/useDropdownAnimation.tsx","../packages/components/Header/src/utils.ts","../packages/components/Header/src/BusinessDropdown/index.tsx","../packages/components/Header/src/UserAccount/accountOptions.tsx","../packages/components/Header/src/RewardsSection/LoyaltyChips.tsx","../packages/components/Header/src/RewardsSection/loyaltyTypes.tsx","../packages/components/Header/src/RewardsSection/index.tsx","../packages/components/Header/src/UserAccount/UserAccountDropdown.tsx","../packages/components/Header/src/UserAccount/index.tsx","../packages/components/Header/src/Header.tsx"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"names":["RAVEN_PAGE_NAMES","RAVEN_PLATFORMS","NAVBAR_OPTIONS","lefticon","Offers","text","ravenActionName","isHoverable","isClickable","link","BusinessBag","rightIcon","ChevronDown","MyTrips","SupportIcon","LOB_DATA","title","image","bdConfig","subtitle","details","THEME_CONFIG","NOVAC","headerBackground","hoverColor","logoFill","fkcompanyColor","typographyColor","loginButtonColorVariant","ButtonColor","NEUTRAL","DEFAULT","PRIMARY","HeaderContext","createContext","undefined","useHeaderContext","context","useContext","Error","HeaderProvider","_a","value","children","_jsx","Provider","__assign","LobsHeader","selectedLOB","jsx","Container","display","alignItems","justifyContent","padding","height","background","top","zIndex","css","gap","map","item","index","_jsxs","jsxs","cursor","borderRadius","onClick","window","location","href","src","alt","width","Typography","variant","TypographyVariant","HM3","B1","HeaderAnimatedMask","onMaskClick","show","marginTop","handleDropdownMouseEnter","handleDropdownMouseLeave","useEffect","document","body","style","overflow","showFlagProxy","unmountDelay","useState","showComponent","setShowComponent","timerRef","useRef","current","setTimeout","clearTimeout","useDelayedUnmount","triggerTransition","isMounted","hasTransitionedIn","setHasTransitionedIn","timeoutIdRef","useMountTransition","triggerOpenTransition","_Fragment","id","position","backgroundColor","opacity","left","transition","onMouseEnter","onMouseLeave","LOBS_VALUES","LoyaltyType","useHoverDropdown","_b","_c","closeDelay","closeDelayArg","_d","openDelay","Math","max","_e","isDropdownVisible","setIsDropdownVisible","_f","hoveredElemIndex","setHoveredElemIndex","timeoutRef","openTimeoutRef","cancelElementHover","handleOnMouseEnter","useCallback","handleOnMouseLeave","handleMouseLeaveWindow","event","clientY","addEventListener","removeEventListener","useDropdownAnimation","isOpen","containerRef","fullHeight_1","scrollHeight","maxHeight","concat","requestAnimationFrame","openDropdown","fullHeight","closeDropdown","stringifyPayload","payload","keys","Object","numericValues","forEach","key","includes","Number","getQueryParam","queryParam","URLSearchParams","search","get","ravenLoyaltyTypes","loyaltyType","ravenSDKTrigger","isUserLoggedIn","eventName","ravenPayload","customRavenPayload","ravenPushCallback","pageName","commonPayload","page_name","platform","DESKTOP","login_status","domain","host","newRavenPayload","parsedCustomRavenPayload","finalPayload","length","eventData","err","console","error","BusinessDropdownContent","ravenPageName","ravenEventName","leftPosition","setLeftPosition","updatePosition","newLeft","innerWidth","offsetWidth","handleBusinessDropdownClick","utmSource","defaultPayload","action_name","toLowerCase","action_type","u_utm_source","loyalty_type","ref","boxShadow","flexDirection","columnGap","className","AnimatedArrow","color","__spreadArray","Array","_","ArrowRight","ACCOUNT_OPTIONS_POPUP_CONFIG","icon","MyAccount","redirectionLink","SavedCard","Travellers","HiFive","Wallet","SettingsCog","PrivacyRights","SIGN_OUT_TEXT","MY_ACCOUNT_TEXT","LOGGEDIN_USER_TEXT","HEADER_ACCOUNTS_OPTIONS_OPEN_BTN_ID","ACCOUNT_OPTIONS_CONTAINER_ID","LoyaltyChip","borderGradient","backgroundGradient","handleChipClick","chevronFillColor","isHovered","setIsHovered","handleClick","paddingLeft","paddingRight","content","inset","WebkitMask","WebkitMaskComposite","maskComposite","maxWidth","HeaderChevronRight","LOYALTY_DATA","FkVip","FkPremium","InsiderIcon","InsiderElite","CtLoyalty","ExpandableItem","type","handleDefaultClick","redirectUrls","supercoin","wallet","RewardsSection","selectedLoyaltyType","superCoinBalance","walletBalance","loyaltyLoading","superCoinsLoading","walletLoading","walletChipClick","supercoinsChipClick","loyaltyChipClick","hideWalletChip","hideSupercoinsChip","hideLoyaltyChip","alignSelf","Supercoin","AccountDropdownContent","handleLogoutClick","userName","userMobileNumber","countryCode","userDetailsLoading","useMemo","userGreeting","phoneNumber","generateRavenPayload","actionName","replace","handleAccountOptionsClick","redirectLink","positionAccountOptionsDiv","headerAccBtn","getElementById","accountOptionsElem","headerBtnRight","getBoundingClientRect","right","renderContent","loading","rowGap","borderBottomLeftRadius","borderBottomRightRadius","Divider","borderBottom","Signout","UserAccount","isNovacThemeEnabled","scrolled","setScrolled","handleScroll","scrollY","theme","triggerRavenEventOnHover","colorCode","fill","HeaderContent","onLoginButtonClick","showAllLobs","_g","createPayload","actionType","handleNavbarOptionsClick","option","handleHomeClick","flexShrink","flex","CTLogo","fillColor","marginLeft","marginRight","transform","Fkcompany","LeftIcon","RightIcon","margin","Button","componentNode","props"],"mappings":"iBAuIYA,EAMAC,2RAvHCC,EAAiC,CAC5C,CACEC,SAAUC,EAAMA,OAChBC,KAAM,SACNC,gBAAiB,SACjBC,aAAa,EACbC,aAAa,EACbC,KAvBsB,kCAyBxB,CACEN,SAAUO,EAAWA,YACrBL,KAAM,WACNC,gBAAiB,WACjBK,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,yBAA0BA,EAC1BC,yBAA0BA,EAC1BJ,YAAaI,GAAwB,CAAA1C,SAErCC,MAACuJ,EAAuB,CACtBhD,OAAQd,IAAqBtE,GAASxD,GAAe2H,gBAOhE4C,GACClI,EAACK,IAAAmQ,UACC,CAAAzP,IAAK,CACHe,MAAO,GACP0Q,OAAQ,UACRJ,UAAW,gBACX3B,aAAc,uBAIpBzQ,EAACK,IAAAC,YACE,CAAAP,SAAAmI,EACClI,MAACM,EAAAA,sBAAUC,QAAQ,OAAOmK,cAAc,MAAMlK,WAAW,UACvD,CAAAT,SAAAC,EAAAA,IAAC2Q,EAAW,OAGd3Q,EAAAA,IAACyS,EAAMA,OAAAvS,WAAA,CACL8B,QAAQ,UACR8I,MAAO9L,EACP4L,UAAW,UAAwB,gBAArBjM,EAAqC,qBAAuB,gBAC1E6C,QAAS8P,EACTvQ,IAAK,CACHe,MAAO,IACPnB,OAAQ,IAEVyP,SAAS,GAAK,CAAArQ,SAEdC,EAAAA,IAAC+B,EAAUA,WAAA7B,WAAA,CACTwS,cAAc,OACd1Q,QAAQ,KACR8I,MAAO9L,IAA4BC,EAAAA,YAAYC,QAAU,UAAY,WAEpE,CAAAa,SjB5FM,4BiBoGpBwR,GAAevR,MAACG,EAAU,CAAA,KAGjC,iBAvOuC,SAACwS,GACtC,OACE3S,EAAAK,IAACT,EAAcM,WAAA,CAACJ,MAAO6S,GAAK,CAAA5S,SAC1BC,EAAAA,IAACqR,EAAgB,MAGvB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e,__spreadArray as n}from"tslib";import{jsx as i,jsxs as t,Fragment as r}from"react/jsx-runtime";import{createContext as o,useContext as a,useState as l,useRef as c,useEffect as d,useCallback as s,useMemo as u}from"react";import{Container as p}from"@cleartrip/ct-design-container";import{Typography as h}from"@cleartrip/ct-design-typography";import{Button as f}from"@cleartrip/ct-design-button";import{Divider as g}from"@cleartrip/ct-design-divider";import{Offers as m,BusinessBag as x,ChevronDown as v,MyTrips as w,SupportIcon as b,ArrowRight as y,MyAccount as F,SavedCard as k,Travellers as C,HiFive as E,Wallet as L,SettingsCog as I,PrivacyRights as M,HeaderChevronRight as A,FkVip as D,FkPremium as T,InsiderIcon as H,InsiderElite as _,CtLoyalty as G,Supercoin as B,Signout as R,CTLogo as O,Fkcompany as P}from"@cleartrip/ct-design-icons";var S,N,j=[{lefticon:m,text:"Offers",isHoverable:!1,isClickable:!0,link:"all-offers/?categories=flights"},{lefticon:x,text:"Business",rightIcon:v,isHoverable:!0},{lefticon:w,text:"My Trips",isHoverable:!1,isClickable:!0,link:"/account/trips"},{lefticon:b,text:"Support",isHoverable:!1,isClickable:!0,link:"/support"}],W=[{title:"Flights",image:"https://rukmini-ct.flixcart.com/f_auto,w_48,h_48,dpr_2/offermgmt-prod/offermgmt/images/banner/flight_uhp.png?cache=true",link:"/flights"},{title:"Hotels",image:"https://rukmini-ct.flixcart.com/f_auto,w_48,h_48,dpr_2/offermgmt-prod/offermgmt/images/banner/hotel_uhp.png?cache=true",link:"/hotels"},{title:"Buses",image:"https://rukmini-ct.flixcart.com/f_auto,w_40,h_40,dpr_2/offermgmt-prod/offermgmt/images/banner/bus_uhp.png?cache=true",link:"/bus"},{title:"Trains",image:"https://rukmini-ct.flixcart.com/f_auto,w_40,h_40,dpr_2/offermgmt-prod/offermgmt/images/banner/train_uhp.png?cache=true",link:"/pages/trains/appOnly"},{title:"Packages",image:"https://rukmini-ct.flixcart.com/f_auto,w_40,h_40,dpr_2/offermgmt-prod/offermgmt/images/banner/holiday_uhp.png?cache=true",link:"/holidays"}],z=[{title:"AgentBox",subtitle:"For travel agents",details:"One-stop travel solution offering the best deals to our travel agency partners"},{title:"OutOfOffice",subtitle:"For startups, corporates and SMEs",details:"Manage corporate business travel, smartly"},{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"}];!function(e){e.UNIFIED_HOME="unified_homepage",e.HOTELS_HOME="hotels_homepage",e.FLIGHTS_HOME="flights_homepage"}(S||(S={})),function(e){e.DESKTOP="desktop"}(N||(N={}));var V=o(void 0),U=function(){var e=a(V);if(!e)throw new Error("useHeaderContext must be used within a HeaderProvider");return e},Y=function(n){var t=n.value,r=n.children;return i(V.Provider,e({value:t},{children:r}))},K=function(){var n=U().selectedLOB;return i(p,e({display:"flex",alignItems:"center",justifyContent:"center",padding:"16px",height:"64",background:"#F3F5FA",top:"64px",zIndex:2,css:{gap:40}},{children:W.map((function(r,o){return t(p,e({display:"flex",alignItems:"center",cursor:"pointer",css:{gap:8,background:n===r.title?"#FFFFFF":"transparent",borderRadius:n===r.title?"40px":"0",padding:n===r.title?"8px 16px 8px 8px":"0"},onClick:function(){window.location.href=r.link}},{children:[i("img",{src:r.image,alt:r.title,width:32,height:32}),i(h,e({variant:"P1",style:{fontWeight:n===r.title?600:500},isClickable:!0},{children:r.title}))]}),o)}))}))};function q(n){var o=n.children,a=n.onMaskClick,s=n.show,u=n.marginTop,h=n.handleDropdownMouseEnter,f=n.handleDropdownMouseLeave;d((function(){return s&&(document.body.style.overflow="hidden"),function(){document.body.style.overflow="initial"}}),[s]);var g=function(e,n){var i=l(e),t=i[0],r=i[1],o=c();return d((function(){return e?r(e):o.current=setTimeout((function(){r(!1)}),n),function(){(null==o?void 0:o.current)&&clearTimeout(o.current)}}),[e]),t}(s,300),m=function(e,n){var i=l(!1),t=i[0],r=i[1],o=c();return d((function(){return e&&!t?setTimeout((function(){r(!0)}),0):!e&&t&&(o.current=setTimeout((function(){return r(!1)}),n)),function(){o&&o.current&&clearTimeout(o.current)}}),[n,e]),t}(s,100);return t(r,{children:[g&&i(p,{id:"mask-container",css:{position:"fixed",backgroundColor:"#000",opacity:m?.4:0,width:"100%",height:"100vh",left:0,top:u||0,zIndex:9,transition:"opacity 300ms ease-in"},onClick:a}),g&&i(p,e({onMouseEnter:h,onMouseLeave:f},{children:o}))]})}var J,Q,X,Z=function(e){var n=void 0===e?{}:e,i=n.closeDelay,t=void 0===i?0:i,r=n.openDelay,o=void 0===r?500:r,a=Math.max(t,150),u=l(!1),p=u[0],h=u[1],f=l(null),g=f[0],m=f[1],x=c(null),v=c(null),w=c(!1),b=s((function(e){x.current&&clearTimeout(x.current),v.current&&clearTimeout(v.current),w.current=!1,v.current=setTimeout((function(){h(!0),w.current||m(e)}),o)}),[o]),y=s((function(){w.current=!0,x.current=setTimeout((function(){h(!1),m(null)}),a)}),[a]),F=s((function(){x.current&&clearTimeout(x.current)}),[]),k=s((function(){w.current=!0,(null==x?void 0:x.current)&&clearTimeout(x.current),x.current=setTimeout((function(){h(!1),m(null)}),a)}),[]);return d((function(){var e=function(e){e.clientY<=0&&(h(!1),m(null))};return window.addEventListener("mouseleave",e),function(){window.removeEventListener("mouseleave",e)}}),[]),{isDropdownVisible:p,hoveredElemIndex:g,handleOnMouseEnter:b,handleOnMouseLeave:y,handleDropdownMouseEnter:F,handleDropdownMouseLeave:k}},$=function(e){var n=c(null);return d((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}},ee=function(n){var r=n.isOpen,o=l(0),a=o[0],c=o[1],s=$(r).containerRef;return d((function(){var e=function(){if(s.current){var e=(window.innerWidth-(s.current.offsetWidth||0))/2;e!==a&&c(e)}};return e(),window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[s,a]),t(p,e({ref:s,backgroundColor:"#fff",top:"76px",position:"fixed",left:"".concat(a,"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:[i(p,e({padding:"20px 24px 20px 24px",backgroundColor:"#FFF1EC"},{children:i(h,e({variant:"HM2",css:{lineHeight:"24px"}},{children:"Other business services"}))})),i(p,e({display:"flex",flexDirection:"row",padding:"24px",columnGap:"48px",width:"fit-content"},{children:z.map((function(n){var r=n.title,o=n.subtitle,a=n.details;return t(p,e({cursor:"pointer",width:"200px",className:"bd-hover-container"},{children:[t(p,e({display:"flex",flexDirection:"row",alignItems:"center",columnGap:"8px"},{children:[i(h,e({variant:"HM2",className:"color-orange-on-hover"},{children:r})),i(ne,{})]})),i(h,e({variant:"B3",css:{marginTop:"4px",opacity:.75}},{children:o})),i(h,e({variant:"P3",color:"subheading",css:{marginTop:"12px"}},{children:a}))]}),r)}))}))]}))},ne=function(){return i(p,e({className:"bd-arrow-container"},{children:n([],Array(3),!0).map((function(n,t){return i(p,e({className:"bd-arrow-wrapper"},{children:i(y,{})}),t)}))}))},ie=[{text:"My Profile",icon:i(F,{width:24,height:24}),redirectionLink:"/accounts/profile"},{text:"My Trips",icon:i(w,{width:24,height:24}),redirectionLink:"/accounts/trips"},{text:"Saved Cards",icon:i(k,{}),redirectionLink:"/accounts/expressway"},{text:"Saved Travellers",icon:i(C,{width:24,height:24}),redirectionLink:"/account/travellers"},{text:"Hi-Five",icon:i(E,{}),redirectionLink:"/accounts/hi-five?src=fh"},{text:"Wallet",icon:i(L,{width:24,height:24}),redirectionLink:"/accounts/wallet"},{text:"Settings",icon:i(I,{width:24,height:24}),redirectionLink:"/account/settings"},{text:"Privacy Rights",icon:i(M,{}),redirectionLink:"accounts/personal-data-dashboard"}],te="You are logged in with",re="header-acc-btn",oe="account-options",ae=function(n){var r=n.icon,o=n.borderGradient,a=n.backgroundGradient,c=n.handleChipClick,d=n.chevronFillColor,s=l(!1),u=s[0],h=s[1];return t(p,e({display:"flex",position:"relative",alignItems:"center",justifyContent:"center",borderRadius:"8px",cursor:"pointer",paddingLeft:"8px",paddingRight:u?"4px":"8px",css:{overflow:"hidden",height:32,paddingLeft:8,transition:"padding-right 0.2s ease-in-out"},onMouseEnter:function(){return h(!0)},onMouseLeave:function(){return h(!1)},onClick:function(){window.location.href="/",c&&c()}},{children:[i(p,{style:{content:'""',position:"absolute",inset:0,borderRadius:"inherit",background:a,zIndex:-2}}),i(p,{style:{content:'""',position:"absolute",inset:0,borderRadius:"inherit",padding:"1px",background:o,WebkitMask:"linear-gradient(white, white) content-box, linear-gradient(white, white)",WebkitMaskComposite:"destination-out",maskComposite:"exclude",zIndex:-1}}),i(p,e({display:"flex",alignItems:"center",position:"relative"},{children:r})),i(p,e({display:"flex",alignItems:"center",style:{overflow:"hidden",maxWidth:u?16:0,transition:"max-width 0.2s ease-in-out, opacity 0.2s ease-in-out",opacity:u?.5:0}},{children:i(A,{color:d})}))]}))};!function(e){e.FLIGHTS="Flights",e.HOTELS="Hotels",e.BUSES="Buses",e.TRAINS="Trains",e.PACKAGES="Packages"}(J||(J={})),function(e){e.FkVip="FkVip",e.FkPremium="FkPremium",e.InsiderIcon="InsiderIcon",e.InsiderElite="InsiderElite",e.CtLoyalty="CtLoyalty"}(Q||(Q={}));var le=((X={})[Q.FkVip]={icon:i(D,{}),borderGradient:"linear-gradient(222.13deg, rgba(243, 179, 39, 0) 2.08%, #F3B327 85.17%)",backgroundGradient:"linear-gradient(111deg, #360042 0%, #540061 100%)",chevronFillColor:"#FFF"},X[Q.FkPremium]={icon:i(T,{}),borderGradient:"linear-gradient(230.68deg, rgba(243, 179, 39, 0) 10.1%, #F3B327 45.74%)",backgroundGradient:"linear-gradient(180deg, #04176A 0%, #082395 100%)",chevronFillColor:"#FFF"},X[Q.InsiderIcon]={icon:i(H,{}),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"},X[Q.InsiderElite]={icon:i(_,{}),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"},X[Q.CtLoyalty]={icon:i(G,{}),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"},X),ce=function(n){var r=n.icon,o=n.handleChipClick,a=n.value,c=n.type,d=l(!1),s=d[0],u=d[1];return t(p,e({display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"8px",cursor:"pointer",style:{height:32,paddingLeft:8,paddingRight:s?4:8,transition:"padding-right 0.2s ease-in-out",background:s?"#ffd7ca":"#ffe6df"},onMouseEnter:function(){return u(!0)},onMouseLeave:function(){return u(!1)},onClick:function(){"supercoins"===c?window.location.href="/supercoins":"wallet"===c&&(window.location.href="/wallet"),o&&o()}},{children:[t(p,e({display:"flex",alignItems:"center",css:{gap:"4px"}},{children:[r,i(h,e({variant:"B3",isClickable:!0},{children:a}))]})),i(p,e({display:"flex",alignItems:"center",style:{overflow:"hidden",maxWidth:s?16:0,transition:"max-width 0.2s ease-in-out, opacity 0.2s ease-in-out",opacity:s?1:0}},{children:i(A,{})}))]}))},de=function(){var n,r=U(),o=r.loyaltyType,a=r.fkSupercoinBurnBalance,l=void 0===a?0:a,c=r.walletBalance,d=void 0===c?0:c,s=r.loyaltyLoading,u=r.superCoinsLoading,h=r.walletLoading,f=r.walletChipClick,g=r.supercoinsChipClick,m=r.loyaltyChipClick,x=r.hideWalletChip,v=r.hideSupercoinsChip,w=r.hideLoyaltyChip;return t(p,e({display:"flex",padding:"0 16px 16px 16px",justifyContent:"flex-start",css:{alignSelf:"stretch",gap:"4px"}},{children:[s?i(p,{width:"50px",height:"32px",borderRadius:"8px",backgroundColor:"#efefef"}):o&&le[o]&&!w&&i(ae,{icon:le[o].icon,borderGradient:le[o].borderGradient,backgroundGradient:le[o].backgroundGradient,chevronFillColor:(null===(n=le[o])||void 0===n?void 0:n.chevronFillColor)||"#FFF",handleChipClick:m}),u?i(p,{width:"50px",height:"32px",borderRadius:"8px",backgroundColor:"#efefef"}):!v&&i(ce,{icon:i(B,{width:20,height:20}),value:l,handleChipClick:g,type:"supercoins"}),h?i(p,{width:"50px",height:"32px",borderRadius:"8px",backgroundColor:"#efefef"}):!x&&i(ce,{icon:i(L,{width:20,height:20}),value:d,handleChipClick:f,type:"wallet"})]}))},se=function(n){var o=n.isOpen,a=U(),l=a.handleLogoutClick,c=a.userName,s=a.userMobileNumber,f=a.countryCode,m=a.userDetailsLoading,x=$(o).containerRef,v=u((function(){return{userGreeting:c&&"Hello ".concat(c,"!"),phoneNumber:f&&s?"".concat(f," ").concat(s):""}}),[c,s,f]),w=v.userGreeting,b=v.phoneNumber;d((function(){var e,n=document.getElementById(re),i=document.getElementById(oe);e=null==n?void 0:n.getBoundingClientRect().right,i&&e&&(i.style.left="".concat(e-328,"px"))}),[]);var y;return t(p,e({id:oe,ref:x,display:"flex",flexDirection:"column",borderRadius:"16px",zIndex:1002,top:"76px",position:"fixed",css:{opacity:0,overflow:"hidden"},width:"".concat(328,"px"),background:"#FFF1EC"},{children:[i(p,e({padding:"16px",height:"72px"},{children:(y=function(n,t,r,o){return i(h,e({variant:r,color:o},{children:n?i(p,{height:"HM3"===r?"18px":"12px",width:"HM3"===r?"140px":"200px",backgroundColor:"#efefef",borderRadius:"8px"}):t}))},i(p,e({display:"flex",flexDirection:"column",css:{gap:"4px"}},{children:t(r,w?{children:[y(m,w,"HM3","primary"),y(m,"".concat(te," ").concat(b),"P3","subheading")]}:{children:[y(m,te,"P3","subheading"),y(m,b,"HM3","primary")]})})))})),i(de,{}),t(p,e({display:"flex",flexDirection:"column",padding:"8px",backgroundColor:"white",rowGap:"8px",style:{borderBottomLeftRadius:12,borderBottomRightRadius:12}},{children:[ie.map((function(n){var r,o=n.text,a=n.icon,l=n.redirectionLink;return i(p,e({className:"hoverable-container",padding:"8px",borderRadius:"8px",cursor:"pointer",onClick:(r=l,function(){window.location.href=r})},{children:t(p,e({display:"flex",cursor:"pointer",style:{columnGap:"8px"}},{children:[a,i(h,e({variant:"P1",css:{display:"flex",alignItems:"center",cursor:"pointer"}},{children:o}))]}))}),"account-option-".concat(o))})),i(g,{style:{borderBottom:"1px dashed #E6E6E6"}}),t(p,e({className:"logout-button",display:"flex",padding:"8px",borderRadius:"8px",cursor:"pointer",onClick:l},{children:[i(R,{height:24,width:24}),i(h,e({variant:"P1",css:{display:"flex",alignItems:"center",cursor:"pointer"},color:"warning"},{children:"Logout"}))]}))]}))]}))},ue=function(){var n=U().isNovacThemeEnabled,r=Z({openDelay:0}),o=r.isDropdownVisible,a=r.handleOnMouseEnter,c=r.handleOnMouseLeave,s=r.handleDropdownMouseEnter,u=r.handleDropdownMouseLeave,f=l(!1),g=f[0],m=f[1];d((function(){var e=function(){m(window.scrollY>=100)};return window.addEventListener("scroll",e),function(){return window.removeEventListener("scroll",e)}}),[]);var x=n&&!g,w=x?"#FFB8A5":"#FF4F17";return t(p,{children:[t(p,e({display:"flex",padding:"8px 12px",alignItems:"center",borderRadius:"12px",height:"100%",cursor:"pointer",style:{columnGap:8,height:64},onMouseEnter:function(){return a(0)},onMouseLeave:c,id:re},{children:[i(F,{color:o?w:x?"#FFF":"#1A1A1A"}),t(p,e({display:"flex",flexDirection:"row",alignItems:"center"},{children:[i(h,e({variant:"B2",css:{cursor:"pointer"},colorCode:o?w:x?"#FFF":"#1A1A1A"},{children:"My Account"})),i(v,{width:20,height:20,fill:o?w:x?"#FFF":"#1A1A1A"})]}))]})),i(q,e({show:o,marginTop:"64px",handleDropdownMouseEnter:s,handleDropdownMouseLeave:u,onMaskClick:u},{children:i(se,{isOpen:o})}))]})},pe=function(n){return i(Y,e({value:n},{children:i(he,{})}))},he=function(){var n=U(),o=n.onLoginButtonClick,a=n.showAllLobs,c=void 0!==a&&a,s=n.isUserLoggedIn;n.loyaltyType;var u=n.isNovacThemeEnabled,m=void 0!==u&&u;n.ravenPayload,n.ravenPushCallback,n.ravenPageName,n.ravenEventName;var x=l(!1),v=x[0],w=x[1];d((function(){var e=function(){w(window.scrollY>=100)};return window.addEventListener("scroll",e),function(){return window.removeEventListener("scroll",e)}}),[]);var b=m&&!v,y=b?"transparent":"#F7FAFF",F=b?"#FFB8A5":"#FF4F17",k=Z({openDelay:0}),C=k.isDropdownVisible,E=k.hoveredElemIndex,L=k.handleOnMouseEnter,I=k.handleOnMouseLeave,M=k.handleDropdownMouseEnter,A=k.handleDropdownMouseLeave;return t(r,{children:[i(p,e({display:"flex",top:0,position:"sticky",width:"100%",alignItems:"center",justifyContent:"center",zIndex:1e3,height:"64px",background:y,css:{gap:"24px",flexShrink:0,borderBottom:b?"":"1px solid #E6E6E6",transition:"background-color 0.3s ease-in-out, border-bottom 0.3s ease-in-out"}},{children:t(p,e({display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 28px",flex:1,style:{gap:"24px",maxWidth:1440}},{children:[t(p,e({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",cursor:"pointer",paddingLeft:"16px",onClick:function(){window.location.href="/"}},{children:[i(O,{fillColor:b?"#FFF":"#FF4F17"}),i(g,{css:{width:12,marginLeft:2,marginRight:2,transform:"rotate(90deg)",borderBottom:"1px solid #e0e0e0"}}),i(P,{color:b?"#FFF":"#1A1A1A"})]})),t(p,e({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",columnGap:"24px"},{children:[i(p,e({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",columnGap:"4px"},{children:j.map((function(n,r){var o=E===r;return t(p,{children:[t(p,e({onMouseEnter:function(){return L(r)},onMouseLeave:I,display:"flex",flexDirection:"row",alignItems:"center",padding:"8px 12px 8px 12px",cursor:"pointer",position:"relative",columnGap:8,height:"64px",onClick:function(){n.link&&n.isClickable&&(window.location.href=n.link)}},{children:[i(n.lefticon,{color:o?F:b?"#FFF":"#1A1A1A"}),t(p,e({display:"flex",flexDirection:"row",alignItems:"center"},{children:[i(h,e({variant:"B2",colorCode:o?F:b?"#FFF":"#1A1A1A",isClickable:!0},{children:n.text})),n.rightIcon&&i(n.rightIcon,{width:20,height:20,fill:o?F:b?"#FFF":"#1A1A1A"})]}))]}),"nav-option-".concat(r)),i(q,e({show:E===r&&n.isHoverable&&C,marginTop:"64px",handleDropdownMouseEnter:M,handleDropdownMouseLeave:A,onMaskClick:A},{children:i(ee,{isOpen:E===r&&n.isHoverable&&C})}))]})}))})),s&&i(g,{style:{width:12,margin:"0 -18px",transform:"rotate(90deg)",borderBottom:"1px solid #e0e0e0"}}),i(p,{children:s?i(p,e({display:"flex",flexDirection:"row",alignItems:"center"},{children:i(ue,{})})):i(f,e({className:"fw-400 fs-14 ".concat(b?"novac-login-button":"login-button"),onClick:o,style:{width:153,height:40,border:b?"1px solid #FFF":"1px solid #1A1A1A"},loading:!1},{children:i(h,e({componentNode:"span",variant:"L2",color:b?"neutral":"primary"},{children:"Login"}))}))})]}))]}))})),c&&i(K,{})]})};export{pe as Header,J as LOBS_VALUES,Q as LoyaltyType};
|
|
1
|
+
import{__assign as e,__spreadArray as n}from"tslib";import{jsx as r,jsxs as t,Fragment as i}from"react/jsx-runtime";import{createContext as o,useContext as a,useState as c,useRef as l,useEffect as s,useCallback as d,useMemo as u}from"react";import{Container as p}from"@cleartrip/ct-design-container";import{Typography as h,TypographyVariant as f}from"@cleartrip/ct-design-typography";import{ButtonColor as g,Button as m}from"@cleartrip/ct-design-button";import{Divider as v}from"@cleartrip/ct-design-divider";import{Offers as x,BusinessBag as y,ChevronDown as w,MyTrips as b,SupportIcon as k,ArrowRight as C,MyAccount as F,SavedCard as _,Travellers as L,HiFive as E,Wallet as I,SettingsCog as M,PrivacyRights as T,HeaderChevronRight as N,FkVip as A,FkPremium as P,InsiderIcon as D,InsiderElite as B,CtLoyalty as H,Supercoin as R,Signout as G,CTLogo as O,Fkcompany as S}from"@cleartrip/ct-design-icons";var U,V,j=[{lefticon:x,text:"Offers",ravenActionName:"offers",isHoverable:!1,isClickable:!0,link:"all-offers/?categories=flights"},{lefticon:y,text:"Business",ravenActionName:"business",rightIcon:w,isHoverable:!0},{lefticon:b,text:"My Trips",ravenActionName:"mytrips",isHoverable:!1,isClickable:!0,link:"/account/trips"},{lefticon:k,text:"Support",ravenActionName:"support",isHoverable:!1,isClickable:!0,link:"/support"}],z=[{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:"Trains",image:"https://rukmini-ct.flixcart.com/f_auto,w_32,h_32,dpr_4/offermgmt-prod/offermgmt/images/banner/Navbar_Trains.png?cache=true",link:"/pages/trains/appOnly"},{title:"Packages",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"}],W=[{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"}];!function(e){e.UNIFIED_HOME="unified_homepage",e.HOTELS_HOME="hotel_home",e.FLIGHTS_HOME="flights_home"}(U||(U={})),function(e){e.DESKTOP="desktop"}(V||(V={}));var Y={NOVAC:{headerBackground:"transparent",hoverColor:"#FFB8A5",logoFill:"#FFF",fkcompanyColor:"#FFF",typographyColor:"#FFF",loginButtonColorVariant:g.NEUTRAL},DEFAULT:{headerBackground:"#F7FAFF",hoverColor:"#FF4F17",logoFill:"#FF4F17",fkcompanyColor:"#1A1A1A",typographyColor:"#1A1A1A",loginButtonColorVariant:g.PRIMARY}},K=o(void 0),q=function(){var e=a(K);if(!e)throw new Error("useHeaderContext must be used within a HeaderProvider");return e},J=function(n){var t=n.value,i=n.children;return r(K.Provider,e({value:t},{children:i}))},Q=function(){var n=q().selectedLOB;return r(p,e({display:"flex",alignItems:"center",justifyContent:"center",padding:"16px",height:"64",background:"#F3F5FA",top:"64px",zIndex:2,css:{gap:40}},{children:z.map((function(i,o){var a=i.title,c=i.link,l=i.image;return t(p,e({display:"flex",alignItems:"center",cursor:"pointer",css:{gap:8,background:n===a?"#FFFFFF":"transparent",borderRadius:n===a?"40px":"0",padding:n===a?"8px 16px 8px 8px":"0"},onClick:function(){window.location.href=c}},{children:[r("img",{src:l,alt:a,width:32,height:32}),r(h,e({variant:n===a?f.HM3:f.B1,isClickable:!0},{children:a}))]}),o)}))}))};function X(n){var o=n.children,a=n.onMaskClick,d=n.show,u=n.marginTop,h=n.handleDropdownMouseEnter,f=n.handleDropdownMouseLeave;s((function(){return d&&(document.body.style.overflow="hidden"),function(){document.body.style.overflow="initial"}}),[d]);var g=function(e,n){var r=c(e),t=r[0],i=r[1],o=l();return s((function(){return e?i(e):o.current=setTimeout((function(){i(!1)}),n),function(){(null==o?void 0:o.current)&&clearTimeout(o.current)}}),[e]),t}(d,300),m=function(e,n){var r=c(!1),t=r[0],i=r[1],o=l();return s((function(){return e&&!t?setTimeout((function(){i(!0)}),0):!e&&t&&(o.current=setTimeout((function(){return i(!1)}),n)),function(){o&&o.current&&clearTimeout(o.current)}}),[n,e]),t}(d,100);return t(i,{children:[g&&r(p,{id:"mask-container",css:{position:"fixed",backgroundColor:"#000",opacity:m?.4:0,width:"100%",height:"100vh",left:0,top:u||0,zIndex:9,transition:"opacity 300ms ease-in"},onClick:a}),g&&r(p,e({onMouseEnter:h,onMouseLeave:f},{children:o}))]})}var Z,$,ee,ne=function(e){var n=void 0===e?{}:e,r=n.closeDelay,t=void 0===r?0:r,i=n.openDelay,o=void 0===i?500:i,a=Math.max(t,150),u=c(!1),p=u[0],h=u[1],f=c(null),g=f[0],m=f[1],v=l(null),x=l(null),y=l(!1),w=d((function(e){v.current&&clearTimeout(v.current),x.current&&clearTimeout(x.current),y.current=!1,x.current=setTimeout((function(){h(!0),y.current||m(e)}),o)}),[o]),b=d((function(){y.current=!0,v.current=setTimeout((function(){h(!1),m(null)}),a)}),[a]),k=d((function(){v.current&&clearTimeout(v.current)}),[]),C=d((function(){y.current=!0,(null==v?void 0:v.current)&&clearTimeout(v.current),v.current=setTimeout((function(){h(!1),m(null)}),a)}),[]);return s((function(){var e=function(e){e.clientY<=0&&(h(!1),m(null))};return window.addEventListener("mouseleave",e),function(){window.removeEventListener("mouseleave",e)}}),[]),{isDropdownVisible:p,hoveredElemIndex:g,handleOnMouseEnter:w,handleOnMouseLeave:b,handleDropdownMouseEnter:k,handleDropdownMouseLeave:C}},re=function(e){var n=l(null);return s((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}},te=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},ie=function(e){return"undefined"!=typeof window&&window?new URLSearchParams(window.location.search).get(e):""},oe=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""}},ae=function(n,r,t,i,o,a){var c;if("function"==typeof o){var l={page_name:a,platform:V.DESKTOP,login_status:n?"yes":"no",domain:null===(c=null===window||void 0===window?void 0:window.location)||void 0===c?void 0:c.host},s=te(t),d=te(i),u=e(e(e({},l),s),d);try{1===o.length?o({eventName:r,eventData:u}):o(r,u)}catch(e){return void console.error(e)}}else console.error("ravenPushCallback is not provided or is not a function")},ce=function(n){var i=n.isOpen,o=q(),a=o.isUserLoggedIn,l=o.ravenPushCallback,u=o.ravenPageName,f=o.ravenEventName,g=o.loyaltyType,m=o.ravenPayload,v=void 0===m?{}:m,x=c(0),y=x[0],w=x[1],b=re(i).containerRef;s((function(){var e=function(){if(b.current){var e=(window.innerWidth-(b.current.offsetWidth||0))/2;e!==y&&w(e)}};return e(),window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[b,y]);var k=d((function(e,n,r){var t,i=null!==(t=ie("utm_source"))&&void 0!==t?t:"organic",o={action_name:r?"".concat(r,"_business_click"):n?"".concat(n.toLowerCase(),"_business_click"):"",action_type:"click",u_utm_source:i,loyalty_type:oe(g)};e&&(ae(a,f,o,v,l,u),window.location.href=e)}),[a,f,v,l,u,g]);return t(p,e({ref:b,backgroundColor:"#fff",top:"76px",position:"fixed",left:"".concat(y,"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:[r(p,e({padding:"20px 24px 20px 24px",backgroundColor:"#FFF1EC"},{children:r(h,e({variant:"HM2"},{children:"Other business services"}))})),r(p,e({display:"flex",flexDirection:"row",padding:"24px",columnGap:"48px",width:"fit-content"},{children:W.map((function(n){var i=n.title,o=n.subtitle,a=n.details,c=n.link,l=n.ravenActionName;return t(p,e({cursor:"pointer",width:"200px",className:"bd-hover-container",onClick:function(){return k(c,i,l)}},{children:[t(p,e({display:"flex",flexDirection:"row",alignItems:"center",columnGap:"8px"},{children:[r(h,e({variant:"HM2",className:"color-orange-on-hover"},{children:i})),r(le,{})]})),r(h,e({variant:"B3",css:{marginTop:"4px",opacity:.75}},{children:o})),r(h,e({variant:"P3",color:"subheading",css:{marginTop:"12px"}},{children:a}))]}),i)}))}))]}))},le=function(){return r(p,e({className:"bd-arrow-container"},{children:n([],Array(3),!0).map((function(n,t){return r(p,e({className:"bd-arrow-wrapper"},{children:r(C,{})}),t)}))}))},se=[{text:"My Profile",icon:r(F,{width:24,height:24}),redirectionLink:"/accounts/profile"},{text:"My Trips",icon:r(b,{width:24,height:24}),redirectionLink:"/accounts/trips"},{text:"Saved Cards",icon:r(_,{}),redirectionLink:"/accounts/expressway"},{text:"Saved Travellers",icon:r(L,{width:24,height:24}),redirectionLink:"/account/travellers"},{text:"Hi-Five",icon:r(E,{}),redirectionLink:"/accounts/hi-five?src=fh"},{text:"Wallet",icon:r(I,{width:24,height:24}),redirectionLink:"/accounts/wallet"},{text:"Settings",icon:r(M,{width:24,height:24}),redirectionLink:"/account/settings"},{text:"Privacy Rights",icon:r(T,{}),redirectionLink:"accounts/personal-data-dashboard"}],de="Logout",ue="My Account",pe="You are logged in with",he="header-acc-btn",fe="account-options",ge=function(n){var i=n.icon,o=n.borderGradient,a=n.backgroundGradient,l=n.handleChipClick,s=n.chevronFillColor,u=q(),h=u.loyaltyType,f=u.isUserLoggedIn,g=u.ravenPushCallback,m=u.ravenPageName,v=u.ravenPayload,x=void 0===v?{}:v,y=u.ravenEventName,w=c(!1),b=w[0],k=w[1],C=d((function(){var e;if(l)l();else{var n={action_name:"loyalty_account_click",action_type:"click",u_utm_source:null!==(e=ie("utm_source"))&&void 0!==e?e:"organic",loyaltyType:oe(h)};ae(f,y,n,x,g,m),window.location.href="/all-offers/loyalty-october"}}),[l,h,f,y,x,g,m]);return t(p,e({display:"flex",position:"relative",alignItems:"center",justifyContent:"center",borderRadius:"8px",cursor:"pointer",paddingLeft:"8px",paddingRight:b?"4px":"8px",css:{overflow:"hidden",height:32,paddingLeft:8,transition:"padding-right 0.2s ease-in-out"},onMouseEnter:function(){return k(!0)},onMouseLeave:function(){return k(!1)},onClick:C},{children:[r(p,{css:{content:'""',position:"absolute",inset:0,borderRadius:"inherit",background:a,zIndex:-2}}),r(p,{css:{content:'""',position:"absolute",inset:0,borderRadius:"inherit",padding:"1px",background:o,WebkitMask:"linear-gradient(white, white) content-box, linear-gradient(white, white)",WebkitMaskComposite:"destination-out",maskComposite:"exclude",zIndex:-1}}),r(p,e({display:"flex",alignItems:"center",position:"relative"},{children:i})),r(p,e({display:"flex",alignItems:"center",css:{overflow:"hidden",maxWidth:b?16:0,transition:"max-width 0.2s ease-in-out, opacity 0.2s ease-in-out",opacity:b?.5:0}},{children:r(N,{color:s})}))]}))};!function(e){e.FLIGHTS="Flights",e.HOTELS="Hotels",e.BUSES="Buses",e.TRAINS="Trains",e.PACKAGES="Packages"}(Z||(Z={})),function(e){e.FkVip="FkVip",e.FkPremium="FkPremium",e.InsiderIcon="InsiderIcon",e.InsiderElite="InsiderElite",e.CtLoyalty="CtLoyalty"}($||($={}));var me=((ee={})[$.FkVip]={icon:r(A,{}),borderGradient:"linear-gradient(222.13deg, rgba(243, 179, 39, 0) 2.08%, #F3B327 85.17%)",backgroundGradient:"linear-gradient(111deg, #360042 0%, #540061 100%)",chevronFillColor:"#FFF"},ee[$.FkPremium]={icon:r(P,{}),borderGradient:"linear-gradient(230.68deg, rgba(243, 179, 39, 0) 10.1%, #F3B327 45.74%)",backgroundGradient:"linear-gradient(180deg, #04176A 0%, #082395 100%)",chevronFillColor:"#FFF"},ee[$.InsiderIcon]={icon:r(D,{}),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"},ee[$.InsiderElite]={icon:r(B,{}),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"},ee[$.CtLoyalty]={icon:r(H,{}),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"},ee),ve=function(n){var i=n.icon,o=n.handleChipClick,a=n.value,l=n.type,s=q(),u=s.loyaltyType,f=s.isUserLoggedIn,g=s.ravenPushCallback,m=s.ravenPageName,v=s.ravenEventName,x=s.ravenPayload,y=void 0===x?{}:x,w=c(!1),b=w[0],k=w[1],C=d((function(){var e;if(o)o();else{var n=null!==(e=ie("utm_source"))&&void 0!==e?e:"organic",r={action_name:"".concat(l,"_account_click"),action_type:"click",u_utm_source:n,loyaltyType:oe(u)};ae(f,v,r,y,g,m);var t={supercoin:"/all-offers/supercoins/",wallet:"/accounts/wallet"};t[l]&&(window.location.href=t[l])}}),[o,l,u,f,v,y,g,m]);return t(p,e({display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"8px",cursor:"pointer",css:{height:32,paddingLeft:8,paddingRight:b?4:8,transition:"padding-right 0.2s ease-in-out",background:b?"#ffd7ca":"#ffe6df"},onMouseEnter:function(){return k(!0)},onMouseLeave:function(){return k(!1)},onClick:C},{children:[t(p,e({display:"flex",alignItems:"center",css:{gap:"4px"}},{children:[i,r(h,e({variant:"B3",isClickable:!0},{children:a}))]})),r(p,e({display:"flex",alignItems:"center",css:{overflow:"hidden",maxWidth:b?16:0,transition:"max-width 0.2s ease-in-out, opacity 0.2s ease-in-out",opacity:b?1:0}},{children:r(N,{})}))]}))},xe=function(){var n,i=q(),o=i.loyaltyType,a=i.fkSupercoinBurnBalance,c=void 0===a?0:a,l=i.walletBalance,s=void 0===l?0:l,d=i.loyaltyLoading,u=i.superCoinsLoading,h=i.walletLoading,f=i.walletChipClick,g=i.supercoinsChipClick,m=i.loyaltyChipClick,v=i.hideWalletChip,x=i.hideSupercoinsChip,y=i.hideLoyaltyChip;return d||o&&me[o]&&!y||(u||!x)||(h||!v)?t(p,e({display:"flex",padding:"0 16px 16px 16px",justifyContent:"flex-start",css:{alignSelf:"stretch",gap:"4px"}},{children:[d?r(p,{width:"50px",height:"32px",borderRadius:"8px",backgroundColor:"#efefef"}):o&&me[o]&&!y&&r(ge,{icon:me[o].icon,borderGradient:me[o].borderGradient,backgroundGradient:me[o].backgroundGradient,chevronFillColor:(null===(n=me[o])||void 0===n?void 0:n.chevronFillColor)||"#FFF",handleChipClick:m}),u?r(p,{width:"50px",height:"32px",borderRadius:"8px",backgroundColor:"#efefef"}):!x&&r(ve,{icon:r(R,{width:20,height:20}),value:c,handleChipClick:g,type:"supercoin"}),h?r(p,{width:"50px",height:"32px",borderRadius:"8px",backgroundColor:"#efefef"}):!v&&r(ve,{icon:r(I,{width:20,height:20}),value:s,handleChipClick:f,type:"wallet"})]})):null},ye=function(n){var o=n.isOpen,a=q(),c=a.handleLogoutClick,l=a.userName,f=a.userMobileNumber,g=a.countryCode,m=a.userDetailsLoading,x=a.loyaltyType,y=a.isUserLoggedIn,w=a.ravenEventName,b=a.ravenPageName,k=a.ravenPayload,C=void 0===k?{}:k,F=a.ravenPushCallback,_=re(o).containerRef,L=u((function(){return{userGreeting:l?"Hello ".concat(l,"!"):"",phoneNumber:g&&f?"".concat(g," ").concat(f):""}}),[l,f,g]),E=L.userGreeting,I=L.phoneNumber,M=function(e){var n;return{action_name:e.toLowerCase().replace(/[\s-]/g,"")+"_account_click",action_type:"click",u_utm_source:null!==(n=ie("utm_source"))&&void 0!==n?n:"organic",loyalty_type:oe(x)}},T=d((function(e,n){ae(y,w,M(e),C,F,b),window.location.href=n}),[y,w,C,F,b]);d((function(){ae(y,w,M(de),C,F,b),c()}),[y,w,C,F,b,c]);var N=d((function(){var e=document.getElementById(he),n=document.getElementById(fe);if(e&&n){var r=e.getBoundingClientRect().right;n.style.left="".concat(r-328,"px")}}),[]);s((function(){N()}),[N]);var A;return t(p,e({id:fe,ref:_,display:"flex",flexDirection:"column",borderRadius:"16px",zIndex:1002,top:"76px",position:"fixed",css:{opacity:0,overflow:"hidden"},width:"".concat(328,"px"),background:"#FFF1EC"},{children:[r(p,e({padding:"16px",height:"76px"},{children:(A=function(n,t,i,o){return r(h,e({variant:i,color:o},{children:n?r(p,{height:"HM3"===i?"18px":"12px",width:"HM3"===i?"140px":"200px",backgroundColor:"#efefef",borderRadius:"8px"}):t}))},r(p,e({display:"flex",flexDirection:"column",css:{gap:"4px"}},{children:t(i,E?{children:[A(m,E,"HM3","primary"),A(m,"".concat(pe," ").concat(I),"P3","subheading")]}:{children:[A(m,pe,"P3","subheading"),A(m,I,"HM3","primary")]})})))})),r(xe,{}),t(p,e({display:"flex",flexDirection:"column",padding:"8px",backgroundColor:"white",rowGap:"8px",css:{borderBottomLeftRadius:12,borderBottomRightRadius:12}},{children:[se.map((function(n){var i=n.text,o=n.icon,a=n.redirectionLink;return r(p,e({className:"hoverable-container",padding:"8px",borderRadius:"8px",cursor:"pointer",onClick:function(){return T(i,a)}},{children:t(p,e({display:"flex",cursor:"pointer",css:{columnGap:"8px"}},{children:[o,r(h,e({variant:"P1",css:{display:"flex",alignItems:"center",cursor:"pointer"}},{children:i}))]}))}),"account-option-".concat(i))})),r(v,{css:{borderBottom:"1px dashed #E6E6E6"}}),t(p,e({className:"logout-button",display:"flex",padding:"8px",borderRadius:"8px",cursor:"pointer",onClick:c},{children:[r(G,{height:24,width:24}),r(h,e({variant:"P1",css:{display:"flex",alignItems:"center",cursor:"pointer"},color:"warning"},{children:de}))]}))]}))]}))},we=function(){var n=q(),i=n.isNovacThemeEnabled,o=n.ravenEventName,a=n.ravenPayload,l=void 0===a?{}:a,u=n.ravenPushCallback,f=n.isUserLoggedIn,g=n.loyaltyType,m=n.ravenPageName,v=ne({openDelay:0}),x=v.isDropdownVisible,y=v.handleOnMouseEnter,b=v.handleOnMouseLeave,k=v.handleDropdownMouseEnter,C=v.handleDropdownMouseLeave,_=c(!1),L=_[0],E=_[1];s((function(){var e=function(){E(window.scrollY>=100)};return window.addEventListener("scroll",e),function(){return window.removeEventListener("scroll",e)}}),[]);var I=i&&!L?Y.NOVAC:Y.DEFAULT,M=I.hoverColor,T=I.typographyColor,N=d((function(){var e,n=null!==(e=ie("utm_source"))&&void 0!==e?e:"organic",r={action_name:"".concat(ue.toLowerCase().replace(/[\s-]/g,""),"_header_hover"),action_type:"hover",u_utm_source:n,loyalty_type:oe(g)};ae(f,o,r,l,u,m)}),[f,o,l,u,m,g]);return t(p,{children:[t(p,e({display:"flex",padding:"8px 12px",alignItems:"center",borderRadius:"12px",height:"100%",cursor:"pointer",css:{columnGap:8,height:64},onMouseEnter:function(){y(0),N()},onMouseLeave:b,id:he},{children:[r(F,{color:x?M:T}),t(p,e({display:"flex",flexDirection:"row",alignItems:"center"},{children:[r(h,e({variant:"B2",css:{cursor:"pointer"},colorCode:x?M:T},{children:ue})),r(w,{width:20,height:20,fill:x?M:T})]}))]})),r(X,e({show:x,marginTop:"64px",handleDropdownMouseEnter:k,handleDropdownMouseLeave:C,onMaskClick:C},{children:r(ye,{isOpen:x})}))]})},be=function(n){return r(J,e({value:n},{children:r(ke,{})}))},ke=function(){var n,o=q(),a=o.onLoginButtonClick,l=o.showAllLobs,u=void 0!==l&&l,f=o.isUserLoggedIn,x=o.loyaltyType,y=o.isNovacThemeEnabled,w=void 0!==y&&y,b=o.ravenPayload,k=void 0===b?{}:b,C=o.ravenPushCallback,F=o.ravenPageName,_=o.ravenEventName,L=c(!1),E=L[0],I=L[1];s((function(){var e=function(){I(window.scrollY>=100)};return window.addEventListener("scroll",e),function(){return window.removeEventListener("scroll",e)}}),[]);var M=w&&!E?Y.NOVAC:Y.DEFAULT,T=M.headerBackground,N=M.logoFill,A=M.loginButtonColorVariant,P=M.hoverColor,D=M.fkcompanyColor,B=M.typographyColor,H=ne({openDelay:0}),R=H.isDropdownVisible,G=H.hoveredElemIndex,U=H.handleOnMouseEnter,V=H.handleOnMouseLeave,z=H.handleDropdownMouseEnter,W=H.handleDropdownMouseLeave,K=null!==(n=ie("utm_source"))&&void 0!==n?n:"organic",J=d((function(e,n){return{action_name:e,action_type:n,u_utm_source:K,loyalty_type:oe(x)}}),[K,x]),Z=d((function(e){if(e.isClickable&&e.link){var n="".concat(e.text.toLowerCase().replace(/\s/g,""),"_header_click"),r=J(n,"click");ae(f,_,r,k,C,F),window.location.href=e.link}}),[J,f,_,k,C,F]),$=d((function(){var e=J("home_header_click","click");ae(f,_,e,k,C,F),window.location.href="/"}),[J,f,_,k,C,F]),ee=d((function(e){var n="".concat(e.text.toLowerCase().replace(/\s/g,""),"_header_hover"),r=J(n,"hover");ae(f,_,r,k,C,F)}),[J,f,_,k,C,F]);return t(i,{children:[r(p,e({display:"flex",top:0,position:"sticky",width:"100%",alignItems:"center",justifyContent:"center",zIndex:1e3,height:"64px",background:T,css:{gap:"24px",flexShrink:0,borderBottom:"transparent"===T?"":"1px solid #E6E6E6",transition:"background-color 0.3s ease-in-out, border-bottom 0.3s ease-in-out"}},{children:t(p,e({display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 28px",flex:1,css:{gap:"24px",maxWidth:1440}},{children:[t(p,e({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",cursor:"pointer",onClick:$},{children:[r(O,{fillColor:N}),r(v,{css:{width:12,marginLeft:2,marginRight:2,transform:"rotate(90deg)",borderBottom:"1px solid #e0e0e0"}}),r(S,{color:D})]})),t(p,e({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",columnGap:"24px"},{children:[r(p,e({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",columnGap:"4px"},{children:j.map((function(n,i){var o=n.text,a=n.lefticon,c=n.rightIcon,l=n.isHoverable,s=G===i;return t(p,{children:[t(p,e({onMouseEnter:function(){U(i),n.isHoverable&&ee(n)},onMouseLeave:V,display:"flex",flexDirection:"row",alignItems:"center",padding:"8px 12px 8px 12px",cursor:"pointer",position:"relative",columnGap:8,height:"64px",onClick:function(){return Z(n)}},{children:[r(a,{color:s?P:B}),t(p,e({display:"flex",flexDirection:"row",alignItems:"center"},{children:[r(h,e({variant:"B2",colorCode:s?P:B,isClickable:!0},{children:o})),c&&r(c,{width:20,height:20,fill:s?P:B})]}))]}),"nav-option-".concat(i)),r(X,e({show:G===i&&l&&R,marginTop:"64px",handleDropdownMouseEnter:z,handleDropdownMouseLeave:W,onMaskClick:W},{children:r(ce,{isOpen:G===i&&l&&R})}))]})}))})),f&&r(v,{css:{width:12,margin:"0 -18px",transform:"rotate(90deg)",borderBottom:"1px solid #e0e0e0"}}),r(p,{children:f?r(p,e({display:"flex",flexDirection:"row",alignItems:"center"},{children:r(we,{})})):r(m,e({variant:"outline",color:A,className:"".concat("transparent"===T?"novac-login-button":"login-button"),onClick:a,css:{width:153,height:40},loading:!1},{children:r(h,e({componentNode:"span",variant:"L2",color:A===g.NEUTRAL?"neutral":"primary"},{children:"Log in"}))}))})]}))]}))})),u&&r(Q,{})]})};export{be as Header,Z as LOBS_VALUES,$ as LoyaltyType,U as RAVEN_PAGE_NAMES};
|
|
2
2
|
//# sourceMappingURL=ct-design-header.browser.esm.js.map
|