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