import{a5 as d}from"./index.17037962789732.js";import"./index.170379627897316.js";import"./index.170379627897317.js";import{n as f}from"./template.1703796278973.js";import{d as _,l as g,k as U,m as v,o as w,c as y,u as r,M as h}from"./vue.1703796278973.js";const b=_({__name:"ToUser",props:{toUser:null,type:null,configId:null},emits:["update:toUser"],setup(p,{emit:a}){const t=p,n=g({get:()=>t.toUser,set:e=>a("update:toUser",e)}),c={weixin:"wechat",dingTalk:"dingtalk"},s=U([]),l=async()=>{if(!t.configId)return;const{result:e}=await f.getUser(c[t.type],t.configId);s.value=e.map(o=>({label:o.name,value:o.id}))};l();const u=e=>{a("update:toUser",e)};return v(()=>t.configId,()=>{l()}),(e,o)=>{const i=d;return w(),y(i,{options:r(s),onChange:u,placeholder:"请选择收信人",style:{width:"100%"},allowClear:!0,value:r(n),"onUpdate:value":o[0]||(o[0]=m=>h(n)?n.value=m:null)},null,8,["options","value"])}}});export{b as _};
