import{w as y}from"./install.524ae6f2.js";import{u as b}from"./useAgent.c0cb1751.js";import{d as k,a6 as C,r as E,p as S,c,u as o,e as s,k as p,i as m,f as w,j as x,m as B,t as F,F as I,q as L,A as N}from"./index.0308b213.js";const P={modelValue:{type:[Number,String],default:""}},D={"update:modelValue":e=>typeof e=="string"||typeof e=="number",change:e=>typeof e=="string"||typeof e=="number"},j=k({props:P,emits:D,setup(e,{emit:r}){const i=e,{OpPlatform:d}=C();let l=E(""),n=!1;S(()=>i.modelValue,t=>{if(n){n=!1;return}t&&(l.value=t)});const{allAgentList:f,getAgentList:g}=b();g();const _=t=>{n=!0,r("update:modelValue",t),r("change",t)};return(t,u)=>{const h=c("el-option"),A=c("el-select");return o(d)==="shangpu"?(s(),p(A,{key:0,class:"agent-select",modelValue:o(l),"onUpdate:modelValue":u[0]||(u[0]=a=>L(l)?l.value=a:l=a),placeholder:"\u8BF7\u9009\u62E9\u4EE3\u7406\u533A\u57DF",filterable:"",clearable:"",onChange:_},{default:m(()=>[(s(!0),w(I,null,x(o(f),(a,V)=>(s(),p(h,{key:`agents-select-${V}`,value:a.id,label:a.title},{default:m(()=>[B(F(a.title),1)]),_:2},1032,["value","label"]))),128))]),_:1},8,["modelValue"])):N("",!0)}}}),R=y(j);export{R as A};
