import{a9 as _,a5 as v}from"./index.17037962789732.js";import"./index.170379627897316.js";import"./index.170379627897317.js";import{B as w,A as S}from"./instance.1703796278973.js";import{d as k,k as i,w as p,o as c,c as m,a as f,x,F as C,h as P,u as g,y as V,t as B,A as I,M}from"./vue.1703796278973.js";const d=new Map,D=(e,a,l)=>new Promise(async o=>{var s;if(!e||!a||!l)o([]);else if(d.get(e))o(d.get(e));else{let r;if(l==="POINT"?r=await w(a,{terms:[{terms:[{column:"collectorId",value:e}]}]}):r=await S(a,{terms:[{terms:[{column:"channelId",value:e}]}]}),r&&r.status===200){const t=((s=r.result)==null?void 0:s[0])||[];d.set(e,t),o(t)}}}),L=D,q=k({__name:"MSelect",props:{modelValue:{type:String,default:void 0},type:{type:String,default:"POINT"},id:{type:String,default:""},edgeId:{type:String,default:""},provider:{type:String,default:""}},emits:["update:modelValue","update:provider","change"],setup(e,{emit:a}){const l=e,o=i([]),s=i(void 0);p(()=>{s.value=l.modelValue});const r=(t,u)=>{a("update:modelValue",t),a("update:provider",u==null?void 0:u.provider),a("change",t)};return p(()=>{L(l.id,l.edgeId,l.type).then(t=>{o.value=t})}),(t,u)=>{const y=_,h=v;return c(),m(h,{allowClear:"",value:g(s),"onUpdate:value":u[0]||(u[0]=n=>M(s)?s.value=n:null),onChange:r,placeholder:"请选择",style:{width:"100%"}},{default:f(()=>[(c(!0),x(C,null,P(g(o),n=>(c(),m(y,V(n,{key:n.id,value:n.id,label:n.name,showSearch:""}),{default:f(()=>[B(I(n.name),1)]),_:2},1040,["value","label"]))),128))]),_:1},8,["value"])}}});export{q as _};
