1import{n as o,j as e,L as a}from"./index-C_jiNXp3.js";import{S as i}from"./site-layout-D6Jn_0Bb.js";import{B as m,a as c,b as l,c as d,d as n,e as x}from"./breadcrumb-DbwpB75F.js";import{B as u}from"./badge-DEX9TIz0.js";import"./useServerFn-DLYeCdyV.js";import"./index-CmGwGkmg.js";import"./createLucideIcon-Bg0Ar3-V.js";import"./index-qxKQDZJx.js";import"./index-BGlorsaR.js";import"./input-Bu40-EzL.js";import"./search-Cp5PO_hU.js";import"./index-BCSwDZQd.js";function S(){const r=o.useLoaderData();return e.jsx(i,{children:e.jsxs("article",{className:"mx-auto max-w-3xl px-4 py-10",children:[e.jsx(m,{children:e.jsxs(c,{className:"text-sm sm:text-sm",children:[e.jsx(l,{children:e.jsx(d,{asChild:!0,children:e.jsx(a,{to:"/",children:"Start"})})}),e.jsx(n,{}),e.jsx(l,{children:e.jsx(d,{asChild:!0,children:e.jsx(a,{to:"/blogg",children:"Blogg"})})}),e.jsx(n,{}),e.jsx(l,{children:e.jsx(x,{className:"line-clamp-1 max-w-[200px] sm:max-w-xs",children:r.title})})]})}),e.jsxs("header",{className:"mt-8",children:[r.category&&e.jsx(u,{variant:"secondary",className:"mb-3",children:r.category}),e.jsx("h1",{className:"font-display text-2xl font-bold leading-tight sm:text-3xl",children:r.title}),r.excerpt&&e.jsx("p",{className:"mt-3 text-lg text-muted-foreground",children:r.excerpt}),e.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-3 text-sm text-muted-foreground",children:[r.published_at&&e.jsxs("time",{dateTime:r.published_at,children:["Publicerad"," ",new Date(r.published_at).toLocaleDateString("sv-SE")]}),e.jsx("span",{children:"·"}),e.jsxs("time",{dateTime:r.updated_at,children:["Uppdaterad ",new Date(r.updated_at).toLocaleDateString("sv-SE")]}),r.author&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:["Faktagranskad av ",r.author.name]})]})]})]}),r.quick_answer&&e.jsxs("div",{className:"mt-8 rounded-xl border border-border bg-muted/50 p-5",children:[e.jsx("h2",{className:"font-display text-base font-semibold",children:"Snabbsvar"}),e.jsx("p",{className:"mt-2 text-sm leading-relaxed text-muted-foreground",children:r.quick_answer})]}),r.featured_image_url&&e.jsx("figure",{className:"mt-8",children:e.jsx("img",{src:r.featured_image_url,alt:r.title,className:"aspect-video w-full rounded-xl object-cover"})}),e.jsx("div",{className:"prose prose-slate mt-8 max-w-none dark:prose-invert prose-headings:font-display prose-a:text-primary prose-a:no-underline hover:prose-a:underline",dangerouslySetInnerHTML:{__html:r.linkedContent}}),r.faq.length>0&&e.jsxs("section",{className:"mt-12 rounded-xl border border-border bg-card p-5 sm:p-6",children:[e.jsx("h2",{className:"font-display text-xl font-semibold",children:"Vanliga frågor om artikeln"}),e.jsx("dl",{className:"mt-4 space-y-4",children:r.faq.map((s,t)=>e.jsxs("div",{children:[e.jsx("dt",{className:"font-semibold",children:s.question}),e.jsx("dd",{className:"mt-1 text-sm text-muted-foreground",children:s.answer})]},t))})]}),r.related_models.length>0&&e.jsxs("section",{className:"mt-12 rounded-xl border border-border bg-card p-5 sm:p-6",children:[e.jsx("h2",{className:"font-display text-xl font-semibold",children:"Relaterade däck i katalogen"}),e.jsx("ul",{className:"mt-4 grid gap-3 sm:grid-cols-2",children:r.related_models.map((s,t)=>e.jsx("li",{children:e.jsxs(a,{to:"/dack/$brand/$model",params:{brand:s.brand_slug,model:s.model_slug},className:"flex items-center gap-3 rounded-lg border border-border p-3 transition-colors hover:bg-accent",children:[s.image_url&&e.jsx("img",{src:s.image_url,alt:s.label||`${s.brand_slug} ${s.model_slug}`,loading:"lazy",className:"h-16 w-16 shrink-0 rounded-md bg-muted object-contain"}),e.jsxs("span",{className:"min-w-0",children:[e.jsx("span",{className:"block font-medium [overflow-wrap:anywhere]",children:s.label||`${s.brand_slug} ${s.model_slug}`}),e.jsx("span",{className:"mt-1 block text-xs text-muted-foreground",children:s.min_price!=null?`Från ${Math.round(s.min_price).toLocaleString("sv-SE")} kr · Jämför priser`:"Jämför priser och dimensioner"})]})]})},t))})]}),r.author&&e.jsxs("footer",{className:"mt-12 rounded-xl border border-border bg-card p-5 sm:p-6",children:[e.jsxs("h2",{className:"font-display text-lg font-semibold",children:["Faktagranskad av"," ",r.author.slug?e.jsx(a,{to:"/forfattare/$slug",params:{slug:r.author.slug},className:"text-primary underline-offset-4 hover:underline",children:r.author.name}):r.author.name]}),r.author.role&&e.jsx("p",{className:"mt-1 text-sm font-medium text-primary",children:r.author.role}),e.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:r.author.bio}),e.jsxs("div",{className:"mt-3 flex flex-wrap gap-4",children:[r.author.slug&&e.jsxs(a,{to:"/forfattare/$slug",params:{slug:r.author.slug},className:"text-sm font-medium text-primary underline-offset-4 hover:underline",children:["Om ",r.author.name.split(" ")[0]]}),r.author.contact_link&&e.jsxs("a",{href:r.author.contact_link,className:"text-sm font-medium text-primary underline-offset-4 hover:underline",children:["Kontakta ",r.author.name.split(" ")[0]]})]})]})]})})}export{S as component};
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.