import{u as m,g as l,d,e as r,B as h,a as p,b as e,h as f,G as b,v as g,o as n,F as u,r as v,t as a,l as w,f as y,i as _}from"./app-BJF24m-a.js";import{A as k}from"./AppLayout-CigKsnGV.js";import"./useChatToggle-0F_jMJSF.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const B={class:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8"},j={class:"bg-white rounded-2xl shadow-sm border border-slate-100 p-6 mb-8 flex gap-4"},V={class:"flex-1 relative"},C={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"},N={class:"p-6"},S={class:"flex justify-between items-center mb-4"},D={class:"px-2 py-0.5 bg-blue-50 text-blue-700 rounded text-[10px] font-bold uppercase"},L={class:"text-[10px] text-slate-400"},T={class:"font-bold text-slate-800 mb-1"},A={class:"flex items-center gap-2 mb-6"},F={class:"text-xs font-mono font-bold text-slate-600"},I={class:"text-xs text-slate-500"},M={key:0,class:"col-span-full py-12 text-center text-slate-400 italic"},O={__name:"Index",props:{title:String,casos:Array,filters:Object},setup(o){const i=m({search:o.filters?.search||""}),c=()=>{i.get(route("timeline"),{preserveState:!0})};return(x,t)=>(n(),l(u,null,[d(r(h),{title:o.title},null,8,["title"]),d(k,{title:o.title},{default:p(()=>[e("div",B,[t[4]||(t[4]=e("div",{class:"mb-8"},[e("h1",{class:"text-2xl font-bold text-slate-900"},"Línea de Tiempo Integral"),e("p",{class:"text-slate-500 mt-1"},"Busque un caso para visualizar su flujo de trabajo y tiempos de respuesta.")],-1)),e("div",j,[e("div",V,[t[1]||(t[1]=e("svg",{class:"w-5 h-5 absolute left-4 top-1/2 -translate-y-1/2 text-slate-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)),f(e("input",{"onUpdate:modelValue":t[0]||(t[0]=s=>r(i).search=s),type:"text",placeholder:"Ingrese placa o número de reclamo...",class:"w-full pl-12 pr-4 py-3 rounded-xl border border-slate-100 focus:border-primary-500 focus:ring-2 focus:ring-primary-500/20 transition-all font-medium",onKeyup:b(c,["enter"])},null,544),[[g,r(i).search]])]),e("button",{onClick:c,class:"px-8 py-3 bg-primary-600 text-white rounded-xl font-bold hover:bg-primary-700 transition-all shadow-lg shadow-primary-200 uppercase text-[10px] tracking-widest"}," Buscar ")]),e("div",C,[(n(!0),l(u,null,v(o.casos,s=>(n(),l("div",{key:s.id,class:"bg-white rounded-2xl shadow-sm border border-slate-100 overflow-hidden hover:shadow-md transition-all group"},[e("div",N,[e("div",S,[e("span",D,a(s.numero_reclamo),1),e("span",L,a(new Date(s.created_at).toLocaleDateString()),1)]),e("h3",T,a(s.cliente?.nombre),1),e("div",A,[e("span",F,a(s.vehiculo?.placa),1),t[2]||(t[2]=e("span",{class:"text-xs text-slate-400"},"•",-1)),e("span",I,a(s.estado_actual.replace("_"," ")),1)]),d(r(w),{href:x.route("casos.estados",s.id),class:"w-full flex items-center justify-center gap-2 py-3 bg-slate-50 text-slate-700 rounded-xl text-[10px] font-bold uppercase tracking-widest hover:bg-primary-600 hover:text-white transition-all"},{default:p(()=>[...t[3]||(t[3]=[y(" Ver Timeline ",-1),e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 7h8m0 0v8m0-8l-8 8-4-4-6 6"})],-1)])]),_:1},8,["href"])])]))),128)),o.casos?.length===0?(n(),l("div",M," No se encontraron casos para mostrar en la línea de tiempo. ")):_("",!0)])])]),_:1},8,["title"])],64))}};export{O as default};
