"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6638],{HHCU:function(e,t,a){a.d(t,{N:function(){return HomePageCarouselWrapper}});var n=a("BGKE"),i=a("q1tI"),l=a("wp0n"),o=a("Zdfy"),r=a("TSYQ"),c=a.n(r),d=a("CLWb"),s=a("pK+c"),h=a("hXNO"),g=a("dDsW"),m=a("tYvc"),p=a.n(m);let HomePageCarouselWrapper=e=>{let{children:t,sectionName:a,classes:r,showControls:m=!0,showAllLink:u,asTitle:f="h2",dataTracking:v,carouselProps:b,disableItemCountCheck:x=!1}=e,{root:Z,rootContainer:w,titleAndControls:y,body:C}=r||{},{formatMessage:B}=(0,g.Z)(),S=(0,h.d)(),[N,k]=(0,i.useState)(null),[M,T]=(0,i.useState)(!1),[P,I]=(0,i.useState)(!1),L=i.Children.count(t);return(0,i.useEffect)(()=>{if(!N)return;let updateScrollState=()=>{T(N.canScrollPrev()),I(N.canScrollNext())};return updateScrollState(),N.on("select",updateScrollState),N.on("reInit",updateScrollState),()=>{N.off("select",updateScrollState),N.off("reInit",updateScrollState)}},[N]),(0,n.tZ)("div",{className:c()(Z),children:(0,n.BX)("div",{className:c()("flex flex-col gap-[20px]",w),children:[(0,n.BX)("div",{className:c()("flex items-center justify-between w-full",y),children:[(0,n.BX)(d.F,{href:u,asComponent:f,className:c()("flex items-center gap-1 md:gap-4 min-w-0",u&&"cursor-pointer"),"data-event-category":null==v?void 0:v.dataEventCategory,"data-event-action":null==v?void 0:v.dataEventAction,"data-event-label":null==v?void 0:v.dataEventLabel,children:[(0,n.tZ)(l.T,{size:S?"h5":"h3",fw:700,color:"gray1000",align:"left",lineClamp:2,className:"max-md:!text-[17px] min-w-0 flex-1 overflow-hidden",children:B({id:a.id,defaultMessage:a.defaultMessage})}),u&&(0,n.tZ)(p(),{width:20,height:20,className:"shrink-0"})]}),!S&&m&&(x||L>4)&&(0,n.BX)("div",{className:"flex items-center gap-2",children:[(0,n.tZ)("button",{className:c()("w-[48px] h-[48px] rounded-full flex items-center justify-center",M?"bg-neutral50 cursor-pointer":"bg-neutral100 cursor-not-allowed opacity-50"),onClick:()=>{null==N||N.scrollPrev()},disabled:!M,children:(0,n.tZ)(s.zr,{width:24,height:24})}),(0,n.tZ)("button",{className:c()("w-[48px] h-[48px] rounded-full flex items-center justify-center",P?"bg-neutral50 cursor-pointer":"bg-neutral100 cursor-not-allowed opacity-50"),onClick:()=>{null==N||N.scrollNext()},disabled:!P,children:(0,n.tZ)(s.dj,{width:24,height:24})})]})]}),(0,n.tZ)("div",{className:c()(C),children:(0,n.tZ)(o.l,{withControls:!1,withIndicators:!1,getEmblaApi:k,slideGap:S?12:24,slideSize:"25%",align:"start",containScroll:"trimSnaps",...b,children:t})})]})})}},OzKP:function(e,t,a){a.d(t,{U:function(){return HomeVideos}});var n=a("BGKE"),i=a("q1tI"),l=a("+4HH"),o=a("EoPH"),r=a("Tut/"),c=a("8vDj"),d=a("OAL+"),s=a("Eso5"),h=a("mYVa"),g=a("dDsW"),m=a("CJtR"),p=a("M1QZ"),u=a("iv2E"),f=a("P5LW"),v=a("rIrU"),b=a("lMcb");let HomeVideos=e=>{let{videos:t}=e,a=(0,c.rZ)(),{formatMessage:x}=(0,g.Z)(),{locale:Z}=(0,f.h)(),w=(0,i.useMemo)(()=>(0,m.UC)(Z),[Z]);return(0,n.BX)(b.Z,{url:"/videos/",color:"yellow",children:[(0,n.tZ)(b.Z.SectionName,{"data-event-category":"Recommend Video","data-event-action":"See All Videos","data-event-label":"https://".concat(u.domainLocales[Z],"/videos/"),icon:(0,n.tZ)(r.Z,{size:20,color:a.colors.yellow[6]}),children:x({id:"homeVideoSection.heading",defaultMessage:"Video"})}),(0,n.tZ)(b.Z.Heading,{children:x({id:"home.video.title",defaultMessage:"Video"})}),(0,n.tZ)(b.Z.Content,{children:(0,n.tZ)(p.Z,{containScroll:"trimSnaps",slideSize:"auto",slideGap:12,align:"start",styles:e=>({viewport:{paddingLeft:16,paddingRight:16,[e.fn.largerThan("sm")]:{paddingLeft:48,paddingRight:48}}}),children:(0,n.BX)(d.K,{spacing:24,children:[(0,n.tZ)(s.x,{sx:e=>({marginLeft:-16,marginRight:-16,[e.fn.largerThan("sm")]:{marginLeft:-48,marginRight:-48}}),children:(0,n.tZ)(p.Z.Body,{children:(t||[]).map((e,t)=>(0,n.tZ)(p.Z.Slide,{children:(0,n.tZ)(l.V,{data:e,dataEventCategory:"Recommend Video",dataEventAction:"Video Click ".concat(t+1),styles:{root:{borderRadius:8,width:e.type===o.V.SHORTS?103:330,[a.fn.largerThan("sm")]:{width:e.type===o.V.SHORTS?160:515}},title:{[a.fn.largerThan("sm")]:{fontSize:(0,h.h)(14),lineHeight:(0,h.h)(22)}}}})},String(t)))})}),(0,n.tZ)(s.x,{sx:e=>({height:1,backgroundColor:"#fff",[e.fn.smallerThan("sm")]:{display:"none"}})}),(0,n.BX)(p.Z.Footer,{children:[(0,n.tZ)(b.Z.ViewAll,{"data-event-category":"Spotlight","data-event-action":"See All Click","data-event-label":"".concat(w).concat(v.sb,"/videos/"),children:x({id:"viewAll",defaultMessage:"View all"})}),(0,n.BX)(p.Z.Controls,{children:[(0,n.tZ)(p.Z.Control,{direction:"prev","data-event-category":"Recommend Video","data-event-action":"See More Video","data-event-label":"".concat(w).concat(v.sb)}),(0,n.tZ)(p.Z.Control,{direction:"next","data-event-category":"Recommend Video","data-event-action":"See More Video","data-event-label":"".concat(w).concat(v.sb)})]})]})]})})}),(0,n.tZ)(b.Z.ViewAll,{"data-event-category":"Recommend Video","data-event-action":"See All Videos","data-event-label":"".concat(w).concat(v.sb,"/videos/"),children:x({id:"viewAll",defaultMessage:"View all"})})]})}},rbMh:function(e,t,a){a.d(t,{Z:function(){return homepageBanner}});var n=a("BGKE"),i=a("q1tI"),l=a("0Tio"),o=a("LL/B"),r=a("nGnw"),c=a("d2lK"),d=a("fdQd"),s=a("wp0n"),h=a("8wjV"),g=a("iuhU"),m=a("Eso5"),p=a("frWj"),u=a("RZSM"),f=a("7Ci/"),v=a("SPK5"),b=a("OAL+"),x=a("JPg4"),Z=a("g4pe"),w=a.n(Z),y=a("dDsW"),C=a("S3OL"),B=a("iv2E"),S=a("hXNO"),N=a("P5LW"),k=a("rIrU"),M=a("rBCA"),T=a("uuQu"),P=a("iBNF");let I=(0,M.Z)("div",{target:"etqqn1s0"})(T.M.mbDown,"{:not(.only-menu){margin:0 0 16px 0;padding:24px 0 24px 0;}background-color:",P.r.colors.primary100,";background-size:cover;background-repeat:no-repeat;}"),L=(0,M.Z)("div",{target:"etqqn1s1"})(T.M.mbUp,"{:not(.only-menu){padding:0;min-height:280px;}position:relative;background-color:",P.r.colors.primary100,";background-size:cover;background-repeat:no-repeat;}",T.M.mbDown,"{&.only-menu{padding:18px 0;.menu-wrapper{margin-top:0;}}}"),X=(0,M.Z)("div",{target:"etqqn1s2"})("display:flex;flex-shrink:0;pointer-events:none;user-select:none;position:relative;",T.M.mbDown,"{position:relative;max-width:200px;max-height:200px;display:flex;width:40%;height:100%;aspect-ratio:1;}",T.M.mbUp,"{max-width:280px;max-height:280px;width:100%;height:100%;align-self:flex-end;flex:1;position:absolute;right:15%;bottom:0;object-fit:contain;.home-banner-image{aspect-ratio:1;object-fit:contain !important;object-position:bottom;}}"),z=(0,M.Z)("div",{target:"etqqn1s3"})(T.M.mbDown,"{padding:0 16px;}"),E=(0,M.Z)("div",{target:"etqqn1s4"})("display:flex;width:100%;justify-content:space-between;margin:0 auto;",T.M.tdUp,"{max-width:1170px;gap:16px;padding:16px;margin:8px auto;}",T.M.tdOnly,"{gap:16px;}"),A=(0,M.Z)("a",{target:"etqqn1s5"})("display:flex;padding:16px 3px 0;/* System/z1 (small) */\n\n border-radius:4px;text-decoration:none;",T.M.mbUp,"{align-items:center;gap:16px;flex:1;padding:16px;background:",P.r.colors.neutral50,";}",T.M.mbDown,"{display:flex;flex:1 1 0px;align-items:center;flex-direction:column;gap:9px;}[data-size='p3']{line-height:24px;}&[data-two-column='true']{",T.M.mbDown,"{grid-column-start:1;grid-column-end:3;justify-content:center;}}"),R=(0,M.Z)("img",{target:"etqqn1s6"})("display:block;width:32px;height:32px;",T.M.mbUp,"{width:40px;height:40px;}"),V=(0,M.Z)(s.T,{target:"etqqn1s7"})(T.M.mbDown,"{text-align:center;}",T.M.mbUp,"{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1;text-overflow:ellipsis;}"),H=(0,M.Z)("hr",{target:"etqqn1s8"})("border:none;border-top:2px dashed ",P.r.colors.neutral100,";",T.M.mbDown,"{margin:16px -16px;}",T.M.mbUp,"{max-width:1138px;margin:0 auto;padding:0 16px;}"),HomepageBannerMenu=e=>{let{hasDivider:t=!1}=e,{formatMessage:a}=(0,y.Z)(),{locale:l}=(0,N.h)(),d=(0,S.d)(),s=(0,i.useMemo)(()=>{let e=2;return k.Uv.includes(l)&&(e+=1),o.c.includes(l)&&(e+=1),o.E.includes(l)&&(e+=1),e},[l]);return(0,n.BX)(z,{className:"homepageBannerMenu",children:[(0,n.BX)(E,{className:"menu-wrapper",children:[(0,n.BX)(A,{href:"/categories","data-event-category":"Home Page Nav","data-event-action":"Click","data-event-label":"https://".concat(B.domainLocales[l]).concat(k.sb,"/categories/"),"data-two-column":s%2==1,children:[(0,n.tZ)(R,{src:r.C.getAssetPath("nav-icons/discover.svg")}),(0,n.tZ)(V,{size:d?"n1":"s3",weight:d?"regular":"semiBold",children:a({id:"home.navigator.menuItem.discover",defaultMessage:"Discover"})})]}),k.Uv.includes(l)&&(0,n.BX)(A,{href:"/care","data-event-category":"Home Page Nav","data-event-action":"Click","data-event-label":"https://".concat(B.domainLocales[l]).concat(k.sb,"/care/"),children:[(0,n.tZ)(R,{src:r.C.getAssetPath("nav-icons/care.svg")}),(0,n.tZ)(V,{size:d?"n1":"s3",weight:d?"regular":"semiBold",children:a({id:"home.navigator.menuItem.helloCare",defaultMessage:"Book Doctor"})})]}),(0,n.BX)(A,{href:"https://".concat(B.domainLocales[l]).concat(k.sb,"/health-tools/"),"data-event-category":"Home Page Nav","data-event-action":"Click","data-event-label":"https://".concat(B.domainLocales[l]).concat(k.sb,"/health-tools/"),children:[(0,n.tZ)(R,{src:r.C.getAssetPath("nav-icons/health-tools.svg")}),(0,n.tZ)(V,{size:d?"n1":"s3",weight:d?"regular":"semiBold",children:a({id:"home.navigator.menuItem.healthTools",defaultMessage:"Health Tools"})})]}),o.E.includes(l)&&(0,n.BX)(A,{href:"https://".concat(B.domainLocales[l]).concat(k.sb,"/shop/"),"data-event-category":"Home Page Nav","data-event-action":"Click","data-event-label":"https://".concat(B.domainLocales[l]).concat(k.sb,"/shop/"),children:[(0,n.tZ)(c.I,{disabled:!d,color:"green",label:a({id:"common.new"}),size:20,styles:{indicator:{transform:"translate(100%, -50%) !important",top:"0 !important",right:"0 !important"}},children:(0,n.tZ)(R,{src:r.C.getAssetPath("nav-icons/shop.svg")})}),(0,n.tZ)(c.I,{disabled:d,color:"green",label:a({id:"common.new"}),size:20,styles:{root:{paddingRight:d?0:20}},children:(0,n.tZ)(V,{size:d?"n1":"s3",weight:d?"regular":"semiBold",children:a({id:"home.navigator.menuItem.shop",defaultMessage:"Shop"})})})]}),o.c.includes(l)&&(0,n.BX)(A,{href:"/community","data-event-category":"Home Page Nav","data-event-action":"Click","data-event-label":"https://".concat(B.domainLocales[l],"/community/"),children:[(0,n.tZ)(R,{src:r.C.getAssetPath("nav-icons/community.svg")}),(0,n.tZ)(V,{size:d?"n1":"s3",weight:d?"regular":"semiBold",children:a({id:"home.navigator.menuItem.helloTogether",defaultMessage:"Communities"})})]})]}),t&&(0,n.tZ)(H,{})]})};var homepageBanner=e=>{let{autoplayTime:t=0,banners:a=[],title:r,description:c,image:Z,isMobile:y,type:S,ctaUrl:M,ctaText:T}=e,{locale:P}=(0,N.h)(),z=(0,i.useRef)((0,x.Z)({delay:1e3*Number(t),stopOnInteraction:!1}));return(0,n.BX)(n.HY,{children:[(0,n.BX)(w(),{children:[(0,n.tZ)("link",{rel:"preload",href:"".concat(k.Nr,"/homepage-banner/banner-bg.svg"),as:"image",fetchPriority:"high"}),!!Z&&(0,n.tZ)("link",{rel:"preload",href:Z,as:"image",fetchPriority:"high"})]}),(0,n.tZ)(I,{className:(0,g.default)({"only-menu":!r},"homepageBanner"),style:{backgroundImage:y?'url("'.concat(k.Nr,'/homepage-banner/banner-bg.svg")'):"unset"},children:r||"upload"===S?(0,n.BX)(n.HY,{children:["upload"===S?(0,n.tZ)(d.a,{withControls:!1,withIndicators:a.length>1,loop:!0,plugins:t>0?[z.current]:[],styles:e=>({indicator:{width:8,height:8,borderRadius:"50%",border:"1px solid ".concat(e.colors.neutral100),boxShadow:"none",background:"#fff",opacity:1,"&[data-active]":{borderColor:e.fn.primaryColor(),background:e.fn.primaryColor()}}}),children:a.map((e,t)=>(0,n.tZ)(d.a.Slide,{children:(0,n.BX)(m.x,{component:e.url?"a":"div",href:e.url,target:e.openNewTab?"_blank":"_self",...e.url&&{"data-event-category":"Slicing Banners","data-event-action":"Banner Click","data-event-label":e.url},children:[(0,n.tZ)(p.z,{smallerThan:"sm",styles:{display:"none"},children:(0,n.tZ)(u.o,{ratio:1920/416,children:(0,n.tZ)(C.R,{src:e.desktop,layout:"fill",alt:"",quality:100})},t)}),(0,n.tZ)(p.z,{largerThan:"sm",styles:{display:"none"},children:(0,n.tZ)(u.o,{ratio:375/220,children:(0,n.tZ)(C.R,{src:e.mobile,layout:"fill",alt:"",quality:100})},t)})]})},t))}):(0,n.tZ)(L,{style:{backgroundImage:y?"unset":'url("'.concat(k.Nr,'/homepage-banner/banner-bg.svg")')},children:(0,n.BX)(f.W,{size:"lg",pt:{lg:24},children:[(0,n.BX)(v.k,{justify:"space-between",align:"center",h:"100%",gap:0,children:[(0,n.BX)(b.K,{spacing:16,maw:600,sx:{flexGrow:1},children:[(0,n.tZ)(s.T,{as:"h1",size:y?"h3":"h2",children:r}),c&&(0,n.tZ)(p.z,{smallerThan:"sm",styles:{display:"none"},children:(0,n.tZ)(s.T,{size:"p2",as:"span",children:(0,n.tZ)("span",{dangerouslySetInnerHTML:{__html:c}})})}),(0,n.tZ)(p.z,{smallerThan:"sm",styles:{display:"none"},children:(0,n.BX)(m.x,{children:[T&&M&&(0,n.tZ)("a",{href:M,target:"_blank",className:"banner_button",children:(0,n.tZ)(h.B,{size:"md",color:"primary",children:T})}),!y&&(null==S?void 0:S.toLowerCase())==="care"&&o.C.includes(P)&&(0,n.tZ)(l.J,{isMobile:y,careApiDomain:k.ENV.NEXT_PUBLIC_CARE_API||"https://service-health-care.hellohealthgroup.com/",careFrontDomain:"/care",geoLocationPermission:"denied",gaTrackingSearchBar:{dataEventAction:"Search Click",dataEventCategory:"Care",dataEventLabel:"https://".concat(B.domainLocales[P]).concat(k.sb,"/")}},String(y))]})})]}),!!Z&&(0,n.tZ)(X,{children:(0,n.tZ)(C.R,{src:Z,className:"home-banner-image",alt:"",layout:"fill",priority:!0,placeholder:void 0,blurDataURL:void 0})})]}),(0,n.tZ)(p.z,{largerThan:"sm",styles:{display:"none"},children:(0,n.BX)(m.x,{children:[T&&M&&(0,n.tZ)("a",{href:M,target:"_blank",className:"banner_button",children:(0,n.tZ)(h.B,{size:"md",fullWidth:!0,children:T})}),y&&(null==S?void 0:S.toLowerCase())==="care"&&o.C.includes(P)&&(0,n.tZ)(l.J,{isMobile:y,careApiDomain:k.ENV.NEXT_PUBLIC_CARE_API||"https://service-health-care.hellohealthgroup.com/",careFrontDomain:"/care",geoLocationPermission:"denied",gaTrackingSearchBar:{dataEventAction:"Search Click",dataEventCategory:"Care",dataEventLabel:"https://".concat(B.domainLocales[P]).concat(k.sb,"/")}},String(y))]})})]})}),!y&&(0,n.tZ)(HomepageBannerMenu,{hasDivider:!0})]}):(0,n.tZ)(L,{className:"only-menu",children:(0,n.tZ)(HomepageBannerMenu,{})})}),(r||"upload"===S)&&y&&(0,n.tZ)(HomepageBannerMenu,{hasDivider:!0})]})}},N3Xi:function(e,t,a){a.d(t,{s:function(){return HospitalServiceCard}});var n=a("BGKE"),i=a("rYNE"),l=a("xNPh"),o=a("wp0n"),r=a("hXNO"),c=a("rIrU"),d=a("Jpic"),s=a("P5LW"),h=a("rEaw"),g=a("nxPU"),m=a("iAbL"),p=a("dDsW");let ChipShortInfo=e=>{let{value:t}=e,{formatMessage:a}=(0,p.Z)();return(0,n.tZ)("div",{className:"bg-green600 rounded-[4px] px-[5px] py-[1.5px] whitespace-nowrap",children:(0,n.BX)(o.T,{size:"subText",color:"white",fw:500,className:"!leading-4",children:[a({id:"home.hospitalServiceCard.save",defaultMessage:"Save"})," ","".concat(t,"%")]})})},PriceItem=e=>{let{price:t,discountPrice:a,percentageDiscount:i,currency:l}=e,{currentPrice:c}=(0,d.$)({price:t,discountPrice:a}),p=(0,r.d)(),{locale:u}=(0,s.h)();return(0,n.BX)("div",{children:[(0,n.BX)("div",{className:"flex items-center gap-1",children:[(0,n.tZ)(o.T,{size:p?"p3":"title2",color:"gray1000",fw:600,children:u===h.MV.Malaysia?(0,m.QG)(a||t,l):c}),null!=i&&i>0&&(0,n.tZ)(ChipShortInfo,{value:Math.round(i)})]}),null!=i&&i>0&&(0,n.tZ)(o.T,{size:p?"c2":"c1",color:"gray400",fw:400,sx:{textDecoration:"line-through"},children:u===h.MV.Malaysia?(0,m.QG)(t,l):(0,m.OH)(t,u,g.MB[u]||"VND")})]})};var u=a("YdJN"),f=a.n(u);let HospitalServiceCard=e=>{var t;let{name:a,display_name:d,price:s,price_discount:h,percent_discount:g,total_rating:m,avg_rating:p,organization:u,handleClick:v,logo:b,banner:x,currency:Z}=e,w=(0,r.d)(),y=b||x||c.YS;return(0,n.BX)("div",{className:"flex flex-col gap-2 md:gap-4 cursor-pointer w-[160px] md:w-[264px]",onClick:v,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),null==v||v())},role:"button",tabIndex:0,children:[(0,n.tZ)("div",{className:"shrink-0 h-[160px] md:h-[254px]",children:(0,n.tZ)(i.I,{alt:a,src:y,width:264,height:254,className:"rounded-[4px] md:rounded-lg w-full h-full object-contain"})}),(0,n.BX)("div",{className:"flex flex-col gap-2",children:[(0,n.BX)("div",{className:"flex flex-col gap-1",children:[(0,n.tZ)(o.T,{size:w?"p3":"title2",fw:600,color:"gray1000",lineClamp:2,children:d||a}),null!=p&&null!=m&&(0,n.BX)("div",{className:"flex items-center gap-1",children:[(0,n.tZ)(f(),{className:"text-yellow600 w-4 h-4"}),(0,n.tZ)(o.T,{size:"c1",fw:500,color:"gray700",children:null===(t=Number(p))||void 0===t?void 0:t.toFixed(1)}),null!=m&&(0,n.BX)(o.T,{size:"c1",fw:500,color:"gray700",children:["(",(0,l.a)(m),m>1e3?"+":"",")"]})]})]}),(0,n.tZ)(PriceItem,{price:s,discountPrice:h,percentageDiscount:g,currency:Z}),(null==u?void 0:u.name)&&(0,n.BX)("div",{className:"flex gap-2 py-2 items-center",children:[(0,n.tZ)(i.I,{alt:null==u?void 0:u.name,src:(null==u?void 0:u.logo)||c.YS,width:24,height:24,className:"rounded-[4px] object-contain w-[24px] h-[24px] md:w-[28px] md:h-[28px]"}),(0,n.tZ)(o.T,{size:"c1",fw:500,color:"gray1000",lineClamp:2,className:"!leading-4",children:null==u?void 0:u.name})]})]})]})}},"LpP+":function(e,t,a){a.r(t),a.d(t,{default:function(){return IdlePopupWrapper}});var n=a("BGKE"),i=a("q1tI"),l=a("wp0n"),o=a("8wjV"),r=a("q9DY"),c=a("kfjY"),d=a("Eso5"),s=a("OAL+"),h=a("mYVa"),g=a("SPK5"),m=a("Iblh"),p=a("3/P/"),u=a("i8i4"),f=a("LL/B"),v=a("nGnw"),b=(0,a("/npG").k)((e,t)=>{let{desktopImage:a,mobileImage:n,backgroundColor:i}=t;return{root:{position:"fixed",zIndex:f.Z-1,backgroundImage:"url(".concat(n||v.C.getAssetPath("sc-pages/idea-bg-mobile.svg"),")"),backgroundSize:"contain",backgroundRepeat:"no-repeat",backgroundPosition:"right center",backgroundColor:i||"#284A75",overflow:"hidden",padding:(0,h.h)(24),[e.fn.smallerThan("sm")]:{borderTopLeftRadius:(0,h.h)(8),borderTopRightRadius:(0,h.h)(8),bottom:0,right:0,left:0},[e.fn.largerThan("sm")]:{backgroundImage:"url(".concat(a||v.C.getAssetPath("sc-pages/idea-bg.svg"),")"),bottom:0,right:0,minWidth:(0,h.h)(600),maxWidth:(0,h.h)(744),borderTopLeftRadius:(0,h.h)(16)}},heading:{[e.fn.smallerThan("sm")]:{maxWidth:(0,h.h)(240)}},info:{maxWidth:"70%",[e.fn.smallerThan("sm")]:{gap:(0,h.h)(16),maxWidth:(0,h.h)(270)}},actions:{gap:(0,h.h)(12),[e.fn.smallerThan("sm")]:{flexDirection:"column",justifyContent:"stretch",gap:(0,h.h)(8),button:{width:"100%"}}}}}),x=(0,i.forwardRef)((e,t)=>{let{title:a,backgroundColor:f,buttonColor:v,titleColor:x,desktopImage:Z,mobileImage:w,listItems:y=[],idleTime:C=30,onItemClick:B,styles:S,classNames:N,...k}=e,{classes:M}=b({backgroundColor:f,desktopImage:Z,mobileImage:w},{name:"IdlePopup",styles:S,classNames:N}),T=(0,p.c)(1e3*C,{initialState:!1}),[P,{open:I,close:L}]=(0,m.q)(!1),[X,z]=(0,i.useState)(!1);return(0,i.useImperativeHandle)(t,()=>({close:L,stopTracking:function(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];return z(e)}})),(0,i.useEffect)(()=>{document.body.click()},[]),(0,i.useEffect)(()=>{X||!T||P||I()},[T,P,X]),a&&y.length>0?(0,u.createPortal)((0,n.tZ)(c.u,{mounted:P,transition:"slide-up",duration:400,timingFunction:"ease",children:e=>(0,n.BX)(d.x,{className:M.root,...k,style:e,children:[(0,n.BX)(s.K,{className:M.info,spacing:(0,h.h)(24),children:[(0,n.tZ)(l.T,{size:"h3",color:x||"#fff",className:M.heading,children:a}),(0,n.tZ)(g.k,{className:M.actions,children:y.map((e,t)=>(0,n.tZ)(o.B,{variant:0===t?"primary":"light",color:v||"#FC7419",onClick:()=>{null==B||B(e.hash),L()},...e.btnTracking,styles:e=>({root:{height:"auto !important",paddingTop:(0,h.h)(8),paddingBottom:(0,h.h)(8),[e.fn.smallerThan("sm")]:{paddingLeft:(0,h.h)(16),paddingRight:(0,h.h)(16)}},label:{whiteSpace:"normal"}}),children:e.title},String(t)))})]}),(0,n.tZ)(d.x,{onClick:()=>L(),sx:{position:"absolute",right:12,top:12,cursor:"pointer",backgroundColor:"#fff",borderRadius:"50%",width:40,height:40,display:"flex",alignItems:"center",justifyContent:"center"},children:(0,n.tZ)(r.Z,{size:20})})]})}),document.body):null});function IdlePopupWrapper(e){let{popupRef:t,...a}=e;return(0,n.tZ)(x,{...a,ref:t})}}}]);