import{_ as m}from"./InputSelect.vue_vue_type_script_setup_true_lang-DDGr1dhD.js";import{u as d}from"./index-Dax_IkAt.js";import{f as i}from"./common-U_VzDrmL.js";import{M as p,H as c,g as f,v,o as B,m as _,I as x}from"./index-Bb2UEb_P.js";const h=p({__name:"InputSelectContract",props:x({hasBalance:{type:Boolean},hasOrders:{type:Boolean},exclude:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(o){const a=o,s=c(o,"modelValue"),r=d(),l=f(()=>Object.values(r.contractsList).filter(e=>!(e.IsHidden||a.hasBalance&&e.Balance<=0||a.hasOrders&&e.Orders<=0||a.exclude&&e.ID===a.exclude)).map(e=>({name:`#${e.ID.toString().padStart(5,"0")} / ${e.Customer} / ${i(e.Balance)}`,value:e.ID})));return v(l,t=>{t.length>0&&(s.value=t[0]?.value)},{immediate:!0}),(t,e)=>{const u=m;return B(),_(u,{modelValue:s.value,"onUpdate:modelValue":e[0]||(e[0]=n=>s.value=n),options:l.value,class:"lg:tw-max-w-[660px]"},null,8,["modelValue","options"])}}});export{h as _};
