import{r,w as V,o as c,i as w,j as S,b as o,a as t,ay as k,q as b,c as y,ax as B,d as M,z as N,S as $}from"./vendor-BDR7yMJi.js";import{s as v}from"./index-BSaHX2oa.js";const C={class:"p-0 flex flex-col gap-5"},U={class:"flex flex-wrap gap-4"},A={class:"flex items-center gap-2"},D={class:"flex items-center gap-2"},J={key:0,class:"flex flex-col gap-2"},j={class:"flex gap-2 items-center w-full border-y py-2 justify-end"},z={__name:"Serie",props:["show"],emits:["close","updateSerie"],setup(f,{emit:x}){const n=f,d=x,i=r(n.show),_=new Date().getMonth()+1,a=r(_),s=r(1),g=[{Id:1,Libelle:"Janvier"},{Id:2,Libelle:"Février"},{Id:3,Libelle:"Mars"},{Id:4,Libelle:"Avril"},{Id:5,Libelle:"Mai"},{Id:6,Libelle:"Juin"},{Id:7,Libelle:"Juillet"},{Id:8,Libelle:"Août"},{Id:9,Libelle:"Septembre"},{Id:10,Libelle:"Octobre"},{Id:11,Libelle:"Novembre"},{Id:12,Libelle:"Décembre"}];return V(()=>n.show,m=>{i.value=m}),(m,e)=>{const p=k,L=B,u=N,I=$;return c(),w(I,{visible:i.value,"onUpdate:visible":e[5]||(e[5]=l=>i.value=l),modal:"",style:{width:"324px"},header:"Numérotation",closable:!1,draggable:!1},{default:S(()=>[o("div",C,[o("div",U,[o("div",A,[e[6]||(e[6]=o("label",{for:"serie1",class:"mr-2"},"Série 1",-1)),t(p,{id:"serie1",name:"serie",value:1,modelValue:s.value,"onUpdate:modelValue":e[0]||(e[0]=l=>s.value=l)},null,8,["modelValue"])]),o("div",D,[e[7]||(e[7]=o("label",{for:"serie2",class:"mr-2"},"Série 2",-1)),t(p,{id:"serie2",name:"serie",value:2,modelValue:s.value,"onUpdate:modelValue":e[1]||(e[1]=l=>s.value=l)},null,8,["modelValue"])])]),b(v).state.enreg_option_comm.prefixe_facturec>0?(c(),y("div",J,[e[8]||(e[8]=o("label",{for:"mois"},"Mois",-1)),t(L,{id:"mois",modelValue:a.value,"onUpdate:modelValue":e[2]||(e[2]=l=>a.value=l),options:g,optionLabel:"Libelle",optionValue:"Id",class:"w-full"},null,8,["modelValue"])])):M("",!0),o("div",j,[t(u,{text:"",icon:"pi pi-check-circle",label:"OK",class:"text-green-600",onClick:e[3]||(e[3]=l=>d("updateSerie",{serie:s.value,mois:b(v).state.enreg_option_comm.prefixe_facturec>0?a.value:0}))}),t(u,{text:"",icon:"pi pi-times",label:"Annuler",class:"text-red-600",onClick:e[4]||(e[4]=l=>d("close"))})])])]),_:1},8,["visible"])}}};export{z as _};
