import{u as g,r as i,bV as x,j as e,bY as b,bZ as u,b_ as h,b$ as j}from"./vendor-BKmmeuxg.js";import{T as R}from"./table-header-DVkEnG6Y.js";import{T as f,a as w,b as l,c as n}from"./table-DWOXv4Pu.js";import{AssignmentColumns as M}from"./assignment-columns-BpMhsyAp.js";import"./utils-DxSsnXxD.js";import"./badge-AQfLLMpR.js";import"./index-WW_1X1qx.js";import"./assignment-dialog-BX2OXkdJ.js";import"./button-BpNwv2aE.js";import"./dialog-B2gN9MvT.js";import"./tabs-Ifouhv9A.js";import"./assignment-details-DjTsLMXu.js";import"./richtor-CRcM6Du2.js";import"./assignment-submission-CLSFlMAW.js";import"./assignment-submission-form-Cp0WFuyh.js";import"./chunked-uploader-input-D0XPVOTS.js";import"./input-DM0goJrn.js";import"./index-D9-QKOod.js";import"./input-error-LaPr_4wd.js";import"./loading-button-BnTVAMJ7.js";import"./label-HmIcv5Yx.js";import"./select-CD9o3HN1.js";import"./textarea-CyndvowL.js";const J=()=>{var a;const{props:m}=g(),{assignments:t}=m,[d,c]=i.useState([]),p=i.useMemo(()=>M,[]),o=x({data:t,columns:p,onSortingChange:c,getCoreRowModel:j(),getSortedRowModel:h(),getFilteredRowModel:u(),state:{sorting:d}});return e.jsx("div",{className:"space-y-6",children:t&&t.length>0?e.jsx("div",{className:"overflow-hidden rounded-lg border",children:e.jsxs(f,{className:"border-border border-y",children:[e.jsx(R,{table:o}),e.jsx(w,{children:(a=o.getRowModel().rows)!=null&&a.length?o.getRowModel().rows.map(s=>e.jsx(l,{"data-state":s.getIsSelected()&&"selected",children:s.getVisibleCells().map(r=>e.jsx(n,{children:b(r.column.columnDef.cell,r.getContext())},r.id))},s.id)):e.jsx(l,{children:e.jsx(n,{className:"h-24 text-center",children:"No assignments found."})})})]})}):e.jsx("div",{className:"py-12 text-center",children:e.jsx("p",{className:"text-muted-foreground text-lg",children:"No assignments available for this course yet."})})})};export{J as default};