!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="c4f7fdd6-d210-4120-a111-1acd77ef0f89",e._sentryDebugIdIdentifier="sentry-dbid-c4f7fdd6-d210-4120-a111-1acd77ef0f89")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5338],{70138:function(e,t,l){l.r(t);var a=l(57437),s=l(2265),r=l(51367),n=l(51171);t.default=e=>{var t;let{name:l,url:i,imageUrlSize:x="",image_url:o,image_alt:m,show_price:c,onClick:d,stock_type:f,discount_percent:h,compare_at_price:u,isSpecial:g,special_offer_end:p,outerClassName:b,price:w,other_images:j}=e,[N,v]=(0,s.useState)(!1),y=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"relative w-full",onMouseEnter:()=>{j&&j.length>0&&v(!0)},onMouseLeave:()=>{v(!1)},children:[!N&&(0,a.jsx)("img",{src:(null==o?void 0:o.endsWith(".gif"))?o:o+x,className:(0,r.m6)("aspect-[0.8]  w-full border opacity-100 flex-grow mdx:border rounded-lg object-cover",N?"opacity-50 absolute top-0":""),width:250,height:312,alt:m}),j&&j.length>0?(0,a.jsx)("img",{className:(0,r.m6)("aspect-[0.8]  w-full top-0 opacity-50 -z-10 absolute transition duration-300 border flex-grow mdx:border rounded-lg object-cover",N?"opacity-100 static z-0":""),width:250,src:(null===(t=j[0].image_url)||void 0===t?void 0:t.endsWith(".gif"))?j[0].image_url:j[0].image_url+x,height:312,alt:j[0].image_alt}):null,N&&j&&j.length>1?(0,a.jsxs)("div",{className:"flex items-center flex-row absolute z-10 bottom-10 w-full justify-center gap-x-2",children:[[{image_url:o,image_alt:m},...j.slice(1,4)].map((e,t)=>{var l;return(0,a.jsx)("img",{className:(0,r.m6)("w-12 h-12 object-cover border rounded-sm"),width:100,src:(null===(l=e.image_url)||void 0===l?void 0:l.endsWith(".gif"))?e.image_url:e.image_url+"?size=100x100&rs=fit",height:100,alt:e.image_alt},t)})," "]}):null,h?(0,a.jsxs)("div",{className:"md:rounded-r-full mdx:rounded-full transition duration-300 mdx:px-1 mdx:py-[1px] left-2 md:left-0  top-4 absolute font-semibold text-xs md:text-base text-white bg-banimode-orange md:pl-6 md:py-2 md:pr-3",children:[" ",h,"%"]}):null,"out_of_stock"===f?(0,a.jsx)("div",{className:"text-white md:text-sm rounded-lg absolute -translate-x-1/2 bottom-2 text-xs bg-black border px-1 left-1/2",children:"ناموجود"}):null]}),(0,a.jsxs)("div",{className:"flex w-full justify-between flex-row gap-2 md:h-4 font-light",children:[u?(0,a.jsx)("span",{className:(0,r.m6)("sm:text-center font-semibold flex-grow-0 w-auto flex-shrink text-banimode-gray-dark text-right truncate mdx:hidden md:text-[16px]"),children:""}):null,u&&"out_of_stock"!==f?(0,a.jsxs)("span",{className:"text-banimode-gray-dark text-xs mdx:hidden line-through",children:[" ",Number(u)?Number(u).toLocaleString():u," ","تومان"]}):null]}),(0,a.jsxs)("div",{className:"flex w-full h-full justify-between flex-col  mdx:px-1 md:flex-row gap-1 font-light",children:[(0,a.jsx)("span",{className:(0,r.m6)("sm:text-center flex-grow-0 w-auto flex-shrink text-banimode-gray-dark text-right md:truncate text-[10px] mdx:leading-4 md:text-[13px]"),children:l}),(0,a.jsxs)("div",{className:"flex flex-row mdx:text-xs",children:[u&&"out_of_stock"!==f?(0,a.jsxs)("span",{className:"md:text-banimode-gray-dark text-[10px] ml-1 text-banimode-gray-medium md:hidden line-through",children:[" ",Number(u)?Number(u).toLocaleString():u," "]}):null,"out_of_stock"!==f&&c?(0,a.jsxs)("p",{className:"md:text-banimode-green mdx:font-semibold font-medium  text-left w-fit whitespace-nowrap",children:[Number(w)?Number(w).toLocaleString():w," ",(0,a.jsx)("span",{className:"mdx:hidden",children:" تومان "}),(0,a.jsx)("img",{src:"/icons/toman-icon.svg",className:"inline-block md:hidden"})]}):"call"===f?(0,a.jsx)("span",{className:"text-banimode-green text-left w-fit whitespace-nowrap",children:"تماس بگیرید"}):null]})]})]});return d?(0,a.jsx)("div",{onClick:()=>{d(i)},className:(0,r.m6)("rounded-lg  flex items-center flex-col sm:gap-4 gap-2 pb-1 bg-white md:p-4 max-w-full sm:max-h-[auto] overflow-y-hidden max-h-max",b),children:y}):(0,a.jsx)(n.default,{target:"_blank",href:i,className:(0,r.m6)("rounded-lg flex items-center flex-col md:p-4 gap-y-1 md:gap-y-[10px] pb-1 bg-white",b),children:y})}},85338:function(e,t,l){l.d(t,{Z:function(){return f}});var a=l(57437);l(2265);var s=l(51367),r=l(69036),n=l(51171),i=e=>{let{name:t,url:l,imageUrlSize:i="",image_url:x,image_alt:o,show_price:m,onClick:c,stock_type:d,discount_percent:f,compare_at_price:h,isSpecial:u,special_offer_end:g,outerClassName:p,price:b}=e,w=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("img",{src:(null==x?void 0:x.endsWith(".gif"))?x:x+i,className:"max-w-full w-auto  sm:max-h-[135px] max-h-[280px] min-h-[280px] sm:min-h-[135px] object-contain",width:250,height:250,alt:null!=o?o:t}),(0,a.jsxs)("div",{className:(0,s.m6)("sm:text-center text-right w-full text-xs line-clamp-3",t.length>40?"min-h-[48px]":""),children:[" ",t]}),"out_of_stock"!==d&&m?(0,a.jsxs)(a.Fragment,{children:[f?(0,a.jsxs)("p",{className:"text-left w-full items-end block text-base",children:[(0,a.jsx)("span",{className:"text-[#acacac] tracking-[0.5] line-through",children:h.toLocaleString()})," ",(0,a.jsxs)("span",{className:"text-white bg-[#fb3449] w-fit mr-1 font-semibold px-2 rounded-[20px]",children:[f,"%"]})]}):null,(0,a.jsxs)("p",{className:"text-sm font-bold text-left w-full",children:[Number(b)?Number(b).toLocaleString():b," تومان"]}),u&&g&&new Date(g).getTime()-new Date().getTime()>0?(0,a.jsx)("div",{className:"flex items-center flex-row gap-x-2 watch-icon",children:(0,a.jsx)(r.default,{finalTime:g})}):null]}):"call"===d?(0,a.jsx)("span",{className:"text-gray-500 whitespace-nowrap w-full text-sm after:bg-[#acacac] after:max-h-[1px] after:w-full before:bg-[#acacac] before:max-h-[1px] before:w-full flex after:h-fit before:min-h-[1px] after:mr-2 before:ml-2 items-center after:min-h-[1px] flex-row",children:"تماس بگیرید"}):(0,a.jsx)("span",{className:"text-[#acacac] w-full text-lg after:bg-[#acacac] after:max-h-[1px] after:w-full before:bg-[#acacac] before:max-h-[1px] before:w-full flex after:h-fit before:min-h-[1px] after:mr-2 before:ml-2 items-center after:min-h-[1px] flex-row",children:"ناموجود"})]});return c?(0,a.jsx)("div",{onClick:()=>{c(l)},className:(0,s.m6)("rounded-lg flex items-center flex-col sm:gap-4 gap-2 bg-white p-4 shadow-sm max-w-full w-[400px] sm:h-full sm:max-h-[auto] overflow-y-hidden h-[420px] hover:-translate-y-1 hover:shadow-animation",p),children:w}):(0,a.jsx)(n.default,{target:"_blank",href:l,className:(0,s.m6)("rounded-lg flex items-center flex-col sm:gap-4 gap-2 bg-white p-4 shadow-sm max-w-full w-[400px] sm:h-full sm:max-h-[auto] overflow-y-hidden h-[420px] min-h-max  hover:-translate-y-1 hover:shadow-animation",p),children:w})},x=e=>{let{name:t,url:l,image_url:i,image_alt:x,show_price:o,stock_type:m,discount_percent:c,imageUrlSize:d="",isSpecial:f,special_offer_end:h,compare_at_price:u,outerClassName:g,price:p}=e;return(0,a.jsxs)(n.default,{target:"_blank",href:l,className:(0,s.m6)("flex items-center flex-col gap-2 h-[400px] flex-shrink bg-white p-4 shadow-sm hover:shadow-animation",g),children:[(0,a.jsx)("img",{src:(null==i?void 0:i.endsWith(".gif"))?i:i+d,className:"max-w-full w-auto  max-h-[200px] min-h-[200px] object-contain",width:135,height:135,alt:null!=x?x:t}),(0,a.jsxs)("span",{className:(0,s.m6)("p-2 text-xs h-[54px] line-clamp-3 w-full",t.length>40?"min-h-[54px]":""),children:[" ",t]}),"out_of_stock"!==m&&o?(0,a.jsxs)(a.Fragment,{children:[c?(0,a.jsxs)("p",{className:"text-left w-full items-end block text-base",children:[(0,a.jsx)("span",{className:"text-[#acacac] tracking-[0.5] line-through",children:u.toLocaleString()})," ",(0,a.jsxs)("span",{className:"text-white bg-[#fb3449] w-fit mr-1 font-semibold px-2 rounded-[20px]",children:[c,"%"]})]}):null,(0,a.jsxs)("p",{className:"text-xl font-semibold text-left w-full",children:[Number(p)?Number(p).toLocaleString():p," ",(0,a.jsx)("span",{className:"font-[400] text-sm",children:" تومان"})]}),f&&h&&new Date(h).getTime()-new Date().getTime()>0?(0,a.jsx)("div",{className:"watch-icon flex flex-row-reverse w-full text-left text-gray-600",children:(0,a.jsx)(r.default,{className:"text-inherit",finalTime:h})}):null]}):"call"===m?(0,a.jsx)("span",{className:"text-[#acacac] whitespace-nowrap w-full text-lg after:bg-[#acacac] after:max-h-[1px] after:w-full before:bg-[#acacac] before:max-h-[1px] before:w-full flex after:h-fit before:min-h-[1px] after:mr-2 before:ml-2 items-center after:min-h-[1px] flex-row",children:"تماس بگیرید"}):(0,a.jsx)("span",{className:"text-[#acacac] w-full text-lg after:bg-[#acacac] after:max-h-[1px] after:w-full before:bg-[#acacac] before:max-h-[1px] before:w-full flex after:h-fit before:min-h-[1px] after:mr-2 before:ml-2 items-center after:min-h-[1px] flex-row",children:"ناموجود"})]})},o=l(70138),m=l(88024),c=l(67535),d=e=>{let{name:t,url:l,image_url:i,image_alt:x,show_price:o,stock_type:d,discount_percent:f,imageUrlSize:h="",isSpecial:u,special_offer_end:g,compare_at_price:p,outerClassName:b,price:w}=e;return(0,a.jsxs)(n.default,{target:"_blank",href:l,className:(0,s.m6)("flex items-center flex-col gap-2 flex-shrink bg-white p-2 shadow-sm",b),children:[(0,a.jsxs)("div",{className:"relative w-full",children:[(0,a.jsx)("img",{src:(null==i?void 0:i.endsWith(".gif"))?i:i+h,className:"w-full h-full aspect-[1/1.2] border rounded-lg object-cover",width:135,height:135,alt:x}),"out_of_stock"!==d&&f?(0,a.jsx)("p",{className:"text-left absolute top-2 left-2 md:top-4 md:left-4 w-full items-end block text-xs md:text-base",children:(0,a.jsxs)("span",{className:"text-white bg-gradient-to-l from-banimode-orange to-banimode-red w-fit mr-1 font-semibold px-2 py-[2px] md:px-3 md:py-1 rounded-[20px]",children:["%",f]})}):null,"out_of_stock"!==d&&o||"call"===d?null:(0,a.jsxs)("span",{className:"absolute flex flex-row gap-x-2 items-center justify-center bg-gradient-to-r from-black bottom-2 md:bottom-4 -translate-x-1/2 left-1/2 text-white w-[70%] text-center rounded-lg py-[2px] mdx:text-[10px] md:py-1 to-banimode-gray-dark",children:["ناموجود",(0,a.jsx)(m.G,{icon:c.vG0})]}),"call"===d?(0,a.jsxs)("span",{className:"absolute flex flex-row gap-x-2 items-center justify-center bg-gradient-to-r from-banimode-green bottom-4 -translate-x-1/2 left-1/2 text-white w-[70%] text-center rounded-lg py-1 to-green-800",children:["تماس بگیرید",(0,a.jsx)(m.G,{icon:c.j1w})]}):null]}),(0,a.jsxs)("div",{className:"flex flex-col justify-between w-full h-full",children:[(0,a.jsxs)("div",{className:(0,s.m6)("md:my-2 my-1 text-xs md:text-base line-clamp-2 w-full h-fit"),children:[" ",t]}),"out_of_stock"!==d&&o?(0,a.jsxs)("div",{className:"flex flex-row gap-x-2 w-full items-center text-right text-xs md:text-lg",children:[f?(0,a.jsx)("span",{className:"text-banimode-gray-dark text-[10px] md:text-base tracking-[0.5] line-through",children:p.toLocaleString()}):null,(0,a.jsxs)("div",{className:"flex flex-row gap-x-1 font-semibold mdx:font-bold text-left w-full",children:[Number(w)?Number(w).toLocaleString():w," ",(0,a.jsx)("img",{src:"/icons/toman-icon.svg"})]}),u&&g&&new Date(g).getTime()-new Date().getTime()>0?(0,a.jsx)("div",{className:"watch-icon flex flex-row-reverse w-full text-left text-gray-600",children:(0,a.jsx)(r.default,{className:"text-inherit",finalTime:g})}):null]}):null]})]})},f=e=>{let{theme:t="digikala-1400",variant:l,props:s}=e,r={"digikala-1400":{product:(0,a.jsx)(i,{...s}),category:(0,a.jsx)(x,{...s})},"banimode-1403":{product:(0,a.jsx)(o.default,{...s}),category:(0,a.jsx)(d,{...s})}};return r[t][l]?r[t][l]:r[t].product}}}]);
//# sourceMappingURL=5338-65474c281819375d.js.map