1import{ak as v,T as P,a5 as f,o as y,r as p,z as B,B as L,C as g,D as S,E as e,I as b,J as k,aa as h,N as m}from"./index-CqbSzbr-.js";import{u as C}from"./shop.api-OQ0FUqa3.js";const I={name:"SingleProduct",components:{SdpLoader:v},props:{urlString:{type:String,default:""}},setup(i){const t=p(),l=C(),{urlString:o}=P(i),r=p(!1),u=f(),n=async a=>{t.value=await l.getProductByUrl(a),t.value.standardPrice=Number(t.value.standardPrice).toFixed(0)};return y(async()=>{o.value&&await n(o.value)}),{product:t,imgLoaded:r,setImgLoaded:()=>{r.value=!0},goToProductPage:a=>{u.push(`/product-view/${a}`)}}}},U={class:"single-product"},x=["src"],N={class:"action"},T={class:"pricing"},w={class:"price"};function z(i,t,l,o,r,u){var d,c,a;const n=L("sdp-loader");return g(),S("a",U,[e("div",null,[o.imgLoaded?k("",!0):(g(),b(n,{key:0})),e("img",{class:h(o.imgLoaded?"":"loading"),src:(d=o.product)==null?void 0:d.imageUrl,alt:"",onLoad:t[0]||(t[0]=_=>{var s;return o.setImgLoaded((s=o.product)==null?void 0:s.imageUrl)})},null,42,x),e("span",N,[e("div",null,m((c=o.product)==null?void 0:c.name),1),e("div",T,[e("b",w,m((a=o.product)==null?void 0:a.standardPrice)+" kr",1),e("button",{type:"button",class:"buy-btn",onClick:t[1]||(t[1]=_=>{var s;return o.goToProductPage((s=o.product)==null?void 0:s.url)})},"BUY")])])])])}const E=B(I,[["render",z],["__scopeId","data-v-09185b90"]]);export{E as default};
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.