import{n as d,j as r,T as c,P as p}from"./render-BEL5IN7j.js";import{T as h,a as x,b as g,c as l,d as s,e as m}from"./Base-B0IvxOwn.js";import"./formControlState-YO0xWqIm.js";import"./Select-DyY0x5OK.js";import"./utils-MPtJ5ynp.js";import"./SwitchBase-DFAnYP3H.js";import"./Link-u7JOT8iP.js";import"./Grid-CY2FZLhF.js";import"./isMuiElement-e1vpiHuY.js";function R({enrollments:i,selectHandler:a}){const{localeMessages:o,direction:t}=d();return i.length===0?r.jsx(c,{component:"span",children:o.nor_enrollments_found}):r.jsx(h,{component:p,sx:{maxHeight:300,border:"1px solid",borderColor:"grey.300",borderRadius:1},children:r.jsxs(x,{children:[r.jsx(g,{children:r.jsxs(l,{children:[r.jsx(s,{align:t=="rtl"?"right":"left",children:o.course}),r.jsx(s,{align:t=="rtl"?"right":"left",children:o.status})]})}),r.jsx(m,{children:i.map(e=>r.jsxs(l,{sx:n=>({":hover":{backgroundColor:n.palette.background.dark,cursor:"pointer",borderBottomColor:"secondary.light",borderBottomWidth:2,borderBottomStyle:"solid"}}),onClick:()=>a(e.id),children:[r.jsx(s,{align:t=="rtl"?"right":"left",children:e.course_title}),r.jsx(s,{align:t=="rtl"?"right":"left",children:o[e.status]})]},e.id))})]})})}export{R as default};
//# sourceMappingURL=EnrollmentList-Bk-YJ9Ax.js.map
