import{j as e,c0 as r}from"./vendor-BKmmeuxg.js";import{B as l}from"./button-BpNwv2aE.js";import"./index-WW_1X1qx.js";import"./utils-DxSsnXxD.js";const x=n=>{const{table:s}=n;return[{accessorKey:"title",header:s.title,cell:({row:t})=>e.jsx("div",{className:"capitalize",children:t.getValue("title")})},{accessorKey:"enrollments_count",header:({column:t})=>e.jsx("div",{className:"flex items-center justify-center",children:e.jsxs(l,{type:"button",variant:"ghost",onClick:()=>t.toggleSorting(t.getIsSorted()==="asc"),children:[s.enrollments,e.jsx(r,{})]})}),cell:({row:t})=>e.jsx("div",{className:"text-center",children:e.jsx("p",{children:t.original.enrollments_count})})},{accessorKey:"average_rating",header:({column:t})=>e.jsx("div",{className:"flex items-center justify-center",children:e.jsxs(l,{type:"button",variant:"ghost",onClick:()=>t.toggleSorting(t.getIsSorted()==="asc"),children:[s.rating,e.jsx(r,{})]})}),cell:({row:t})=>e.jsxs("div",{className:"flex items-center justify-center gap-1 text-center",children:[e.jsx("p",{children:Number(t.original.average_rating).toFixed(1)}),e.jsx("span",{className:"text-yellow-500",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",children:e.jsx("polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"})})}),e.jsxs("span",{className:"text-muted-foreground text-sm",children:["(",t.original.reviews_count,")"]})]})}]};export{x as default};