import{d as e,k as a,z as l,r as t,o as u,j as s,w as o,c as n,F as p,q as r,f as i,x as b,aW as d,R as f}from"./index-018fb6dd.js";const y=e({__name:"index",props:{options:{type:Array,default:[]},api:{type:String,default:""},group:{type:Boolean,default:!1},query:{type:Object,default:null}},setup(e){const y=e,v=()=>{f.get("options/"+y.api,y.query).then((e=>{c.value=e.data.data}))},c=(y.group,a());return y.api?y.query?l(y,(function(){v()})):v():c.value=y.options,(a,l)=>{const f=t("el-option"),y=t("el-option-group"),v=t("el-select");return u(),s(v,d(a.$attrs,{class:"w-full",clearable:"",filterable:""}),{default:o((()=>[e.group?(u(!0),n(p,{key:0},r(i(c),(e=>(u(),s(y,{key:e.label,label:e.label},{default:o((()=>[(u(!0),n(p,null,r(e.options,(e=>(u(),s(f,{key:e.value,label:e.label,value:e.value},null,8,["label","value"])))),128))])),_:2},1032,["label"])))),128)):(u(!0),n(p,{key:1},r(i(c),(e=>(u(),s(f,{key:e.value,label:e.label,value:e.value},{default:o((()=>[b(a.$slots,"default")])),_:2},1032,["label","value"])))),128))])),_:3},16)}}});export{y as _};
