1import{q as h,p as g,e as p,f as b,g as w,o as r,c as a,b as e,h as l,w as c,i as n,t as i,l as _,k}from"./index-324a8b17.js";import{s as V}from"./sanitize-89313fa0.js";import{u as C}from"./useSeo-d46be081.js";import{_ as T}from"./AdminEditLink-7681681b.js";import"./vue.8fc199ce-42497e8d.js";const M={class:"min-h-screen bg-gray-50"},R={key:0,class:"text-center py-16"},D={key:1,class:"text-center py-16"},L={key:2,class:"max-w-4xl mx-auto px-4 py-8"},B={class:"mb-6"},$={class:"bg-white rounded-xl shadow-sm border border-gray-200 p-8 mb-8"},j={key:0,class:"flex items-center mb-4"},H={class:"inline-flex items-center px-3 py-1 rounded-full text-sm bg-gray-100 text-gray-700"},N={class:"mr-1"},z={class:"flex justify-end mb-2"},S={class:"text-3xl md:text-4xl font-bold text-gray-900 mb-4"},A={class:"flex flex-wrap items-center gap-6 text-sm text-gray-600"},E={class:"flex items-center"},F={key:0,class:"flex items-center text-yellow-600"},I={class:"bg-white rounded-xl shadow-sm border border-gray-200 p-8"},P=["innerHTML"],q={class:"mt-12 text-center"},W={__name:"TestView",setup(G){const u=h(),x=g(),o=p(null),m=p(!0);C({title:"Tests Matériel",description:"Tests et analyses de matériel golf sur AVISGOLF",canonicalPath:`/tests/${u.params.id}`});const v=async()=>{try{const s=u.params.id;console.log("Redirection du test",s,"vers la page vidéo"),x.replace(`/videos/${s}`)}catch(s){console.error("Erreur lors de la redirection:",s),o.value=null,m.value=!1}},f=s=>s?new Date(s).toLocaleDateString("fr-FR",{year:"numeric",month:"long",day:"numeric"}):"",y=s=>s?s.includes("<")?s:s.split(` 2`).map(t=>`<p>${t}</p>`).join(""):"";return b(()=>{v()}),(s,t)=>{const d=w("RouterLink");return r(),a("div",M,[m.value?(r(),a("div",R,t[0]||(t[0]=[e("div",{class:"inline-block animate-spin rounded-full h-12 w-12 border-b-2 border-primary"},null,-1),e("p",{class:"mt-4 text-gray-600"},"Chargement du test...",-1)]))):o.value?(r(),a("article",L,[e("div",B,[l(d,{to:"/tests",class:"inline-flex items-center text-primary hover:text-primary-dark"},{default:c(()=>t[3]||(t[3]=[e("svg",{class:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"})],-1),n(" Retour aux tests ")])),_:1,__:[3]})]),e("header",$,[o.value.categoryData?(r(),a("div",j,[e("span",H,[e("span",N,i(o.value.categoryData.icon),1),n(" "+i(o.value.categoryData.name),1)])])):_("",!0),e("div",z,[l(T,{to:`/admin/tests/${o.value.id}/edit`},null,8,["to"])]),e("h1",S,i(o.value.title),1),e("div",A,[e("div",E,[t[4]||(t[4]=e("svg",{class:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})],-1)),n(" "+i(f(o.value.createdAt||o.value.date)),1)]),o.value.status==="premium"?(r(),a("div",F,t[5]||(t[5]=[e("svg",{class:"w-4 h-4 mr-2",fill:"currentColor",viewBox:"0 0 20 20"},[e("path",{d:"M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"})],-1),n(" Contenu Premium ")]))):_("",!0)])]),e("div",I,[e("div",{class:"prose prose-lg max-w-none",innerHTML:k(V)(y(o.value.content))},null,8,P)]),e("div",q,[l(d,{to:"/tests",class:"inline-block bg-primary text-white px-6 py-3 rounded-lg hover:bg-primary-dark transition font-medium"},{default:c(()=>t[6]||(t[6]=[n(" Voir tous les tests ")])),_:1,__:[6]})])])):(r(),a("div",D,[t[2]||(t[2]=e("h1",{class:"text-2xl font-bold text-gray-900 mb-4"},"Test non trouvé",-1)),l(d,{to:"/tests",class:"text-primary hover:underline"},{default:c(()=>t[1]||(t[1]=[n(" â Retour aux tests ")])),_:1,__:[1]})]))])}}};export{W 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.