1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7738],{7738:function(e,t,l){l.r(t),l.d(t,{adminFeesHelpAtom:function(){return B},cartItemsAtom:function(){return k},default:function(){return C}});var r=l(16835),n=l(35944),a=[{name:"APPEALS",href:"/appeals"},{name:"VOLUNTEER WITH US",href:"/volunteer-with-us"},{name:"ABOUT US",href:"/about-us"},{name:(0,n.tZ)("div",{children:"CHARITY: EXPLAINED"}),href:"/charity-explained"},{name:(0,n.tZ)("div",{children:"ZAKAT CALCULATOR"}),href:"/zakat-calculator"},{name:"OUR BLOG",href:"/our-blog"},{name:"GALLERY",href:"/gallery"},{name:"PRODUCTS",href:"/products"}],i=l(16054),c=l(2682),o=l(44492),s=l(47454),d=l(11868),h=l(17108),m=l(54642),u=l(48583),f=l(95495),g=l(5152),p=l.n(g),b=l(89755),v=l.n(b),x=l(41664),Z=l.n(x),y=l(67294),N=l(37392),w=l(11163),S=p()(function(){return Promise.all([l.e(9943),l.e(2961),l.e(5951),l.e(8675),l.e(5456)]).then(l.bind(l,88675))},{loadableGenerated:{webpack:function(){return[88675]}}}),k=(0,f.O4)("cartItems",[]),B=(0,f.O4)("adminFeesHelp",{included:!1,agreedAmount:0}),C=function(){var e=y.useState(!1),t=(0,r.Z)(e,2),l=t[0],f=t[1],g=function(){f(!l)},p=y.useState(!1),b=(0,r.Z)(p,2),x=b[0],B=b[1],C=(0,u.KO)(k),X=(0,r.Z)(C,2),_=X[0];X[1];var A=(0,u.KO)(N.LF),I=(0,r.Z)(A,2),O=I[0],L=I[1];console.log("cartItems in header",_);var D=(0,w.useRouter)();(0,y.useEffect)(function(){L((0,N.PR)())},[]);var R=function(){(0,N.kS)(),L(null),D.push("/")};return(0,n.tZ)("div",{className:"z-50",children:(0,n.BX)("div",{className:"fixed w-full z-50",id:"header",children:[(0,n.tZ)("div",{className:"bg-primary py-2",children:(0,n.BX)("div",{className:"md:px-20 mx-auto flex flex-col lg:flex-row md:gap-5 items-center justify-between",children:[(0,n.BX)("div",{className:"flex sm:flex-row flex-col gap-1 md:gap-6 text-black",children:[(0,n.BX)("div",{className:"md:flex hidden md:items-start md:justify-start items-center justify-center gap-1 md:gap-2",children:[(0,n.tZ)(o.Z,{}),(0,n.tZ)("a",{href:"mailto:".concat(i.S.compnay_email),children:i.S.compnay_email})]}),(0,n.BX)("div",{className:"md:flex hidden md:items-start md:justify-start items-center justify-center gap-1",children:[(0,n.tZ)(d.Z,{}),(0,n.tZ)("a",{href:"tel:".concat(i.S.tel_number),children:i.S.tel_number})]})]}),(0,n.BX)("div",{className:"flex gap-5 items-center",children:[O?(0,n.BX)("div",{className:"flex items-center gap-3",children:[(0,n.tZ)(Z(),{href:"/customer-portal",legacyBehavior:!0,children:(0,n.tZ)("span",{className:"text-black font-semibold cursor-pointer hover:underline",children:O.first_name||O.email})}),(0,n.tZ)("button",{onClick:R,className:"text-black hover:underline text-sm",children:"Logout"})]}):(0,n.BX)("div",{className:"flex items-center gap-3",children:[(0,n.tZ)(Z(),{href:"/login",legacyBehavior:!0,children:(0,n.tZ)("button",{className:"text-black hover:underline font-semibold",children:"Login"})}),(0,n.tZ)(Z(),{href:"/sign-up",legacyBehavior:!0,children:(0,n.tZ)("button",{className:"text-black hover:underline font-semibold",children:"Sign Up"})})]}),(0,n.BX)("div",{className:"cursor-pointer pr-4 relative",onClick:function(){B(!0)},children:[(0,n.tZ)(h.Z,{className:"text-black text-3xl md:text-4xl"}),_.length>0&&(0,n.tZ)("div",{className:"absolute top-0 right-2 bg-white rounded-full text-black text-[14px] font-semibold px-[4px]",children:_.length})]})]})]})}),(0,n.BX)("div",{className:"bg-black w-full z-10 md:px-20 py-2 xl:py-0 flex items-center justify-between ",children:[(0,n.tZ)("div",{onClick:function(){f(!l)},className:"lg:hidden block bg-secondary py-5 ",children:(0,n.tZ)(s.Z,{className:"text-white text-4xl"})}),(0,n.tZ)("div",{className:"",children:(0,n.tZ)(Z(),{href:"/",children:(0,n.tZ)(v(),{src:i.S.logo_url,alt:i.S.logo_alt,width:i.S.width,height:i.S.height})})}),(0,n.BX)("div",{className:"lg:flex hidden lg:flex-1 lg:min-w-0 lg:items-start lg:justify-between lg:gap-6 py-6 lg:ml-6",children:[(0,n.tZ)("div",{className:"flex items-center flex-wrap gap-x-4 gap-y-2 text-white hover:text-white/50 transition-all",children:a.map(function(e,t){return(0,n.tZ)("div",{className:"whitespace-nowrap text-md",children:(0,n.tZ)(Z(),{href:e.href,className:"hover:text-primary transition-all",children:e.name})},t)})}),(0,n.BX)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,n.tZ)(Z(),{href:"/gift-card",legacyBehavior:!0,children:(0,n.tZ)("button",{className:"bg-primary text-black hover:bg-white/50 transition-all py-2 px-2 rounded font-semibold",children:"GIFT CARD"})}),(0,n.tZ)(Z(),{href:"/",legacyBehavior:!0,children:(0,n.tZ)("button",{className:"bg-primary text-black hover:bg-white/50 transition-all px-3 py-2 rounded font-semibold",children:"DONATE"})}),O?(0,n.tZ)(Z(),{href:"/customer-portal",legacyBehavior:!0,children:(0,n.tZ)("button",{className:"bg-primary text-black hover:bg-white/50 transition-all px-3 py-2 rounded font-semibold",children:"Dashboard"})}):(0,n.tZ)(n.HY,{})]})]}),(0,n.tZ)(m.ZP,{anchor:"left",open:l,onClose:g,children:(0,n.BX)("div",{className:"bg-black h-full overflow-scroll w-[80vw] md:w-[50vw] px-5 md:px-20 py-10",children:[(0,n.BX)("div",{className:"",children:[(0,n.tZ)(Z(),{href:"/",children:(0,n.tZ)(v(),{src:i.S.logo_url,alt:i.S.logo_alt,width:i.S.width,height:i.S.height})}),(0,n.tZ)(c.Z,{className:"absolute top-5 right-5 text-white cursor-pointer",onClick:g})]}),(0,n.BX)("div",{className:"mt-10 space-y-7",children:[a.map(function(e,t){return(0,n.tZ)("div",{children:(0,n.tZ)("div",{children:(0,n.tZ)(Z(),{href:e.href,onClick:function(){f(!1)},className:"text-white transition-all text-lg font-semibold",children:e.name})})},t)}),(0,n.BX)("div",{className:"space-y-4",children:[(0,n.tZ)(Z(),{href:"/gift-card",legacyBehavior:!0,children:(0,n.tZ)("button",{onClick:function(){return f(!1)},className:"bg-primary text-white hover:bg-white/50 transition-all py-2 px-2 rounded font-semibold",children:"GIFT CARD"})}),O?(0,n.BX)(n.HY,{children:[(0,n.tZ)(Z(),{href:"/customer-portal",legacyBehavior:!0,children:(0,n.tZ)("button",{onClick:function(){return f(!1)},className:"bg-primary text-white hover:bg-white/50 transition-all py-2 px-2 rounded font-semibold block w-full",children:"Dashboard"})}),(0,n.tZ)("button",{onClick:function(){R(),f(!1)},className:"bg-primary text-white hover:bg-white/50 transition-all py-2 px-2 rounded font-semibold block w-full",children:"Logout"})]}):(0,n.BX)(n.HY,{children:[(0,n.tZ)(Z(),{href:"/login",legacyBehavior:!0,children:(0,n.tZ)("button",{onClick:function(){return f(!1)},className:"bg-primary text-white hover:bg-white/50 transition-all py-2 px-2 rounded font-semibold block w-full",children:"Login"})}),(0,n.tZ)(Z(),{href:"/sign-up",legacyBehavior:!0,children:(0,n.tZ)("button",{onClick:function(){return f(!1)},className:"bg-primary text-white hover:bg-white/50 transition-all py-2 px-2 rounded font-semibold block w-full",children:"Sign Up"})}),(0,n.BX)("div",{className:" items-center justify-center gap-1 md:gap-2 text-white ",children:[(0,n.tZ)(o.Z,{}),(0,n.tZ)("a",{href:"mailto:".concat(i.S.compnay_email),children:i.S.compnay_email})]}),(0,n.BX)("div",{className:"items-center justify-center gap-1 md:gap-2 text-white",children:[(0,n.tZ)(d.Z,{}),(0,n.tZ)("a",{href:"tel:".concat(i.S.tel_number),children:i.S.tel_number})]})]})]})]})]})}),(0,n.tZ)(S,{CartState:x,setCartState:B})]})]})})}},37392:function(e,t,l){l.d(t,{LF:function(){return r},PR:function(){return n},av:function(){return i},is:function(){return a},kS:function(){return c}});var r=(0,l(95495).O4)("user",null),n=function(){var e=localStorage.getItem("user");if(!e||"null"===e)return null;try{return JSON.parse(e)}catch(e){return null}},a=function(){var e=localStorage.getItem("userData");if(!e||"null"===e)return null;try{return JSON.parse(e)}catch(e){return null}},i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(e){localStorage.setItem("user",JSON.stringify(e));var l=t||e,r={firstName:l.firstName||l.first_name||"",lastName:l.lastName||l.last_name||"",email:l.email||"",phone:l.phone||"",address:l.address||"",city:l.city||"",country:l.country||"",postcode:l.postcode||""};localStorage.setItem("userData",JSON.stringify(r))}else localStorage.removeItem("user"),localStorage.removeItem("userData")},c=function(){localStorage.removeItem("user"),localStorage.removeItem("userData")}}}]);
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.