1import{b as a,R as s,bc as x,bd as N,an as v,be as y,L as E,c as r,h as S,f as V,bf as w,bg as R,ah as z,k as b,bh as F,z as T,K as k}from"./chunk-Dr4aXA2l.js";const m={Heureka:"heureka",Eshop:"eshop",Google:"google",Etrusted:"etrusted"},A=new Map([["biano.cz",{name:"Tsjechië",domain:"biano.cz",locale:"cs-cz",translatedFrom:"Vertaald uit het Tsjechisch"}],["biano.sk",{name:"Slowakije",domain:"biano.sk",locale:"sk-sk",translatedFrom:"Vertaald uit het Slowaaks"}],["biano.nl",{name:"Nederland",domain:"biano.nl",locale:"nl-nl",translatedFrom:"Vertaald uit het Nederlands"}],["biano.ro",{name:"Roemenië",domain:"biano.ro",locale:"ro-ro",translatedFrom:"Vertaald uit het Roemeens"}],["biano.com.br",{name:"Brazilië",domain:"biano.com/br",locale:"pt-br",translatedFrom:"Vertaald uit het Portugees"}],["biano.hu",{name:"Hongarije",domain:"biano.hu",locale:"hu-hu",translatedFrom:"Vertaald uit het Hongaars"}],["biano.pt",{name:"Portugal",domain:"biano.pt",locale:"pt-pt",translatedFrom:"Vertaald uit het Portugees"}],["biano.gr",{name:"Griekenland",domain:"biano.gr",locale:"el-gr",translatedFrom:"Vertaald uit het Grieks"}],["biano.it",{name:"Italië",domain:"biano.it",locale:"it-it",translatedFrom:"Vertaald uit het Italiaans"}],["biano.bg",{name:"Bulgarije",domain:"biano.bg",locale:"bg-bg",translatedFrom:"Vertaald uit het Bulgaars"}],["biano.pl",{name:"Polen",domain:"biano.com/pl",locale:"pl-pl",translatedFrom:"Vertaald uit het Pools"}]]),G=({reply:e,eshopName:t,eshopSlug:l,originalTextVisible:n})=>a("article",{className:"flex flex-col gap-y-3 rounded-2xl border border-gray-30 bg-gray-10 p-4 md:gap-y-4 md:p-5",children:[a("div",{className:"flex items-center justify-between gap-x-2",children:[a("a",{href:s("frontend@marketplace_eshop_homepage",{slug:l}),target:"_blank",rel:"noopener",children:a(x,{iconName:"Shopping-Bag",size:"m",color:"beige"})}),a("span",{className:"flex-auto text-sm font-semibold md:text-base",children:t?a("a",{href:s("frontend@marketplace_eshop_homepage",{slug:l}),target:"_blank",rel:"noopener",children:t}):"Shop"}),a("time",{className:"ml-auto flex-none text-sm font-medium text-gray-80",dateTime:y(e.dateTime),title:v(e.dateTime),children:N(e.dateTime)}),a(E,{label:"Shop",color:"beige-30",tagSize:26,className:"flex-none"})]}),a("p",{className:"text-left text-sm leading-normal md:text-base md:leading-normal",children:e.text}),e.originalText&&a("p",{className:r(c,"mt-0.5 text-sm leading-normal text-gray-80",!n&&"hidden"),children:e.originalText})]});function j(e,t){return t[+(e!=1)]}var I=(e=>(e.Eshop="eshop",e.Variant="variant",e))(I||{});const L="js-review",c="js-review-original-text",P="js-review-original-text-toggle",p=e=>{var f;const{user:t}=S(),[l,n]=V(!1),o=e.reviewType==="variant",g=e.reviewType==="eshop",i=e.created&&e.delivered?Math.floor((e.created.getTime()-e.delivered.getTime())/(1e3*60*60*24)):null,d=!!e.translatedFrom&&(A.get(e.translatedFrom)??!1),h=e.showEshopLink&&e.eshopName&&e.eshopSlug?a("a",{href:s("frontend@star_eshop_reviews",{slug:e.eshopSlug}),className:"hover:text-gray-90",children:e.eshopName}):null,_=e.eshopName??"webwinkel",u=e.source===m.Heureka?"Gedownload van Heureka":e.source===m.Etrusted?"Gedownload van eTrusted":e.source===m.Eshop||e.source===m.Google?["Gedownload van ",_]:null;return a(b,{children:[a("article",{className:r(L,"overflow-hidden rounded-2xl border border-gray-30 p-4 md:p-5"),children:[(t==null?void 0:t.adminModeEnabled)&&e.debugId&&a(w,{children:a("div",{children:e.debugId})}),a("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-2",children:[a("div",{className:"flex items-center gap-2 self-start",children:[a(R,{src:e.avatar,alt:e.nickname??"Avatar picture",size:"m",color:"green",className:"flex-none"}),e.nickname&&a("div",{className:"flex-auto text-sm font-semibold md:text-base",children:e.nickname})]}),a("div",{className:"ml-auto flex flex-none flex-col items-end gap-x-3 gap-y-1 md:flex-row md:items-center md:gap-x-4",children:[!!e.showType&&e.reviewType&&a("p",{className:"text-sm font-medium text-gray-80",children:g?"E-shop beoordeling":"Productbeoordeling"}),e.created&&a("time",{className:"text-sm font-medium text-gray-80",dateTime:y(e.created),title:v(e.created),children:N(e.created)}),i&&a("p",{className:"text-sm font-medium text-gray-80",children:j(i,[`Geleverd binnen ${i} dag`,`Bezorgd binnen ${i} dagen`])}),e.ratingValue!==null&&a(z,{size:"large",rating:e.ratingValue})]})]}),e.variant&&a("p",{className:"mb-2 text-sm leading-normal md:text-base md:leading-normal",children:a("a",{href:s("frontend@product_detail_variant",{variantId:e.variant.id,slug:e.variant.slug}),className:"text-brown-60 underline hover:text-brown-80 hover:no-underline",children:e.variant.name??"Product gekocht"})}),e.text&&a(b,{children:[a("p",{className:"text-sm leading-normal md:text-base md:leading-normal",children:e.text.text}),e.text.originalText&&a("p",{className:r(c,"mt-1 text-sm leading-normal text-gray-80",!l&&"hidden"),children:e.text.originalText})]}),(e.pluses.length>0||e.minuses.length>0)&&a(C,{pluses:e.pluses,minuses:e.minuses,originalTextVisible:l}
1),e.reviewType==="variant"&&e.imageIds&&e.imageIds.length>0&&a(M,{imageIds:e.imageIds,label:(f=e.text)==null?void 0:f.text}),e.reviewType==="eshop"&&e.variants&&e.variants.length>0&&a(O,{variants:e.variants}),(o&&h||d||u)&&a("div",{className:r("-mx-4 -mb-4 mt-4 flex flex-col gap-2 border-t border-gray-30 bg-gray-10 p-4","text-left text-sm/tight font-medium text-gray-80","sm:flex-row sm:flex-wrap sm:gap-x-4","md:-mx-5 md:-mb-5 md:px-5"),children:[o&&h&&a("p",{children:["Aangeschaft bij ",h]}),d&&a("p",{children:[d.translatedFrom," (",a("button",{className:r(P,"underline hover:text-gray-80 hover:no-underline"),onClick:()=>n(!0),children:"Origineel weergeven"}),")"]}),u&&a("p",{children:u})]})]}),e.reply&&a("div",{className:"border-l border-gray-30 pl-4 md:pl-8",children:a(G,{reply:e.reply,eshopName:e.eshopName,eshopSlug:e.eshopSlug,originalTextVisible:l})})]})},C=({pluses:e,minuses:t,originalTextVisible:l})=>a("div",{className:"mt-4 grid grid-cols-1 gap-2 text-sm leading-normal md:grid-cols-2 md:text-base",children:[e.length>0&&a("div",{className:"flex flex-col gap-2",children:e.map(n=>a("div",{className:"grid grid-cols-[auto_1fr]",children:[a(x,{iconName:"Plus",size:"xs",color:"green",className:"mr-2"}),a("p",{className:"col-start-2",children:n.text}),n.originalText&&a("p",{className:r(c,"col-start-2 mt-0.5 text-sm leading-normal text-gray-80",!l&&"hidden"),children:n.originalText})]}))}),t.length>0&&a("div",{className:"flex flex-col gap-2",children:t.map(n=>a("div",{className:"grid grid-cols-[auto_1fr]",children:[a(x,{iconName:"Minus",size:"xs",color:"red",className:"row-span-2 mr-2"}),a("p",{className:"col-start-2",children:n.text}),n.originalText&&a("p",{className:r(c,"col-start-2 mt-0.5 text-sm leading-normal text-gray-80",!l&&"hidden"),children:n.originalText})]}))})]}),M=({imageIds:e,label:t})=>a("div",{children:[a("p",{className:"mb-2 mt-4 text-sm font-medium leading-tight text-gray-100 md:text-base md:leading-tight",children:"Bijlagen:"}),a("div",{className:"custom-scrollbar flex gap-x-2 overflow-x-auto",children:e.map(l=>a("button",{"data-modal-open-props":JSON.stringify([l]),"data-modal-opener":"ReviewImage",className:F,children:a(T,{imageId:l,imageType:k.Review,imageSize:"default",lazy:!0,imgAttributes:{width:64,height:64,alt:t??"Gebruiker afbeelding",className:"size-12 rounded-lg border border-gray-30 hover:border-gray-40 md:size-16 object-cover"}})}))})]}),O=({variants:e})=>a("div",{children:[a("p",{className:"mb-2 mt-4 text-sm font-medium leading-tight text-gray-100 md:text-base md:leading-tight",children:"Gekochte producten:"}),a("div",{className:"custom-scrollbar flex gap-x-2 overflow-x-auto",children:e.map(t=>!!t.images.length&&a("a",{href:s("frontend@product_detail_variant",{variantId:t.id,slug:t.slug}),className:"size-12 flex-none overflow-hidden rounded-lg border border-gray-30 hover:border-gray-40 md:size-16",title:t.name,children:a(T,{imageId:t.images[0].id,imageType:k.Product,imageSize:"listingRectangle",imageSizeRetina:"listingRectangleRetina",imgAttributes:{width:64,height:64,alt:t.name,className:"size-full object-contain"}})},t.id))})]}),W=({review:e,showType:t=!0,showEshopLink:l=!0})=>{var i,d;const n=e.userNickName?e.userNickName:(e.value??0)>=4?"Tevreden gebruiker":"Niet-gelogde gebruiker",o=e.externalId.startsWith("heureka-"),g=e.externalId.startsWith("eshop-");return a(p,{debugId:a(b,{children:[a("span",{className:"font-semibold",children:"External ID: "}),a("span",{children:e.externalId})]}),avatar:e.userAvatar,nickname:n,ratingValue:e.value??null,created:e.created,delivered:e.delivered,reviewType:I.Variant,showType:t,text:e.text,pluses:e.pluses??[],minuses:e.minuses??[],translatedFrom:e.translatedFrom,isFromHeureka:o,imageIds:e.imageIds,variant:e.variant,reply:e.reply,eshopName:(i=e.eshop)==null?void 0:i.name,eshopSlug:(d=e.eshop)==null?void 0:d.slug,showEshopLink:l,isFromEshop:g,source:e.source})};export{W as R,I as a,p as b};
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.