import{g as l,b as t,d as i,a as r,f as n,e as x,l as m,t as o,F as g,r as f,o as p,n as h}from"./app-BJF24m-a.js";const y={class:"min-h-screen bg-gray-50"},b={class:"bg-white shadow"},w={class:"max-w-7xl mx-auto py-4 sm:py-6 px-4 sm:px-6 lg:px-8 flex justify-between items-center"},v={class:"flex items-center gap-3 sm:gap-4"},_=["action"],C={class:"max-w-7xl mx-auto py-6 px-4 sm:px-6 lg:px-8"},V={class:"grid grid-cols-2 md:grid-cols-4 gap-3 sm:gap-6 mb-6 sm:mb-8"},z={class:"bg-white overflow-hidden shadow rounded-lg p-4 sm:p-5"},A={class:"text-xl sm:text-3xl font-bold text-gray-900"},D={class:"bg-white overflow-hidden shadow rounded-lg p-4 sm:p-5"},E={class:"text-xl sm:text-3xl font-bold text-yellow-600"},S={class:"bg-white overflow-hidden shadow rounded-lg p-4 sm:p-5"},k={class:"text-xl sm:text-3xl font-bold text-blue-600"},N={class:"bg-white overflow-hidden shadow rounded-lg p-4 sm:p-5"},P={class:"text-xl sm:text-3xl font-bold text-green-600"},j={class:"bg-white shadow rounded-lg"},B={class:"px-4 py-5 sm:px-6 flex justify-between items-center"},F={class:"border-t border-gray-200 overflow-x-auto"},R={class:"min-w-full divide-y divide-gray-200"},T={class:"bg-white divide-y divide-gray-200"},L={class:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900"},O={class:"px-6 py-4 whitespace-nowrap text-sm text-gray-500"},M={class:"px-6 py-4 whitespace-nowrap"},q={class:"px-6 py-4 whitespace-nowrap text-sm text-gray-500"},G={class:"px-6 py-4 whitespace-nowrap text-right text-sm font-medium"},I={__name:"Dashboard",props:{title:String,stats:Object,casosRecientes:Array},setup(d){const u=s=>{const e={finalizado:"bg-green-100 text-green-800",en_reparacion:"bg-blue-100 text-blue-800",mesa_compras:"bg-purple-100 text-purple-800",default:"bg-gray-100 text-gray-800"};return e[s]||e.default},c=s=>new Date(s).toLocaleDateString("es-EC",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});return(s,e)=>(p(),l("div",y,[t("header",b,[t("div",w,[e[2]||(e[2]=t("h1",{class:"text-lg sm:text-2xl font-bold text-gray-900"},"Portal Aseguradora",-1)),t("div",v,[i(x(m),{href:s.route("portal.casos"),class:"text-sm sm:text-base text-blue-600 hover:underline"},{default:r(()=>[...e[0]||(e[0]=[n("Mis Casos",-1)])]),_:1},8,["href"]),t("form",{method:"POST",action:s.route("portal.logout")},[...e[1]||(e[1]=[t("button",{type:"submit",class:"text-sm sm:text-base text-gray-600 hover:text-gray-900"},"Cerrar Sesión",-1)])],8,_)])])]),t("main",C,[t("div",V,[t("div",z,[e[3]||(e[3]=t("div",{class:"text-xs sm:text-sm font-medium text-gray-500"},"Total Casos",-1)),t("div",A,o(d.stats.total),1)]),t("div",D,[e[4]||(e[4]=t("div",{class:"text-xs sm:text-sm font-medium text-gray-500"},"Pendientes",-1)),t("div",E,o(d.stats.pendientes),1)]),t("div",S,[e[5]||(e[5]=t("div",{class:"text-xs sm:text-sm font-medium text-gray-500"},"En Proceso",-1)),t("div",k,o(d.stats.en_proceso),1)]),t("div",N,[e[6]||(e[6]=t("div",{class:"text-xs sm:text-sm font-medium text-gray-500"},"Finalizados",-1)),t("div",P,o(d.stats.finalizados),1)])]),t("div",j,[t("div",B,[e[8]||(e[8]=t("h2",{class:"text-lg font-medium text-gray-900"},"Casos Recientes",-1)),i(x(m),{href:s.route("portal.casos"),class:"text-sm text-blue-600 hover:underline"},{default:r(()=>[...e[7]||(e[7]=[n(" Ver todos → ",-1)])]),_:1},8,["href"])]),t("div",F,[t("table",R,[e[10]||(e[10]=t("thead",{class:"bg-gray-50"},[t("tr",null,[t("th",{class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase"},"Caso"),t("th",{class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase"},"Vehículo"),t("th",{class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase"},"Estado"),t("th",{class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase"},"Última Actualización"),t("th",{class:"px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase"},"Acciones")])],-1)),t("tbody",T,[(p(!0),l(g,null,f(d.casosRecientes,a=>(p(),l("tr",{key:a.id},[t("td",L,o(a.numero_reclamo),1),t("td",O,o(a.vehiculo?.placa||"N/A"),1),t("td",M,[t("span",{class:h([u(a.estado_actual),"px-2 inline-flex text-xs leading-5 font-semibold rounded-full"])},o(a.estado_actual),3)]),t("td",q,o(c(a.updated_at)),1),t("td",G,[i(x(m),{href:s.route("portal.casos.ver",a.id),class:"text-blue-600 hover:text-blue-900"},{default:r(()=>[...e[9]||(e[9]=[n(" Ver ",-1)])]),_:1},8,["href"])])]))),128))])])])])])]))}};export{I as default};
