"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4202],{23140:(e,o,t)=>{t.d(o,{S:()=>s});var l=t(1992),i=t(64907),r=t(60398);let n=async e=>{let{data:o}=await r.A.post("".concat(i.QL,"?store_id=").concat(e));return o},s=()=>(0,l.useMutation)("delete_wishlist",n)},29367:(e,o,t)=>{t.d(o,{A:()=>p});var l=t(37876);t(14232);var i=t(82179),r=t(74441),n=t(66703),s=t(35003),a=t(82);let d=e=>{let{borderRadius:o}=e,{t}=(0,a.Bd)(),d=(0,n.A)();return(0,l.jsx)(i.A,{sx:{position:"absolute",bottom:0,left:0,width:"100%",background:e=>(0,r.X4)(e.palette.primary.overLay,.7),color:e=>e.palette.neutral[100],padding:"10px",height:"100%",alignItems:"center",justifyContent:"center",borderRadius:o||".5rem"},children:(0,l.jsx)(s.A,{align:"center",color:"dark"===d.palette.mode?d.palette.neutral[1e3]:d.palette.neutral[100],fontWeight:"600",fontSize:"12px",children:t("CLOSED NOW")})})};d.propTypes={};let p=d},54202:(e,o,t)=>{t.d(o,{A:()=>B});var l=t(37876),i=t(35268),r=t(74441),n=t(38388),s=t(71733),a=t(7227),d=t(35003),p=t(23140),x=t(65276),c=t(10602);t(97914);var u=t(89099),h=t(14232),v=t(97685),m=t(82),g=t(74695),f=t(65269),b=t(74748),j=t(64660),A=t(28343);t(50106);var y=t(89890),w=t(62139),k=t(67347),S=t(59053),_=t(37571),z=t(4012),C=t(83517),W=t(26101),R=t(6781),F=t(79247),T=t(66703);let I=(0,i.Ay)(A.jB)(e=>{let{theme:o}=e;return{backgroundColor:o.palette.background.paper,padding:"0",border:"1px solid ".concat((0,r.X4)(o.palette.neutral[400],.15)),borderRadius:"14px",cursor:"pointer",overflow:"hidden",transition:"all 0.3s ease",boxShadow:"0 2px 8px ".concat((0,r.X4)(o.palette.common.black,.06)),".store-name-text":{transition:"color 0.2s ease"},"&:hover":{border:"1px solid ".concat((0,r.X4)(o.palette.primary.main,.35)),boxShadow:"0 8px 24px ".concat((0,r.X4)(o.palette.primary.main,.15)),transform:"translateY(-2px)",img:{transform:"scale(1.06)"},".store-name-text":{color:o.palette.primary.main}}}}),E=(0,i.Ay)(n.A)(e=>{let{theme:o}=e;return{position:"relative",width:"100%",height:"150px",overflow:"hidden",borderTopLeftRadius:"14px",borderTopRightRadius:"14px",img:{width:"100%",height:"100%",transition:"transform 0.4s ease"},[o.breakpoints.down("sm")]:{height:"130px"}}}),L=(0,i.Ay)(n.A)({position:"absolute",bottom:0,left:0,right:0,height:"60px",background:"linear-gradient(to top, rgba(0,0,0,0.45) 0%, transparent 100%)",zIndex:1,pointerEvents:"none"}),X=(0,i.Ay)(n.A)(e=>{let{theme:o}=e;return{position:"absolute",top:"10px",left:"10px",zIndex:3,display:"flex",alignItems:"center",gap:"4px",backgroundColor:"rgba(255,255,255,0.88)",backdropFilter:"blur(6px)",borderRadius:"20px",padding:"3px 8px",fontSize:"11px",fontWeight:600,color:o.palette.primary.main,boxShadow:"0 1px 4px rgba(0,0,0,0.15)"}}),H=(0,i.Ay)(s.A)(e=>{let{theme:o,isWishlisted:t}=e;return{position:"absolute",top:"8px",right:"8px",zIndex:3,width:"30px",height:"30px",backgroundColor:"rgba(255,255,255,0.88)",backdropFilter:"blur(6px)",boxShadow:"0 1px 4px rgba(0,0,0,0.15)",color:t?o.palette.error.main:o.palette.neutral[500],"&:hover":{backgroundColor:"rgba(255,255,255,1)",color:o.palette.error.main}}}),N=(0,i.Ay)(n.A)(e=>{let{theme:o}=e;return{position:"absolute",bottom:"-18px",left:"14px",zIndex:4,width:"44px",height:"44px",borderRadius:"10px",overflow:"hidden",border:"2px solid ".concat(o.palette.background.paper),boxShadow:"0 2px 8px ".concat((0,r.X4)(o.palette.common.black,.2)),backgroundColor:o.palette.background.paper,flexShrink:0,img:{width:"100%",height:"100%",objectFit:"cover",transform:"none !important"}}}),P=(0,i.Ay)(n.A)(e=>{let{theme:o}=e;return{padding:"22px 14px 14px 14px",width:"100%"}}),M=(0,i.Ay)(n.A)({display:"flex",alignItems:"center",gap:"5px",marginTop:"6px"}),Q=e=>{var o,t,i;let s=(0,f.D)(),{item:A,imageUrl:Q,topoffer:B}=e,[D,O]=(0,h.useState)(!1),{wishLists:q}=(0,g.d4)(e=>e.wishList),[V,Y]=(0,h.useState)(!1),{mutate:G}=(0,p.S)(),{mutate:J}=(0,x.P)(),{t:K}=(0,m.Bd)(),U=(0,g.wA)(),Z=(0,u.useRouter)(),$=(0,T.A)(),{ref:ee,isEllipsed:eo}=(0,z.A)(null==A?void 0:A.name),{ref:et,isEllipsed:el}=(0,z.A)(null==A?void 0:A.name);(0,h.useEffect)(()=>{ei()},[q]);let ei=()=>{var e;(null==q||null==(e=q.store)?void 0:e.find(e=>e.id===(null==A?void 0:A.id)))?Y(!0):Y(!1)},er=()=>{},en=e=>{e.stopPropagation(),localStorage.getItem("token")?G(null==A?void 0:A.id,{onSuccess:e=>{e&&(U((0,j.wz)(A)),Y(!0),v.Ay.success(null==e?void 0:e.message))},onError:e=>{v.Ay.error(e.response.data.message)}}):v.Ay.error(K(b.F))},es=e=>{e.stopPropagation(),J(null==A?void 0:A.id,{onSuccess:e=>{U((0,j.Rz)(null==A?void 0:A.id)),Y(!1),v.Ay.success(e.message,{id:"wishlist"})},onError:e=>{v.Ay.error(e.response.data.message)}})},ea=e=>{e.stopPropagation(),V?es(e):en(e)},ed=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(E,{children:[(0,l.jsx)(_.A,{alt:null==A?void 0:A.name,src:Q,height:150,width:260,objectFit:"cover"}),(0,l.jsx)(L,{}),(null==A?void 0:A.distance)!==void 0&&(null==A?void 0:A.distance)!==null&&(0,l.jsxs)(X,{children:[(0,l.jsx)(C.A,{size:10}),(0,l.jsxs)("span",{children:[(null==A?void 0:A.distance)===0?"0km":"".concat(parseFloat(null==A?void 0:A.distance).toFixed(1),"km")," ",K("From You")]})]}),(0,l.jsx)(H,{isWishlisted:+!!V,onClick:ea,size:"small",children:(0,l.jsx)(W.A,{size:14,fill:V?"currentColor":"none",strokeWidth:2})}),(null==A?void 0:A.logo_full_url)&&(0,l.jsx)(N,{children:(0,l.jsx)(_.A,{src:null==A?void 0:A.logo_full_url,alt:null==A?void 0:A.name,height:44,width:44,objectFit:"cover"})}),(0,l.jsx)(S.A,{active:null==A?void 0:A.active,open:null==A?void 0:A.open,borderRadius:"0"}),(0,l.jsx)(y.Q,{hover:D,border_radius:"0px",children:(0,l.jsx)(w.Ay,{quickViewHandleClick:er,isTransformed:D,isWishlisted:V,addToWishlistHandler:en,removeFromWishlistHandler:es,noQuickview:!0})})]}),(0,l.jsxs)(P,{children:[(0,l.jsxs)(n.A,{sx:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"6px"},children:[(0,l.jsx)(a.A,{title:(null==A?void 0:A.name)||"",placement:"bottom",arrow:!0,disableHoverListener:!el,componentsProps:{tooltip:{sx:{bgcolor:e=>e.palette.toolTipColor,"& .MuiTooltip-arrow":{color:e=>e.palette.toolTipColor}}}},children:(0,l.jsx)(d.A,{ref:et,className:"".concat(s.singleLineEllipsis," store-name-text"),fontWeight:"700",fontSize:{xs:"13px",md:"14px"},component:"h3",sx:{flex:1,minWidth:0},children:null==A?void 0:A.name})}),(null==A?void 0:A.avg_rating)>0&&(0,l.jsxs)(n.A,{sx:{display:"flex",alignItems:"center",gap:"2px",flexShrink:0,backgroundColor:e=>(0,r.X4)(e.palette.warning.main,.1),borderRadius:"6px",px:"6px",py:"2px"},children:[(0,l.jsx)(k.A,{sx:{fontSize:"12px",color:"warning.main"}}),(0,l.jsx)(d.A,{sx:{fontSize:"11px",fontWeight:600,color:"warning.dark"},children:null==A?void 0:A.avg_rating})]})]}),(null==A?void 0:A.address)&&(0,l.jsxs)(M,{children:[(0,l.jsx)(R.A,{size:12,color:$.palette.text.disabled,style:{flexShrink:0}}),(0,l.jsx)(d.A,{sx:{fontSize:"11px",color:"text.secondary",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1,minWidth:0},children:null==A?void 0:A.address})]}),((null==A?void 0:A.delivery_time)||(null==A?void 0:A.free_delivery))&&(0,l.jsxs)(M,{children:[(0,l.jsx)(F.A,{size:12,color:$.palette.text.disabled,style:{flexShrink:0}}),(0,l.jsxs)(d.A,{sx:{fontSize:"11px",color:"text.secondary"},children:[null==A?void 0:A.delivery_time,(null==A?void 0:A.free_delivery)&&(0,l.jsx)(n.A,{component:"span",sx:{ml:"6px",px:"6px",py:"1px",borderRadius:"10px",fontSize:"10px",fontWeight:600,backgroundColor:e=>(0,r.X4)(e.palette.success.main,.1),color:"success.dark"},children:K("Free Delivery")})]})]})]})]}),ep=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(E,{children:[(0,l.jsx)(_.A,{alt:null==A?void 0:A.name,src:Q,height:150,width:260,objectFit:"cover"}),(0,l.jsx)(L,{}),(null==A||null==(o=A.discount)?void 0:o.discount)&&(0,l.jsxs)(n.A,{sx:{position:"absolute",top:"10px",left:"10px",zIndex:3,backgroundColor:"primary.main",color:"white",borderRadius:"20px",px:"8px",py:"3px",fontSize:"11px",fontWeight:700},children:[null==A||null==(t=A.discount)?void 0:t.discount,(null==A||null==(i=A.discount)?void 0:i.discount_type)&&"%"," ",K("off")]}),(0,l.jsx)(H,{isWishlisted:+!!V,onClick:ea,size:"small",children:(0,l.jsx)(W.A,{size:14,fill:V?"currentColor":"none",strokeWidth:2})}),(null==A?void 0:A.logo_full_url)&&(0,l.jsx)(N,{children:(0,l.jsx)(_.A,{src:null==A?void 0:A.logo_full_url,alt:null==A?void 0:A.name,height:44,width:44,objectFit:"cover"})}),(0,l.jsx)(S.A,{active:null==A?void 0:A.active,open:null==A?void 0:A.open,borderRadius:"0"}),(0,l.jsx)(y.Q,{hover:D,border_radius:"0px",children:(0,l.jsx)(w.Ay,{quickViewHandleClick:er,isTransformed:D,isWishlisted:V,addToWishlistHandler:en,removeFromWishlistHandler:es,noQuickview:!0})})]}),(0,l.jsxs)(P,{children:[(0,l.jsxs)(n.A,{sx:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"6px"},children:[(0,l.jsx)(a.A,{title:(null==A?void 0:A.name)||"",arrow:!0,placement:"bottom",disableHoverListener:!eo,componentsProps:{tooltip:{sx:{bgcolor:e=>e.palette.toolTipColor,"& .MuiTooltip-arrow":{color:e=>e.palette.toolTipColor}}}},children:(0,l.jsx)(d.A,{ref:ee,className:"store-name-text",sx:{fontWeight:700,fontSize:{xs:"13px",sm:"14px"},overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1,minWidth:0},component:"h3",children:null==A?void 0:A.name})}),(null==A?void 0:A.avg_rating)>0&&(0,l.jsxs)(n.A,{sx:{display:"flex",alignItems:"center",gap:"2px",flexShrink:0,backgroundColor:e=>(0,r.X4)(e.palette.warning.main,.1),borderRadius:"6px",px:"6px",py:"2px"},children:[(0,l.jsx)(k.A,{sx:{fontSize:"12px",color:"warning.main"}}),(0,l.jsx)(d.A,{sx:{fontSize:"11px",fontWeight:600,color:"warning.dark"},children:null==A?void 0:A.avg_rating})]})]}),((null==A?void 0:A.delivery_time)||(null==A?void 0:A.free_delivery))&&(0,l.jsxs)(M,{children:[(0,l.jsx)(F.A,{size:12,color:$.palette.text.disabled,style:{flexShrink:0}}),(0,l.jsxs)(d.A,{sx:{fontSize:"11px",color:"text.secondary"},children:[null==A?void 0:A.delivery_time,(null==A?void 0:A.free_delivery)&&(0,l.jsx)(n.A,{component:"span",sx:{ml:"6px",px:"6px",py:"1px",borderRadius:"10px",fontSize:"10px",fontWeight:600,backgroundColor:e=>(0,r.X4)(e.palette.success.main,.1),color:"success.dark"},children:K("Free Delivery")})]})]})]})]});return(0,l.jsx)(I,{onMouseEnter:()=>O(!0),onMouseLeave:()=>O(!1),onClick:()=>{Z.push({pathname:"rental"===(0,c.c)()?"/rental/provider-details/".concat(null==A?void 0:A.id):"/store/[id]",query:{id:"".concat((null==A?void 0:A.slug)?null==A?void 0:A.slug:null==A?void 0:A.id),module_id:"".concat(null==A?void 0:A.module_id),module_type:(0,c.c)(),store_zone_id:"".concat(null==A?void 0:A.zone_id),distance:null==A?void 0:A.distance}})},children:B?ep:ed})};Q.propTypes={};let B=Q},59053:(e,o,t)=>{t.d(o,{A:()=>p});var l=t(37876);t(14232);var i=t(82),r=t(82179),n=t(66703),s=t(35003),a=t(29367);let d=e=>{let{active:o,open:t,borderRadius:d}=e,{t:p}=(0,i.Bd)(),x=(0,n.A)();return o?0===t?(0,l.jsx)(a.A,{borderRadius:d}):void 0:(0,l.jsx)(r.A,{sx:{position:"absolute",bottom:0,left:0,width:"100%",background:e=>e.palette.primary.overLay,opacity:"0.5",color:e=>e.palette.neutral[100],padding:"10px",height:"100%",alignItems:"center",justifyContent:"center",borderRadius:d||"8px"},children:(0,l.jsx)(s.A,{align:"center",color:x.palette.neutral[100],sx:{fontSize:"10px"},children:p("Closed Now")})})};d.propTypes={};let p=d}}]);