1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4850],{34850:function(e,t,l){l.r(t),l.d(t,{default:function(){return k}});var o=l(3827),i=l(64090),a=l(74404),n=l.n(a),s=l(70503),r=l(68081),c=l(70196),d=l(43046),u=l(30828),f=l(96333),m=l(74778),p=l(52426),v=l(31410),x=l.n(v),g=l(44923),h=l(68605),b=l(1729),w=l(79882),y=l(2571),C=l(86183),j=l(28623),S=l(92590);let N={suppressHydrationWarning:!0,"data-gramm":"false","data-gramm_editor":"false","data-enable-grammarly":"false"};var _=l(84052);let I=e=>{let{catalogId:t="",parentClass:l="",isAllGiftActive:a=!1,isMyRelationsActive:n=!1}=e,{trackEvent:v}=(0,f.Z)(),I=(0,u.I0)(),[k,D]=(0,i.useState)(null===c.M8||void 0===c.M8?void 0:c.M8.defaultCountry),[A,E]=(0,i.useState)(!1),[R,G]=(0,i.useState)(!1),[z,M]=(0,i.useState)(!1),[O,H]=(0,i.useState)([]),[P,W]=(0,i.useState)({home:!a&&!n,abroad:!1,allGifts:a&&!n,myReminders:n}),[L,Z]=(0,i.useState)(!1),F=(0,u.v9)(e=>{var t,l;return null==e?void 0:null===(l=e.fus)||void 0===l?void 0:null===(t=l.loginDetail)||void 0===t?void 0:t.userType}),T=(0,u.v9)(e=>{var t;return null==e?void 0:null===(t=e.locationLock)||void 0===t?void 0:t.countryListData}),U=(0,u.v9)(e=>{var t,l;return null==e?void 0:null===(l=e.webFeatureControls)||void 0===l?void 0:null===(t=l.data)||void 0===t?void 0:t.myReminderdata}),{giftAssistant:q}=(0,y.p)(),B={maxAge:604800,path:"/",encode:decodeURIComponent},$={page_name:p.PN.HOME,page_type:p.PN.HOME,icon_name:null,icon_position:null},V=async()=>{H(await (0,h.Hl)())},J={page_name:"/",page_type:p.PN.HOME};(0,i.useEffect)(()=>{U&&(null==U?void 0:U.isShow)&&("false"===(0,S.le)(g.MW)||n?G(!1):G(!0))},[U,n]),(0,i.useEffect)(()=>{t!==g.od.INDIA&&V()},[]),(0,i.useEffect)(()=>{if(Array.isArray(T)){var e;let l=null==T?void 0:null===(e=T.filter(e=>t===(null==e?void 0:e.catelogID)))||void 0===e?void 0:e[0];x()(l)||D(l)}},[T]),(0,i.useEffect)(()=>{let e=e=>{e.preventDefault(),M(!1)};return window.addEventListener("popstate",e),()=>{window.removeEventListener("popstate",e)}},[]);let K=()=>{if(z){let e=new URL(window.location.href);e.searchParams.delete("promo"),e.hash="",window.history.replaceState(null,null,e.toString())}else window.history.pushState(null,null,"?promo=bottom_gifting_assistant#giftAssistant"),v(p.dR.giftFinderClicked,{from:"engati"},["clevertap"]);M(!z)},Q=()=>{G(!1),(0,S.D$)(g.MW,"false"),v(null===p.wt||void 0===p.wt?void 0:p.wt.REMINDER_NUDGE_CLOSED,{...J,is_nudge_closed:!0},["clevertap"])},X=[{id:"home",iconSrc:"/icons/fnp-gift-grey.svg",activeIconSrc:"/icons/fnp-gift.svg",text:"Home",url:"/?promo=bottom_home",onClick:()=>{W({home:!0,abroad:!1,allGifts:!1})}},{id:"allGifts",iconSrc:"/icons/gift-box.svg",activeIconSrc:"/icons/gift-box-active.svg",text:"All Gifts",url:"/allgifts?catalogId=".concat(t,"&promo=bottom_all_gifts")},{id:"myReminders",iconSrc:"/icons/CalendarStar.svg",activeIconSrc:"/icons/CalendarStar-active.svg",text:_.Bi,url:"/reminder"},{id:"abroad",iconSrc:"/icons/global.svg",activeIconSrc:"/icons/global-active.svg",text:"Abroad",onClick:()=>{W({home:!1,abroad:!0,allGifts:!1}),E(!0),v(p.dR.bottomNavigationNavIconClicked,{...$,icon_name:"Abroad",icon_position:4},["clevertap"])}},{id:"myAccount",iconSrc:"/icons/user-square.svg",activeIconSrc:"/icons/user-square-active.svg",text:"Account",url:"/account/my-account?promo=bottom_my_account"}],Y=e=>(null==e?void 0:e.id)!=="sameDay"||x()(t)||t===g.od.INDIA?(null==e?void 0:e.id)!=="home"||x()(t)||t===g.od.INDIA?null==e?void 0:e.url:"/".concat(t,"/gifts-lp?promo=bottom_home"):"/".concat(t).concat(null==e?void 0:e.url),ee=(e,t)=>{let l=R&&"myReminders"===e.id;return(0,o.jsx)("li",{className:"".concat(l?"relative z-50 rounded-b-[12px] bg-white-900":""," flex flex-1 flex-col items-center justify-center px-8 ").concat(P[e.id]?"before:absolute before:top-0 before:h-4 before:w-40 before:rounded-full before:bg-fnp-600":""),children:(0,o.jsx)("a",{...N,className:"w-full py-8",href:Y(e),onClick:()=>{"sameDay"===e.id&&I((0,m.Wp)(!0)),v(p.dR.bottomNavigationNavIconClicked,{...$,icon_name:e.text,icon_position:t+1},["clevertap"]),"myReminders"===e.id&&v(p.wt.REMINDER_PAGE_VIEWED,{...J,sources:"bottom navigation",user_type:F}
1,["clevertap"]),(0,S.D$)(g.MW,"false")},children:(0,o.jsx)(s.Z,{iconSrc:P[e.id]&&e.activeIconSrc||e.iconSrc,imgHeight:35,imgWidth:42,onClick:e.onClick,label:e.text,labelColor:P[e.id]?"w-full text-fnp-300 font-normal":"w-full text-grey-400 font-normal",labelTextSize:"text-10",classes:"flex flex-col items-center justify-center gap-2 w-full"})})},e.id)};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(d.default,{position:"bottom",isOpen:A,onDrawerClose:()=>{E(!A),W({home:!a,abroad:!1,allGifts:a,myReminders:n})},styles:"px-16 max-h-[80vh] ".concat(A?"pb-[40px]":"pb-0"),children:[L&&(0,o.jsx)(j.Z,{}),(0,o.jsx)(r.Z,{onCountryClick:e=>{D(e),Z(!0),"gifts"===e.countryCategoryID?window.location.href="/?promo=bottom_abroad":(null==e?void 0:e.catelogID)===g.od.SINGAPORE?window.location.href="".concat(g.jL.SINGAPORE.url,"?promo=bottom_abroad"):window.location.href="/".concat(e.countryCategoryID,"-lp?promo=bottom_abroad"),t!==e.catelogID&&(b.default.deleteCookie(w.Oc,B),b.default.deleteCookie(w.rA,B),b.default.deleteCookie(w.kz,B)),W({home:!a,abroad:!1,allGifts:a,myReminders:n})},selectedCountry:k,isShowCountryCode:!1,isSearchEnable:!0,title:g.Ou})]}),(0,o.jsxs)(d.default,{position:"bottom",isOpen:z,onDrawerClose:K,styles:"px-16 h-full pb-[40px]",isHideCloseBtn:!0,isDrawerCustomStyles:!1,children:[(0,o.jsxs)("div",{className:"-me-16 -ms-16 flex gap-12 border-b-1 border-lightGrey bg-white-900 px-16 py-12",onClick:K,children:[(0,o.jsx)(C.default,{src:"/icons/arrow-left-all-gifts.svg",alt:"chat back",width:24,height:24,sizes:"10vw",isPriority:!1}),(0,o.jsx)("span",{className:"text-16 font-600 capitalize leading-6 text-fnp-500",children:"Chat"})]}),(0,o.jsx)("iframe",{border:"0",src:g.OW,target:"_parent",height:"100%",name:"Gift Assitant",width:"100%",title:"Gift Assistant",className:"h-full w-full"})]}),(0,o.jsxs)("div",{className:"fixed bottom-0 left-0 ".concat(R?"z-50":"z-40"," w-full justify-center bg-white-900 shadow-top md:hidden ").concat(l),id:"sticky_bottom_menu",children:[R&&(0,o.jsx)(()=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:"z-45 fixed left-0 top-0 h-[calc(100vh-67px)] w-full bg-black-900/50",onClick:Q}),(0,o.jsxs)("div",{className:"z-45 absolute bottom-[67px] left-8 right-8 overflow-hidden rounded-[12px] bg-white-900 p-12",children:[(0,o.jsx)("button",{type:"button","aria-label":"Close My Relations",className:"absolute right-8 top-8 z-10",onClick:Q,children:(0,o.jsx)(C.default,{src:"/icons/drawer-close.svg",width:20,sizes:"20px",height:20,alt:"close icon"})}),(0,o.jsxs)("div",{className:"flex items-center items-center justify-center gap-8",children:[(0,o.jsx)("div",{className:"flex h-[60px] w-[60px] overflow-hidden rounded-[10px] bg-[#e8f5e9]",children:(0,o.jsx)(C.default,{src:null==U?void 0:U.iconsUrl,width:60,height:60,alt:null==U?void 0:U.heading,sizes:"60px",isPriority:!1})}),(0,o.jsxs)("div",{className:"flex flex-1 flex-col gap-8",children:[(0,o.jsx)("span",{className:"text-16 font-600 leading-[16px] text-fnp-500",children:null==U?void 0:U.heading}),(0,o.jsx)("span",{className:"text-12 font-400 leading-[16px] text-fnp-500",children:null==U?void 0:U.content})]})]})]})]}),{}),(0,o.jsxs)("ul",{className:"relative flex w-full justify-between",children:[R&&(0,o.jsx)("div",{className:"absolute left-0 top-0 z-50 h-[67px] w-full bg-black-900/50"}),X.map((e,l)=>{if("giftAssistant"!==e.id||"true"===q&&("true"!==q||t===g.od.INDIA))return(null==e?void 0:e.url)?"sameDay"!==e.id?ee(e,l):t===g.od.INDIA||O.includes(t)||!O.length?ee(e,l):null:(0,o.jsx)("li",{className:"flex flex-1 flex-col items-center justify-center",children:(0,o.jsx)(s.Z,{iconSrc:P[e.id]&&e.activeIconSrc||e.iconSrc,imgHeight:35,imgWidth:42,onClick:e.onClick,label:e.text,labelColor:P[e.id]?"w-full text-fnp-300 font-normal":"w-full text-grey-400 font-normal",labelTextSize:"text-10",classes:"py-8 flex flex-col items-center justify-center gap-2 w-full"})},l)})]})]})]})};I.propTypes={catalogId:n().string,parentClass:n().string,isAllGiftActive:n().bool,isMyRelationsActive:n().bool};var k=I}}]); 2//# sourceMappingURL=4850-cbeeb9430ca06f62.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.