1import{k as U,a3 as G,l as h,r as w,O as S,u as J,S as K,B as W,c as r,b as e,e as k,a as x,h as b,t as s,p as X,F as M,x as $,i as y,_ as Y,a4 as Z,o as l,N as ee,m as te,a5 as se}from"#entry";import{_ as ae,r as oe}from"./WWy_r-EY.js";import{F as le}from"./DiAwE3HV.js";import{k as ne,g as re,m as A}from"./DZLnY1P3.js";import{u as ue}from"./sM5-ZMpm.js";import{u as ie}from"./D-FiP20x.js";import{u as de}from"./Dfz_eyMs.js";import{u as ce}from"./GyODDOTC.js";import"./BsqTxom4.js";import"./UdKP_XCG.js";import"./pAYh3yWb.js";const me={class:"min-h-screen bg-gray-50 pt-32"},pe={class:"bg-white shadow-sm border-b"},ve={class:"max-w-6xl mx-auto px-4 py-4"},xe={class:"text-sm text-gray-600 mb-4","aria-label":"Migas de pan"},ge={class:"text-gray-800 font-medium"},_e={class:"text-2xl sm:text-3xl font-bold text-gray-800 tracking-tight"},he={key:0,class:"mt-3 max-w-3xl"},be=["innerHTML"],ye=["aria-expanded"],fe={key:1,class:"text-gray-600 mt-2"},we={class:"max-w-6xl mx-auto px-4 py-8"},ke={class:"text-sm text-gray-600 mb-3"},Ce=["value"],Me=["value"],Le={class:"bg-white py-12"},Se={class:"max-w-6xl mx-auto px-4"},$e={class:"text-2xl font-bold text-gray-800 mb-6"},qe={key:0,class:"text-lg font-normal text-gray-500"},Re={class:"grid grid-cols-2 md:grid-cols-4 gap-6"},Ee={class:"flex justify-center mb-4"},Ie={class:"w-14 h-14 rounded-xl bg-white border border-gray-200 flex items-center justify-center text-blue-600"},He={class:"font-semibold text-lg text-gray-800 mb-2"},Ae={class:"text-sm text-gray-600"},Be={key:0,class:"bg-gray-50 py-12 border-t border-slate-100"},Ne={class:"max-w-3xl mx-auto px-4 sm:px-6"},Te={class:"text-xl sm:text-2xl font-bold text-gray-800 mb-4 tracking-tight"},Ve=["innerHTML"],Oe={key:0,class:"mt-8"},De={class:"text-sm text-gray-600 flex flex-wrap gap-x-2 gap-y-1"},Fe={key:0,class:"text-gray-400","aria-hidden":"true"},Pe={class:"mt-3"},ze={key:1,class:"bg-gray-50 py-12"},je={class:"max-w-4xl mx-auto px-4"},Qe={class:"text-2xl font-bold text-gray-800 mb-6"},Ue={class:"prose max-w-none"},Ge={class:"text-gray-600 mb-4"},Je={class:"list-disc list-inside text-gray-600 space-y-2"},Ke={key:0},We={key:2,class:"bg-white py-12 border-t border-slate-100"},Xe={class:"max-w-3xl mx-auto px-4 sm:px-6"},dt={__name:"index",async setup(Ye){let m,g;const f=U(),B=G(),n=h(()=>String(f.params.marca)),c=h(()=>String(f.params.modelo)),{setModeloSEO:N,resolveMarcaLabel:q,resolveModeloLabel:R}=ue(),{applyIndexacion:T}=ie(),{setPageSEO:V,setStructuredDataList:O}=de(),{getAñosByModelo:D,getCategoriasByModelo:F}=ce(),d=w(""),u=w(""),p=w([]),E=w([]),_=w(!1),a=h(()=>re(n.value,c.value)),P=h(()=>a.value?A(a.value.intro):""),z=h(()=>a.value?A(a.value.generaciones):""),C=h(()=>{const v=Z(f.query);return v&&p.value.includes(v)?v:p.value[0]??null});function j(v){B.push({path:f.path,query:{...f.query,ano:v}})}const I=async()=>{const v=await D(n.value,c.value);p.value=[...v].sort((i,L)=>L-i);const t=await F(n.value,c.value);E.value=t.map(i=>({nombre:i.nombre,slug:i.slug,icono:oe(i.icono,i.slug),repuestos:Math.floor(Math.random()*40)+10}))};[m,g]=S(()=>I()),await m,g(),d.value=q(n.value),u.value=([m,g]=S(()=>R(n.value,c.value)),m=await m,g(),m),a.value?(V("modelo",{marca:d.value,modelo:u.value},a.value.title,a.value.description),J({meta:[{name:"keywords",content:ne(a.value)}]})):([m,g]=S(()=>N(n.value,c.value)),await m,g()),T(!0);const H=[{type:"breadcrumb",data:{breadcrumbs:[{name:"Inicio",path:"/"},{name:"Repuestos",path:"/repuestos"},{name:d.value,path:`/repuestos/${n.value}`},{name:u.value,path:`/repuestos/${n.value}/${c.value}`}]}}];return a.value?.faqs?.length&&H.push({type:"faq",data:{faqs:a.value.faqs,url:`${K}/repuestos/${n.value}/${c.value}`}}),O(H),W([n,c],async()=>{await I(),d.value=q(n.value),u.value=await R(n.value,c.value),_.value=!1}),(v,t)=>{const i=Y,L=ae;return l(),r("div",me,[e("div",pe,[e("div",ve,[e("nav",xe,[x(i,{to:"/",class:"hover:text-blue-600"},{default:b(()=>[...t[2]||(t[2]=[y("Inicio",-1)])]),_:1}),t[4]||(t[4]=e("span",{class:"mx-2"},"âº",-1)),x(i,{to:"/repuestos",class:"hover:text-blue-600"},{default:b(()=>[...t[3]||(t[3]=[y("Repuestos",-1)])]),_:1}),t[5]||(t[5]=e("span",{class:"mx-2"},"âº",-1)),x(i,{to:`/repuestos/${n.value}`,class:"hover:text-blue-600"},{default:b(()=>[y(s(d.value),1)]),_:1},8,["to"]),t[6]||(t[6]=e("span",{class:"mx-2"},"âº",-1)),e("span",ge,s(u.value),1)]),e("h1",_e,s(a.value?.h1||`Repuestos ${d.value} ${u.value}`),1),a.value?(l(),r("div",he,[e("p",{class:X(["text-gray-600 leading-relaxed text-[15px] sm:text-base",{"line-clamp-3":!_.value}]),innerHTML:P.value},null,10,be),e("button",{type:"button",class:"mt-2 text-sm font-semibold text-blue-600 hover:text-blue-700 hover:underline","aria-expanded":_.value,onClick:t[0]||(t[0]=o=>_.value=!_.value)},s(_.value?"Leer menos":"Leer más"),9,ye)])):(l(),r("p",fe," Repuestos "+s(d.value)+" "+s(u.value)+" con stock en Chile. Entrega rápida; si no hay, importación en ~7 dÃas. ",1))])]),e("div",we,[t[7]||(t[7]=e("h2",{class:"text-2xl font-bold text-gray-800 mb
1-4"},"Año del vehÃculo",-1)),e("p",ke," Filtra repuestos compatibles con el año de tu "+s(u.value),1),e("select",{value:C.value,class:"w-full max-w-xs px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500",onChange:t[1]||(t[1]=o=>j(o.target.value))},[(l(!0),r(M,null,$(p.value,o=>(l(),r("option",{key:o,value:o},s(o),9,Me))),128))],40,Ce)]),e("section",Le,[e("div",Se,[e("h2",$e,[y(" CategorÃas de Repuestos "+s(d.value)+" "+s(u.value)+" ",1),C.value?(l(),r("span",qe," ("+s(C.value)+") ",1)):k("",!0)]),e("div",Re,[(l(!0),r(M,null,$(E.value,o=>(l(),ee(i,{key:o.slug,to:te(se)(n.value,c.value,o.slug,C.value),class:"bg-gray-50 rounded-lg p-6 text-center hover:bg-gray-100 transition-colors block"},{default:b(()=>[e("div",Ee,[e("div",Ie,[x(L,{name:o.icono,slug:o.slug,size:"xl"},null,8,["name","slug"])])]),e("h3",He,s(o.nombre),1),e("p",Ae,s(o.repuestos)+"+ repuestos",1)]),_:2},1032,["to"]))),128))])])]),a.value?(l(),r("section",Be,[e("div",Ne,[e("h2",Te,s(a.value.generacionesHeading),1),e("p",{class:"text-gray-600 leading-relaxed text-[15px] sm:text-base",innerHTML:z.value},null,8,Ve),a.value.related.length?(l(),r("div",Oe,[t[9]||(t[9]=e("h3",{class:"text-lg font-semibold text-gray-800 mb-3"}," Otras camionetas americanas ",-1)),e("p",De,[(l(!0),r(M,null,$(a.value.related,(o,Q)=>(l(),r(M,{key:o.href},[x(i,{to:o.href,class:"text-blue-600 hover:text-blue-800 font-medium"},{default:b(()=>[y(s(o.label),1)]),_:2},1032,["to"]),Q<a.value.related.length-1?(l(),r("span",Fe,"·")):k("",!0)],64))),128))]),e("p",Pe,[x(i,{to:"/repuestos/camionetas-americanas",class:"text-sm text-blue-600 hover:text-blue-800 font-semibold"},{default:b(()=>[...t[8]||(t[8]=[y(" Ver todas las camionetas americanas â ",-1)])]),_:1})])])):k("",!0)])])):(l(),r("section",ze,[e("div",je,[e("h2",Qe," Repuestos "+s(d.value)+" "+s(u.value)+" - Especialistas en Chile ",1),e("div",Ue,[e("p",Ge," En AutoPiezas360 Chile somos especialistas en repuestos "+s(d.value)+" "+s(u.value)+". Contamos con el catálogo más completo de autopartes para este modelo con garantÃa extendida. ",1),e("ul",Je,[e("li",null,"Repuestos "+s(d.value)+" "+s(u.value)+" con garantÃa extendida",1),p.value.length?(l(),r("li",Ke," Stock para años "+s(p.value[p.value.length-1])+" - "+s(p.value[0]),1)):k("",!0),t[10]||(t[10]=e("li",null,"Importación directa con hasta 50% de descuento",-1)),t[11]||(t[11]=e("li",null,"Entrega en 7 dÃas a todo Chile",-1))])])])])),a.value?.faqs?.length?(l(),r("section",We,[e("div",Xe,[x(le,{"id-prefix":`${n.value}-${c.value}-faq`,title:`Preguntas frecuentes sobre repuestos ${d.value} ${u.value}`,subtitle:"Motores, compatibilidad, VIN, originales e importación.",faqs:a.value.faqs},null,8,["id-prefix","title","faqs"])])])):k("",!0)])}}};export{dt 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.