import{o as e}from"./chunk-jRWAZmH_.js";import{n as t,t as n}from"./jsx-runtime-CEixWuwE.js";import{d as r}from"./ctiAxios-BIVP6fGU.js";import{t as i}from"./button-C7b7AmGo.js";import{Z as a}from"./index-BqyXv5bE.js";import{m as o,p as s}from"./path-CO9rz0FN.js";t();var c=e(r()),l=n(),u=[{title:`Nom`,dataKey:`name`},{title:`Titre`,dataKey:`title`},{title:`Démarré`,dataKey:`start`},{title:`Terminé`,dataKey:`end`},{title:`Statut`,dataKey:`endStatus`,width:50},{title:`Durée`,dataKey:`duration`}].map(e=>({width:150,resizable:!0,key:e.dataKey,...e})),d=(e,t,n)=>[{title:``,dataIndex:`action`,key:`deleteImport`,render:(e,r,o)=>(0,l.jsx)(i,{shape:`circle`,icon:(0,l.jsx)(a,{}),onClick:()=>n(r.fullname,t)})},{title:`Type`,dataIndex:`type`,key:`type`,render:(t,n,r)=>{let i=e.find(e=>e.key===t);if(i)return i.label}},{title:`Mois`,dataIndex:`mois`,key:`month`},{title:`Fichier`,dataIndex:`name`,key:`file`},{title:`Date`,dataIndex:`date`,key:`date`},{title:`Taille`,dataIndex:`size`,key:`size`}],f=e=>[{title:`N°`,dataKey:`oid`},{title:`Texte`,dataKey:`texte`,width:200},{title:`Date import`,dataKey:`date_import`,width:100},{title:`Etat`,dataKey:`etat`,width:100,dataGetter:({rowData:e})=>{let t=``;return e.etat===`G`?t=`Généré`:e.etat===`C`&&(t=`Contrôlé`),e.etat_en_cours===`G`&&(t+=` - Génération en cours`),e.traitement_a_faire===`G`&&(t+=` - Génération en attente`),t}},{title:`Finess`,dataKey:`finess`,width:150},{title:`Date début`,dataKey:`date_debut`,width:100},{title:`Date fin`,dataKey:`date_fin`,width:100},{title:s[e].title,dataKey:s[e].dataKey},{title:o[e].title,dataKey:o[e].dataKey},{title:`RSF`,dataKey:`nb_rsf`},{title:`Erreur(s)`,dataKey:`nb_erreurs`},{title:`Avertissement(s)`,dataKey:`nb_avertissements`,width:150}],p=e=>f(e).map(e=>({width:50,resizable:!0,key:e.dataKey,...e})),m=e=>[{title:`N°`,dataKey:`oid`,width:50},{title:`Import dans CTI`,dataKey:`date_text`,dataGetter:({columns:t,column:n,columnIndex:r,rowData:i,rowIndex:a})=>e===`mco`?(0,c.default)(i.date_text,`YYYY/MM/DD`).format(`DD/MM/YYYY`):i.date},{title:`Traitement du fichier MAT2A/OVALIDE`,dataKey:`mat2a_date_text`,dataGetter:({rowData:t})=>e===`mco`?(0,c.default)(t.mat2a_date_text,`YYYY/MM/DD`).format(`DD/MM/YYYY`):t.mat2a_date},{title:`Année`,dataKey:`mat2a_annee`},{title:`Mois`,dataKey:`mat2a_mois`}],h=[{title:`RSA Transmis`,dataKey:`mat2a_rsa_transmis`},{title:`RSA traités`,dataKey:`mat2a_rsa_traites`},{title:`RSA séances`,dataKey:`mat2a_rsa_seances`},{title:`RSA 0 nuits`,dataKey:`mat2a_rsa_0_nuits`},{title:`Montant base de remboursement`,dataKey:`mat2a_rsa_prestations_base_remb`,dataGetter:({rowData:e})=>new Intl.NumberFormat(`fr-FR`,{style:`currency`,currency:`EUR`,minimumFractionDigits:0,maximumFractionDigits:0}).format(e.mat2a_rsa_prestations_base_remb)}],g=[{title:`RHA`,dataKey:`mat2a_rha`},{title:`Journées`,dataKey:`mat2a_journees`},{title:`IVA`,dataKey:`mat2a_iva`},{title:`Age moyen`,dataKey:`mat2a_age_moyen`},{title:`% femmes`,dataKey:`mat2a_pct_femmes`}],_=e=>{let t=[];return t=e===`mco`?m(e).concat(h):m(e).concat(g),t.map(e=>({width:150,resizable:!0,key:e.dataKey,...e}))};export{_ as i,d as n,p as r,u as t};