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