import{g as b}from"./primevue-CfIk0_DY.js";import{s as e}from"./index-BxIwIJfy.js";import{M as f}from"./MasterDetailReferentiel-c0KTUzyB.js";import{N as v}from"./NumeroChip-QCXXOqUM.js";import{C as V}from"./ComboDynamique-BzWI4ISP.js";import{i as C,b as _,k as $,l as x,d as l,v as d,j as u}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 N={class:"md-form-grid"},g={class:"flex items-end md-col-full",style:{gap:"8px"}},w={class:"field",style:{flex:"1","min-width":"0"}},h={class:"field"},D={class:"field"},O={__name:"Commune",props:["ndoc","embedded"],setup(n){const c={list:()=>`${e.lienApi}/communes/${e.db}`,getOne:m=>`${e.lienApi}/uncommune/${e.db}/${m}`,add:()=>`${e.lienApi}/AjouterEtRenvoyercommune/${e.db}`,save:m=>`${e.lienApi}/enregistrerCommune/${e.db}/${m}`,remove:m=>`${e.lienApi}/supprimerCommune/${e.db}/${m}`},p={excelFileName:"Communes",excelSheetName:"Communes",columnWidths:{libelle:250,ville:200,Nomenclature:200}};return(m,i)=>{const r=b,t=C("maxlen-db");return _(),$(f,{"page-id":1802,"tab-id":"Commune","id-field":"IDCommune",resource:c,grid:p,embedded:n.embedded,ndoc:n.ndoc,variant:"drawer","drawer-width":"640px",title:"Communes","entity-label":"une commune","empty-icon":"pi pi-map-marker","delete-message":"Voulez-vous vraiment supprimer cette commune ?"},{form:x(({entete:o,modeModification:a})=>[l("div",N,[l("div",g,[d(v,{value:o.IDCommune},null,8,["value"]),l("div",w,[i[0]||(i[0]=l("label",{for:"inputFocus",class:"block mb-1"},"Commune",-1)),u(d(r,{size:"small",id:"inputFocus",modelValue:o.libelle,"onUpdate:modelValue":s=>o.libelle=s,class:"w-full",disabled:!a},null,8,["modelValue","onUpdate:modelValue","disabled"]),[[t,"commune.libelle"]])])]),l("div",h,[i[1]||(i[1]=l("label",{for:"codefournisseurInput",class:"block mb-1"},"Ville",-1)),d(V,{id:"codefournisseurInput",modelValue:o.IDville,"onUpdate:modelValue":s=>o.IDville=s,placeholder:"Ville",table:"ville",enabled:a,class:"w-full"},null,8,["modelValue","onUpdate:modelValue","enabled"])]),l("div",D,[i[2]||(i[2]=l("label",{for:"nomenclature",class:"block mb-1"},"Nomenclature",-1)),u(d(r,{size:"small",id:"nomenclature",modelValue:o.Nomenclature,"onUpdate:modelValue":s=>o.Nomenclature=s,class:"w-full",disabled:!a},null,8,["modelValue","onUpdate:modelValue","disabled"]),[[t,"commune.Nomenclature"]])])])]),_:1},8,["embedded","ndoc"])}}};export{O as default};
