import{c as n,j as r,L as l}from"./index-D4ZMoJFe.js";const c=[{path:"/matching/clients",label:"Clients"},{path:"/matching/suppliers",label:"Fournisseurs"},{path:"/matching/unmatched",label:"Éléments non lettrés"}];function o(){const e=n();return r.jsx("div",{className:"flex flex-wrap gap-2",children:c.map(t=>{const a=e.pathname===t.path||e.pathname.startsWith(`${t.path}/`);return r.jsx(l,{to:t.path,className:`rounded-xl border px-4 py-2 text-sm font-medium transition ${a?"border-accent/30 bg-accent/10 text-accent":"border-border bg-surface text-textMuted hover:border-accent/20 hover:bg-accent/5 hover:text-text"}`,children:t.label},t.path)})})}const i={client:{routePath:"/matching/clients",apiPath:"/matching/clients",selectorQueryKey:"client_id",pageTitle:"Lettrage Clients",selectorLabel:"Client",emptyLabel:"Aucun client avec écritures non lettrées",reportTabLabel:"Clients"},supplier:{routePath:"/matching/suppliers",apiPath:"/matching/suppliers",selectorQueryKey:"supplier_id",pageTitle:"Lettrage Fournisseurs",selectorLabel:"Fournisseur",emptyLabel:"Aucun fournisseur avec écritures non lettrées",reportTabLabel:"Fournisseurs"}},p=[{value:"all",label:"Tous les âges"},{value:"0-30",label:"0-30 jours"},{value:"31-90",label:"31-90 jours"},{value:"90+",label:"+90 jours"}],b=e=>`${e.ref_code} · ${e.name}`,h=e=>Number(e||0)>0?"text-accent":Number(e||0)<0?"text-danger":"text-textMuted",g=(e,t)=>{const a=Number(t);return e.includes(a)?e.filter(s=>Number(s)!==a):[...e,a]},d=(e,t)=>t==="all"?!0:t==="0-30"?e.age_days>=0&&e.age_days<=30:t==="31-90"?e.age_days>=31&&e.age_days<=90:e.age_days>90;export{p as A,i as M,o as a,b,h as g,d as m,g as t};
