import{jsxs as r,jsx as e}from"react/jsx-runtime";import{A as l,h as n,i as m,B as a}from"./ui-components-B24mpb8o.js";import{ArrowUpDown as o,Star as c}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 L=s=>{const{table:i}=s;return[{accessorKey:"user.name",header:({column:t})=>r(a,{type:"button",variant:"ghost",onClick:()=>t.toggleSorting(t.getIsSorted()==="asc"),children:[i.instructor,e(o,{className:"ml-2 h-4 w-4"})]}),cell:({row:t})=>r("div",{className:"flex items-center space-x-2",children:[r(l,{className:"h-8 w-8",children:[e(n,{src:t.original.user.photo||"",alt:t.original.user.name,className:"object-cover"}),e(m,{children:t.original.user.name.charAt(0)})]}),e("span",{className:"capitalize",children:t.original.user.name})]})},{accessorKey:"total_enrollments",header:({column:t})=>e("div",{className:"flex items-center justify-center",children:r(a,{type:"button",variant:"ghost",onClick:()=>t.toggleSorting(t.getIsSorted()==="asc"),children:[i.enrollments,e(o,{className:"ml-2 h-4 w-4"})]})}),cell:({row:t})=>e("div",{className:"text-center",children:e("p",{children:t.original.total_enrollments_count})})},{accessorKey:"average_rating",header:({column:t})=>e("div",{className:"flex items-center justify-center",children:r(a,{type:"button",variant:"ghost",onClick:()=>t.toggleSorting(t.getIsSorted()==="asc"),children:[i.rating,e(o,{className:"ml-2 h-4 w-4"})]})}),cell:({row:t})=>r("div",{className:"flex items-center justify-center gap-1 text-center",children:[e("p",{children:Number(t.original.total_average_rating).toFixed(1)}),e(c,{className:"h-4 w-4 fill-yellow-400 text-yellow-400"}),r("span",{className:"text-muted-foreground text-sm",children:["(",t.original.total_reviews_count,")"]})]})}]};export{L as default};
