1"use strict";(self.webpackChunkdealberg_customer_portal=self.webpackChunkdealberg_customer_portal||[]).push([[5249],{1333:function(e,t,a){a.d(t,{U:function(){return c}});var n=a(4506);function c(e){const t={};for(const r of e){var a,c;const e=null!==(a=r.image)&&void 0!==a?a:"",o=null!==(c=r.images)&&void 0!==c?c:[];t[r.id]=[e].concat((0,n.A)(o))}return t}},5249:function(e,t,a){a.r(t);var n=a(4794),c=a(6540),r=a(1083),o=a(1372),i=a(4524),l=a(5281),s=a(9671),d=a(5327),u=a(1333);t.default=()=>{const{addSingleProductToCheckoutCart:e}=(0,i.A)(),{clearFilters:t}=(0,l.A)(),{0:a,1:m}=(0,c.useState)([]),{0:p,1:v}=(0,c.useState)(!1),g=(0,c.useMemo)(()=>(0,u.U)(a),[a]);(0,c.useEffect)(()=>{r.A.post(`${o.pc}/products/generic-get-all?page=0&size=10`,{subCategory:[277]}).then(e=>{var t;return m((null===(t=e.data)||void 0===t?void 0:t.result)||[])}).catch(e=>console.error("Failed to fetch gift voucher products:",e))},[]);const f=a.slice(0,10);return c.createElement("div",{id:"popular_products_comp"},c.createElement("div",{className:"product_section"},f.length>0?f.map(t=>{var a;return c.createElement(d.A,{key:`gift_voucher_card_${t.id}`,id:t.id,name:t.name.toUpperCase(),dimensions:(null!==(a=t.specification)&&void 0!==a?a:"").slice(0,16),description:t.description,mrp:t.displayMrp,images:g[t.id]||t.images||[],price:t.basePrice,taxRate:t.taxRate,piecePerPack:t.minProductQuantityPerPack,onClick:()=>{return e=t.id,void(0,n.navigate)(`/products/${e}`);var e},onAddToCart:()=>function(t){v(!0),e(t)}(t)})}):c.createElement("p",null,"No gift voucher products available.")),c.createElement(s.A,{open:p,onClose:()=>v(!1)}))}},5327:function(e,t,a){a.d(t,{A:function(){return i}});var n=a(6540),c=a(9406),r=a(3);const o={default:{scale:1},hover:{scale:1.02,transition:{duration:.3,ease:"easeOut"}}},i=e=>{var t,a;let{id:i,name:l,images:s,dimensions:d,price:u,taxRate:m,description:p,mrp:v,variations:g=[],piecePerPack:f=1,onAddToCart:E,onClick:N,...h}=e;const{0:k,1:_}=(0,n.useState)(0),{0:C,1:P}=(0,n.useState)(null);return n.createElement(c.P.div,Object.assign({className:"storybook-product_card-modern",onMouseEnter:function(){if(!s||s.length<=1)return;const e=setInterval(()=>{_(e=>e===s.length-1?0:e+1)},1e3);P(e)},onMouseLeave:function(){C&&(clearInterval(C),P(null),_(0))},initial:"default",whileHover:"hover",variants:o,onClick:N},h),n.createElement("div",{className:"card-image-container"},n.createElement("img",{key:`product_img_${k}`,className:"product_img active",src:null!==(t=null!==(a=null==s?void 0:s[k])&&void 0!==a?a:null==s?void 0:s[0])&&void 0!==t?t:"",alt:l,loading:"lazy"})),n.createElement("div",{className:"product_details-modern"},n.createElement("div",{className:"content-stack"},n.createElement("h3",{className:"product-title"},l),n.createElement("p",{className:"product-description"},p||d||""),n.createElement("div",{className:"pricing-row"},n.createElement("span",{className:"current-price"},"â¹",u.toLocaleString("en-IN")),v&&v>u&&n.createElement("span",{className:"original-mrp"},"â¹",v.toLocaleString("en-IN"))),n.createElement("div",{className:"tax-and-meta"},n.createElement("span",{className:"tax-label"},"+",m,"% GST"),f>1&&n.createElement("span",{className:"pack-size"},"⢠",f," Pcs/Pack"))),n.createElement("button",{className:"add-to-cart-btn-modern",onClick:function(e){e.stopPropagation(),E&&E()}},n.createElement(r.iHs,{className:"cart-icon"}),n.createElement("span",null,"Add to Cart"))))};t.h=i}}]); 2//# sourceMappingURL=5249-9f5bfddb448bbad429ca.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.