import{_ as p,d,cb as m,n as f,p as _,r as h,o as t,A as b,y as v,c as l,F as C,z as g,x as R,G as k,i as y}from"./index.js";import{h as x}from"./index.3dd3ee5a.js";const w=["onClick"],L=d({__name:"role-list",props:{currentRole:{type:Object,required:!0}},emits:["changeCurrentRole"],setup(z,{emit:c}){const n=c,i=m(),s=f([]);async function u(){const{code:r,data:a,message:o}=await x({size:100});i({code:r,message:o,handler:()=>{s.value=a.list,n("changeCurrentRole",y(s)[0])}})}return _(()=>u()),(r,a)=>{const o=h("ElScrollbar");return t(),b(o,{class:"border-r border-#dcdfe6"},{default:v(()=>[(t(!0),l(C,null,g(s.value,e=>(t(),l("div",{class:R(["px-1 py-0.5 m-1.5 hover:color-blue hover:bg-#f7f7f7 cursor-pointer duration-200",r.currentRole.id===e.id&&"color-blue bg-#f7f7f7"]),key:e.id,onClick:()=>n("changeCurrentRole",e)},k(e.role_name),11,w))),128))]),_:1})}}});var S=p(L,[["__file","D:/work/jiesuan/settle-vue3/src/views/interest/processPermission/components/role-list.vue"]]);export{S as default};
