import{h as i}from"./index-DDEMnpwQ.js";import{R as p}from"./element-plus-C2aeItNs.js";import{l as c,aL as f,r as s,aK as g,m as y,M as v,K as V,u as n,B as b,R as M}from"./vue-chunks-l-AyUCfi.js";const B=c({__name:"selectPromat",props:f({formModel:{type:Object,default:()=>({})},modelValue:{type:Object||Array},label:{type:String,default:"name"}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(u){const m={label:"tag"},t=s([]),d=s(!1),r=s(!1);let a=g(u,"modelValue");return(()=>{r.value=!0,i({}).then(l=>{const o=(l.list||[]).map(e=>({tag:e.tag,value:{id:e.id,tag:e.tag}}));t.value=o}).catch(l=>{t.value=[]}).finally(()=>{r.value=!1})})(),(l,o)=>r.value?M("",!0):(y(),v(n(p),V({key:0,modelValue:n(a),"onUpdate:modelValue":o[0]||(o[0]=e=>b(a)?a.value=e:a=e),loading:d.value,filterable:""},l.$attrs,{"value-key":"id",props:m,options:t.value}),null,16,["modelValue","loading","options"]))}});export{B as _};
