import{g as f}from"./primevue-CfIk0_DY.js";import{s as e}from"./index-BxIwIJfy.js";import{M as b}from"./MasterDetailReferentiel-c0KTUzyB.js";import{N as v}from"./NumeroChip-QCXXOqUM.js";import{i as _,b as $,k as x,l as V,d as t,v as r,j as p}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 g={class:"md-form-grid"},M={class:"flex items-end md-col-full",style:{gap:"8px"}},h={class:"field",style:{flex:"1","min-width":"0"}},w={class:"field md-col-full"},F={__name:"motifPerte",props:["ndoc","embedded"],setup(s){const c={list:()=>`${e.lienApi}/MotifPerte/${e.db}`,getOne:i=>`${e.lienApi}/unMotifPerte/${e.db}/${i}`,add:()=>`${e.lienApi}/AjouterEtRenvoyerMotifPerte/${e.db}`,save:i=>`${e.lienApi}/enregistrerMotifPerte/${e.db}/${i}`,remove:i=>`${e.lienApi}/supprimerMotifPerte/${e.db}/${i}`},u={excelFileName:"Motif perte",excelSheetName:"Motif perte",columnWidths:{Libelle:250}};return(i,o)=>{const m=f,a=_("maxlen-db");return $(),x(b,{"page-id":310,"tab-id":"motifPerte","id-field":"Id",resource:c,grid:u,embedded:s.embedded,ndoc:s.ndoc,variant:"drawer","drawer-width":"640px",title:"Motif de perte","entity-label":"un motif de perte","empty-icon":"pi pi-times-circle","delete-message":"Voulez-vous vraiment supprimer ce motif de perte ?"},{form:V(({entete:l,modeModification:n})=>[t("div",g,[t("div",M,[r(v,{value:l.Id},null,8,["value"]),t("div",h,[o[0]||(o[0]=t("label",{for:"inputFocus",class:"block mb-1"},"Libellé",-1)),p(r(m,{size:"small",id:"inputFocus",modelValue:l.Libelle,"onUpdate:modelValue":d=>l.Libelle=d,class:"w-full",disabled:!n},null,8,["modelValue","onUpdate:modelValue","disabled"]),[[a,"motifperte.Libelle"]])])]),t("div",w,[o[1]||(o[1]=t("label",{for:"commentaire",class:"block mb-1"},"Commentaire",-1)),p(r(m,{size:"small",id:"commentaire",modelValue:l.commentaire,"onUpdate:modelValue":d=>l.commentaire=d,class:"w-full",disabled:!n},null,8,["modelValue","onUpdate:modelValue","disabled"]),[[a,"motifperte.commentaire"]])])])]),_:1},8,["embedded","ndoc"])}}};export{F as default};
