import{d as m,i as l,q as _,as as g,s as f,o as h,a as b,b as n,P as S}from"./index.29cf2edd.js";/* empty css              */const k=m({__name:"RoleSelection",props:{value:{type:String,required:!0}},emits:["change"],setup(r,{emit:u}){const c=r,o=l();let s=l(),e=l();_(()=>{i()});const i=()=>{e.value=!0,g.getRoles().then(a=>{e.value=!1,s.value=a.data}).catch(a=>{e.value=!1})},p=()=>{u("change",o.value)};return f(()=>c.value,a=>{a===""&&(o.value=null)}),(a,t)=>{const d=S;return h(),b(d,{value:o.value,"onUpdate:value":t[0]||(t[0]=v=>o.value=v),"show-search":"",placeholder:"Choose a role",options:n(s),onChange:p,"field-names":{label:"name",value:"role"},loading:n(e),disabled:n(e)},null,8,["value","options","loading","disabled"])}}});export{k as _};
