import{g as v,K as _,y as x}from"./primevue-CfIk0_DY.js";import{s as e}from"./index-BxIwIJfy.js";import{M as V}from"./MasterDetailReferentiel-c0KTUzyB.js";import{N as $}from"./NumeroChip-QCXXOqUM.js";import{i as J,b as F,k as g,l as w,d as i,v as a,j as N,a7 as j}from"./vue-core-Di3IuVqe.js";import"./cjs-helpers-psZwOBky.js";import"./vue-cal-DKMVGERa.js";import"./moment-BeHQNF8T.js";import"./usePagerDetail-BeqYPv-1.js";import"./DataGrid-CoMfrBJA.js";import"./useAgGridConfig-Dp3DkgaV.js";const A={class:"md-form-grid"},D={class:"flex items-end md-col-full",style:{gap:"8px"}},L={class:"field",style:{flex:"1","min-width":"0"}},h={class:"field"},M={class:"field"},K={__name:"JoursFeries",props:["ndoc","embedded"],setup(t){const m=Object.entries({1:"Janvier",2:"Février",3:"Mars",4:"Avril",5:"Mai",6:"Juin",7:"Juillet",8:"Août",9:"Septembre",10:"Octobre",11:"Novembre",12:"Décembre"}).map(([l,s])=>({value:Number(l),text:s})),n={list:()=>`${e.lienApi}/jrFeries/${e.db}`,getOne:l=>`${e.lienApi}/unjrFerie/${e.db}/${l}`,add:()=>`${e.lienApi}/AjouterEtRenvoyerjrFerie/${e.db}`,save:l=>`${e.lienApi}/enregistrerJrFerie/${e.db}/${l}`,remove:l=>`${e.lienApi}/supprimerJrFerie/${e.db}/${l}`},u={excelFileName:"Jours fériés",excelSheetName:"Jours fériés",documentNumberFields:["ID"],excludedColumns:["ID"],columnWidths:{Libelle:250,Jour:90,Mois:140}};return(l,s)=>{const p=v,c=_,b=x,f=J("maxlen-db");return F(),g(V,{"tab-id":"JoursFeries","id-field":"ID",resource:n,grid:u,embedded:t.embedded,ndoc:t.ndoc,variant:"drawer","drawer-width":"640px",title:"Jour férié","entity-label":"un jour férié","empty-icon":"pi pi-calendar","delete-message":"Voulez-vous vraiment supprimer ce jour férié ?"},{form:w(({entete:o,modeModification:d})=>[i("div",A,[i("div",D,[a($,{value:o.ID},null,8,["value"]),i("div",L,[s[0]||(s[0]=i("label",{for:"inputFocus",class:"block mb-1"},"Libellé",-1)),N(a(p,{size:"small",id:"inputFocus",modelValue:o.Libelle,"onUpdate:modelValue":r=>o.Libelle=r,disabled:!d,class:"w-full"},null,8,["modelValue","onUpdate:modelValue","disabled"]),[[f,"jrFerie.Libelle"]])])]),i("div",h,[s[1]||(s[1]=i("label",{class:"block mb-1"},"Jour",-1)),a(c,{size:"small",modelValue:o.Jour,"onUpdate:modelValue":r=>o.Jour=r,min:1,max:31,useGrouping:!1,disabled:!d,inputClass:"w-full",class:"w-full"},null,8,["modelValue","onUpdate:modelValue","disabled"])]),i("div",M,[s[2]||(s[2]=i("label",{class:"block mb-1"},"Mois",-1)),a(b,{size:"small",modelValue:o.Mois,"onUpdate:modelValue":r=>o.Mois=r,options:j(m),optionLabel:"text",optionValue:"value",disabled:!d,class:"w-full"},null,8,["modelValue","onUpdate:modelValue","options","disabled"])])])]),_:1},8,["embedded","ndoc"])}}};export{K as default};
