import{q as h,j as _,x as f,J as g,y as k,k as l,l as e,z as y,B as m,I as i,t as o,F as x,C as u,o as r,m as c}from"./index-B8bqNNwo.js";/**
 * @license lucide-vue-next v0.554.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const v=h("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]),w={class:"h-screen flex flex-col bg-slate-50 overflow-hidden"},C={class:"bg-white border-b border-slate-200 px-8 py-6 flex items-center justify-between shadow-sm z-10"},I={class:"flex gap-2"},F={class:"flex-1 overflow-y-auto p-8 space-y-8 custom-scrollbar"},M={class:"grid grid-cols-1 md:grid-cols-4 gap-6"},T={class:"bg-white p-6 rounded-3xl border border-slate-200 shadow-sm"},j={class:"bg-rose-600 p-6 rounded-3xl shadow-xl shadow-rose-100"},B={class:"text-5xl font-black text-white"},L={class:"bg-white p-6 rounded-3xl border border-slate-200 shadow-sm"},z={class:"text-5xl font-black text-slate-900"},A={class:"bg-white p-6 rounded-3xl border border-slate-200 shadow-sm"},H={class:"text-5xl font-black text-slate-900"},N={class:"bg-white rounded-3xl border border-slate-200 shadow-sm overflow-hidden"},U={class:"p-6 border-b border-slate-100 bg-slate-50/50 flex justify-between items-center"},V={class:"flex bg-slate-200 p-1 rounded-lg gap-1"},q=["onClick"],D={class:"w-full"},G={class:"divide-y divide-slate-100"},O={class:"px-8 py-5 font-black text-slate-900 uppercase text-lg"},R={class:"px-8 py-5"},E={class:"px-2 py-1 bg-slate-100 rounded text-[9px] font-black uppercase"},J={class:"px-8 py-5"},P={class:"flex gap-2"},S={key:0,class:"px-2 py-1 bg-rose-100 text-rose-600 text-[8px] font-black rounded uppercase"},$={key:1,class:"px-2 py-1 bg-amber-100 text-amber-600 text-[8px] font-black rounded uppercase"},K={key:2,class:"px-2 py-1 bg-orange-100 text-orange-600 text-[8px] font-black rounded uppercase"},Y={__name:"Index",setup(Q){const n=_("all"),a=f({stats:{health_percentage:0,grounded_count:0,insurance_alerts:0,fine_alerts:0},grounded_list:[]}),b=g(()=>n.value==="all"?a.grounded_list:a.grounded_list.filter(d=>d.type===n.value)),p=async()=>{const d=await axios.get("/portal/compliance-summary");Object.assign(a,d.data)};return k(p),(d,t)=>(r(),l("div",w,[e("header",C,[t[0]||(t[0]=e("div",null,[e("h1",{class:"text-2xl font-black text-slate-900 tracking-tighter uppercase leading-none"},"Compliance Radar"),e("p",{class:"text-[10px] font-bold text-slate-400 uppercase tracking-widest mt-2"},"Unified Truck & Trailer Health")],-1)),e("div",I,[e("button",{onClick:p,class:"p-2 hover:bg-slate-100 rounded-lg transition-colors"},[y(m(v),{class:"w-4 h-4 text-slate-400"})])])]),e("div",F,[e("div",M,[e("div",T,[t[1]||(t[1]=e("p",{class:"text-[10px] font-black text-slate-400 uppercase mb-4"},"Fleet Health",-1)),e("p",{class:i(["text-5xl font-black",a.stats.health_percentage<80?"text-rose-600":"text-slate-900"])},o(a.stats.health_percentage)+"%",3)]),e("div",j,[t[2]||(t[2]=e("p",{class:"text-[10px] font-black text-rose-100 uppercase mb-4"},"Grounded",-1)),e("p",B,o(a.stats.grounded_count),1)]),e("div",L,[t[3]||(t[3]=e("p",{class:"text-[10px] font-black text-slate-400 uppercase mb-4"},"Ins. Alerts",-1)),e("p",z,o(a.stats.insurance_alerts),1)]),e("div",A,[t[4]||(t[4]=e("p",{class:"text-[10px] font-black text-slate-400 uppercase mb-4"},"Fine Alerts",-1)),e("p",H,o(a.stats.fine_alerts),1)])]),e("section",N,[e("div",U,[t[5]||(t[5]=e("h3",{class:"text-xs font-black text-slate-900 uppercase"},"Grounded Analysis",-1)),e("div",V,[(r(),l(x,null,u(["all","Truck","Trailer"],s=>e("button",{key:s,onClick:W=>n.value=s,class:i([n.value===s?"bg-white shadow-sm":"text-slate-500","px-3 py-1 text-[9px] font-black uppercase rounded-md transition-all"])},o(s),11,q)),64))])]),e("table",D,[t[6]||(t[6]=e("thead",{class:"bg-slate-50/50 text-left"},[e("tr",null,[e("th",{class:"px-8 py-4 text-[10px] font-black text-slate-400 uppercase"},"Unit Plate"),e("th",{class:"px-8 py-4 text-[10px] font-black text-slate-400 uppercase"},"Type"),e("th",{class:"px-8 py-4 text-[10px] font-black text-slate-400 uppercase"},"Issues")])],-1)),e("tbody",G,[(r(!0),l(x,null,u(b.value,s=>(r(),l("tr",{key:s.plate,class:"hover:bg-slate-50/50"},[e("td",O,o(s.plate),1),e("td",R,[e("span",E,o(s.type),1)]),e("td",J,[e("div",P,[s.issues.insurance?(r(),l("span",S,"Insurance")):c("",!0),s.issues.inspection?(r(),l("span",$,"Inspection")):c("",!0),s.issues.fines?(r(),l("span",K,"Overdue Fine")):c("",!0)])])]))),128))])])])])]))}};export{Y as default};
