import{M as _,y as S,b as w,f as C}from"./primevue-CfIk0_DY.js";import{_ as M,s as c}from"./index-BxIwIJfy.js";import{a as n,w as $,b as v,k as B,l as b,d as o,q as f,v as s,a7 as x,c as N,p as U}from"./vue-core-Di3IuVqe.js";const A={style:{padding:"16px"}},D={class:"serie-options"},J={key:0,class:"field",style:{"margin-top":"16px"}},z={class:"flex items-center justify-end",style:{gap:"8px",padding:"10px 16px","border-top":"1px solid #e5e7eb","background-color":"#f9fafb"}},O={__name:"Serie",props:["show"],emits:["close","updateSerie"],setup(g,{emit:I}){const r=g,d=I,i=n(r.show),L=new Date().getMonth()+1,a=n(L),t=n(1),y=[{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 $(()=>r.show,p=>{i.value=p}),(p,e)=>{const u=_,V=S,m=w,k=C;return v(),B(k,{visible:i.value,"onUpdate:visible":e[7]||(e[7]=l=>i.value=l),modal:"",style:{width:"360px"},closable:!1,draggable:!1,contentStyle:"padding: 0;"},{header:b(()=>[...e[8]||(e[8]=[o("div",{class:"flex items-center",style:{gap:"10px"}},[o("i",{class:"pi pi-hashtag",style:{color:"var(--omag-700)"}}),o("span",{class:"font-bold"},"Numérotation")],-1)])]),default:b(()=>[o("div",A,[o("div",D,[o("div",{class:f(["serie-option",{"serie-option--active":t.value===1}]),onClick:e[1]||(e[1]=l=>t.value=1)},[s(u,{inputId:"serie1",name:"serie",value:1,modelValue:t.value,"onUpdate:modelValue":e[0]||(e[0]=l=>t.value=l)},null,8,["modelValue"]),e[9]||(e[9]=o("label",{for:"serie1",style:{cursor:"pointer",flex:"1"}},"Série 1",-1))],2),o("div",{class:f(["serie-option",{"serie-option--active":t.value===2}]),onClick:e[3]||(e[3]=l=>t.value=2)},[s(u,{inputId:"serie2",name:"serie",value:2,modelValue:t.value,"onUpdate:modelValue":e[2]||(e[2]=l=>t.value=l)},null,8,["modelValue"]),e[10]||(e[10]=o("label",{for:"serie2",style:{cursor:"pointer",flex:"1"}},"Série 2",-1))],2)]),x(c).state.enreg_option_comm.prefixe_facturec>0?(v(),N("div",J,[e[11]||(e[11]=o("label",{for:"mois",class:"block",style:{"margin-bottom":"4px"}},"Mois",-1)),s(V,{id:"mois",modelValue:a.value,"onUpdate:modelValue":e[4]||(e[4]=l=>a.value=l),options:y,optionLabel:"Libelle",optionValue:"Id",size:"small",fluid:"",class:"w-full"},null,8,["modelValue"])])):U("",!0)]),o("div",z,[s(m,{text:"",icon:"pi pi-check-circle",label:"OK",class:"text-green-600",onClick:e[5]||(e[5]=l=>d("updateSerie",{serie:t.value,mois:x(c).state.enreg_option_comm.prefixe_facturec>0?a.value:0}))}),s(m,{text:"",icon:"pi pi-times",label:"Annuler",class:"text-red-600",onClick:e[6]||(e[6]=l=>d("close"))})])]),_:1},8,["visible"])}}},F=M(O,[["__scopeId","data-v-70c2be2f"]]);export{F as S};
