1import{y as $,o as t,h as o,d as B,F as _,v as z,f as s,z as C,j as i,C as F,c as m,b,B as h,a9 as S,e as y,D as j,E as L,l as w,t as k,aa as I,r as P,x as p}from"./CWoPGWPY.js";import{a as U}from"./CZqCHNJ9.js";const D={},N={class:"skeleton"};function O(e,l){return t(),o("div",N)}const T=Object.assign($(D,[["render",O],["__scopeId","data-v-3c352df1"]]),{__name:"UiSkeleton"}),V={class:"flex gap-2"},A={class:"transition-all group-hover:opacity-0"},E=["src"],H=B({__name:"ProductCardBadges",props:{badges:{}},setup(e){return(l,r)=>(t(),o("div",V,[(t(!0),o(_,null,z(e.badges,n=>(t(),o("div",A,[s("img",{class:"max-h-12 drop-shadow-1",src:n,alt:""},null,8,E)]))),256))]))}}),R=Object.assign(H,{__name:"UiProductCardBadges"}),G={class:"group relative hover:z-10"},q={key:0,class:"hidden lg:block opacity-0 group-hover:opacity-100 group-hover:shadow-3 absolute -top-4 -left-4 -right-4 -bottom-4 rounded transition-opacity duration-300"},J={class:"relative overflow-hidden rounded"},K=["src"],M=["src"],Q={class:"lg:hidden absolute inset-0 z-[1] w-full h-full overflow-auto flex snap-mandatory snap-x invisible-scroll"},W=["src"],X={key:3,class:"hidden lg:flex absolute w-full h-full top-0 left-0 z-[1] hover:before:content-[''] before:content-none before:flex before:h-[2px] before:bg-grey-1 before:w-full before:absolute before:-bottom-3"},Y=["src"],Z={class:"h-[38px] w-[38px] bg-white/[0.29] backdrop-blur-10 rounded-full flex items-center justify-center"},ee={class:"mb-1 relative"},te={class:"relative"},oe=B({__name:"ProductCard",props:{discount:{},img:{},name:{},link:{},category:{},categoryLink:{},color:{},price:{default:0},priceOld:{},hidePrice:{type:Boolean},activeFavorite:{type:Boolean},noActions:{type:Boolean},imageSkeleton:{type:Boolean},imageSizeType:{default:1},noImageLazyLoad:{type:Boolean,default:!1},gallery:{},noGallery:{type:Boolean},badges:{},noHover:{type:Boolean}},setup(e){const l={1:"pt-[68.5964%]",2:"pt-[99.2982%]",3:"pt-[52.4562%]"};return(r,n)=>{const f=T,c=R,d=U,x=j,a=L,g=C("ripple");return t(),o("div",G,[e.noHover?i("",!0):(t(),o("div",q)),s("div",{class:h([[!e.noHover&&"bg-white"],"relative z-[1]"])},[s("div",J,[e.img?F((t(),m(d,{key:0,to:e.link,class:"block mb-5"},{default:b(()=>[s("div",{class:h([l[e.imageSizeType],"relative"])},[e.imageSkeleton?(t(),m(f,{key:0,class:"!absolute inset-0 z-[0] rounded"})):i("",!0),e.noImageLazyLoad&&!e.gallery?.length?(t(),o("img",{key:1,src:e.img,alt:"",class:"absolute inset-0 z-[1] w-full h-full object-cover rounded","data-not-lazy":""},null,8,K)):(t(),o(_,{key:2},[s("img",{src:e.img,alt:"",class:"hidden lg:flex absolute inset-0 z-[1] w-full h-full object-cover rounded"},null,8,M),s("div",Q,[(t(!0),o(_,null,z(e.gallery,(u,v)=>(t(),o("img",{key:v,src:u,alt:"",class:"w-full h-full object-cover rounded snap-start",loading:"lazy"},null,8,W))),128))])],64)),!e.noGallery&&e.gallery?.length>1?(t(),o("div",X,[(t(!0),o(_,null,z(e.gallery,(u,v)=>(t(),o("div",{key:v,class:"absolute w-full h-full top-0 left-0"},[s("div",{class:"h-full peer z-10 relative group/gallery hover:before:content-[''] before:content-none before:h-[2px] before:bg-main-red before:w-full before:absolute before:-bottom-3",style:S(`width: ${100/e.gallery?.length}%; left: ${v/e.gallery?.length*100}%`)},null,4),v>0?(t(),o("img",{key:0,src:u,loading:"lazy",alt:"",class:"invisible peer-hover:visible absolute inset-0 z-[1] w-full h-full object-cover rounded"},null,8,Y)):i("",!0)]))),128))])):i("",!0),e.badges?.topLeft?.length?(t(),m(c,{key:4,badges:e.badges.topLeft,class:"absolute top-2 left-2 z-10"},null,8,["badges"])):i("",!0),e.badges?.bottomRight?.length?(t(),m(c,{key:5,badges:e.badges.bottomRight,class:"absolute -bottom-4 right-3 z-10"},null,8,["badges"])):i("",!0)],2)]),_:1},8,["to"])),[[g]]):i("",!0),y(a,null,{default:b(()=>[e.noActions?i("",!0):(t(),o("div",{key:0,class:h(["absolute top-3 right-3 z-[2] transition-all group-hover:translate-x-0",{"xl:translate-x-[100px]":!e.activeFavorite}])},[s("div",Z,[y(x,{name:"heart-filled",class:h(["cursor-pointer",e.activeFavorite?"text-main-red":"text-dark"]),onClick:n[0]||(n[0]=u=>r.$emit("click-favorite"))},null,8,["class"])])],2))]),_:1})]),s("div",ee,[y(d,{to:e.link,class:""},{default:b(()=>[w(k(e.category)+" "+k(e.name),1)]),_:1},8,["to"])]),s("div",te,[y(d,{to:e.categoryLink,class:"text-body2 text-grey-3"},{default:b(()=>[w(k(e.color),1)]),_:1},8,["to"])])],2)])}}}),se=Object.assign(oe,{__name:"UiProductCard"}),ae=I("favorite",()=>{const e=P([]);function l(n){e.value.push(n)}function r(n){e.value=e.value.filter((f,c)=>c!==n)}return{items:e,add:l,remove:r}},{persist:{}});function ie(){const e=ae(),l=p(()=>e.items),r=p(()=>l.value.length),n=p(()=>r.value===0);function f(a){return l.value.some(g=>g.id===a.id)}function c(a){e.add(a)}function d(a){const g=l.value.findIndex(u=>a.id===u.id);e.remove(g)}function x(a){f(a)?d(a):c(a)}return{favoriteItems:l,isEmpty:n,favoritesItemsCount:r,addToFavorite:c,removeFromFavorite:d,toggleFavorite:x,productInFavorites:f}}export{T as _,se as a,ie as u};
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.