import{jsx as e,jsxs as r}from"react/jsx-runtime";import{B as o}from"./ui-components-B24mpb8o.js";import{ArrowUpDown as l}from"lucide-react";import"next-themes";import"sonner";import"react";import"@radix-ui/react-label";import"class-variance-authority";import"@radix-ui/react-checkbox";import"@radix-ui/react-avatar";import"@radix-ui/react-dropdown-menu";import"@radix-ui/react-scroll-area";import"@radix-ui/react-popover";import"@radix-ui/react-radio-group";import"@radix-ui/react-dialog";import"@radix-ui/react-slot";import"clsx";import"@radix-ui/react-separator";import"@radix-ui/react-tooltip";import"@radix-ui/react-tabs";import"@radix-ui/react-accordion";import"@radix-ui/react-progress";import"@radix-ui/react-select";import"cmdk";import"@radix-ui/react-switch";import"react-day-picker";import"@radix-ui/react-slider";import"embla-carousel-react";import"@radix-ui/react-toggle-group";import"vaul";import"tailwind-merge";const q=n=>{const{table:i}=n;return[{accessorKey:"title",header:i.title,cell:({row:t})=>e("div",{className:"capitalize",children:t.getValue("title")})},{accessorKey:"enrollments_count",header:({column:t})=>e("div",{className:"flex items-center justify-center",children:r(o,{type:"button",variant:"ghost",onClick:()=>t.toggleSorting(t.getIsSorted()==="asc"),children:[i.enrollments,e(l,{})]})}),cell:({row:t})=>e("div",{className:"text-center",children:e("p",{children:t.original.enrollments_count})})},{accessorKey:"average_rating",header:({column:t})=>e("div",{className:"flex items-center justify-center",children:r(o,{type:"button",variant:"ghost",onClick:()=>t.toggleSorting(t.getIsSorted()==="asc"),children:[i.rating,e(l,{})]})}),cell:({row:t})=>r("div",{className:"flex items-center justify-center gap-1 text-center",children:[e("p",{children:Number(t.original.average_rating).toFixed(1)}),e("span",{className:"text-yellow-500",children:e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",children:e("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"})})}),r("span",{className:"text-muted-foreground text-sm",children:["(",t.original.reviews_count,")"]})]})}]};export{q as default};
