import{jsx as e,jsxs as c}from"react/jsx-runtime";import{T as g}from"./table-header-DXTJ1r7-.js";import{aD as u,aE as h,aF as s,aG as p}from"./ui-components-B24mpb8o.js";import{usePage as f}from"@inertiajs/react";import{useReactTable as b,getFilteredRowModel as R,getSortedRowModel as w,getCoreRowModel as x,flexRender as C}from"@tanstack/react-table";import{useState as M,useMemo as N}from"react";import{AssignmentColumns as T}from"./assignment-columns-DWHmXlLz.js";import"next-themes";import"sonner";import"@radix-ui/react-label";import"class-variance-authority";import"@radix-ui/react-checkbox";import"lucide-react";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";import"./date-BZvGgr5q.js";import"date-fns";import"./assignment-dialog-CQrEKpWn.js";import"./assignment-details-B8R3gOub.js";import"richtor";/* empty css                */import"./assignment-submission-C3S9XCkx.js";import"./assignment-submission-form-xoFk5DPQ.js";import"./chunked-uploader-input-WemAY1Qi.js";import"axios";import"./input-error-BbsDx4-P.js";import"./loading-button-B_LaGOAp.js";const Re=()=>{var m;const{props:l}=f(),{assignments:o}=l,[a,n]=M([]),d=N(()=>T,[]),t=b({data:o,columns:d,onSortingChange:n,getCoreRowModel:x(),getSortedRowModel:w(),getFilteredRowModel:R(),state:{sorting:a}});return e("div",{className:"space-y-6",children:o&&o.length>0?e("div",{className:"overflow-hidden rounded-lg border",children:c(u,{className:"border-border border-y",children:[e(g,{table:t}),e(h,{children:(m=t.getRowModel().rows)!=null&&m.length?t.getRowModel().rows.map(r=>e(s,{"data-state":r.getIsSelected()&&"selected",children:r.getVisibleCells().map(i=>e(p,{children:C(i.column.columnDef.cell,i.getContext())},i.id))},r.id)):e(s,{children:e(p,{className:"h-24 text-center",children:"No assignments found."})})})]})}):e("div",{className:"py-12 text-center",children:e("p",{className:"text-muted-foreground text-lg",children:"No assignments available for this course yet."})})})};export{Re as default};
