import{r as n,d0 as x,j as e,aS as c,d3 as p,d4 as g,d5 as u,d6 as h}from"./react-vendor-xYZnmIII.js";import{T as j}from"./table-filter-BQQ7Rmfc.js";import{T as b}from"./table-footer-Dfs_f5Wf.js";import{T as f}from"./table-header-CjMHr8CW.js";import{B as R,j as T,a as S,aE as C,aF as w,aG as l,aH as m}from"./ui-components-CQM92IK3.js";import{D as M}from"./layout-DC6VQ8xV.js";import N from"./exam-table-columns-CcpiEqP9.js";import"./inertia-vendor-cBbDTmhJ.js";import"./ui-vendor-Ds9iwIxa.js";import"./use-lang-Dg6I_Fym.js";import"./debounce-CWHP_ANh.js";import"./route-D0xh7FtZ.js";import"./table-page-size-CzF8rJAG.js";import"./interactive-vendor-B1OgcAgP.js";import"./main-CnGu8e_N.js";import"./theme-colors-CLpwvDr4.js";import"./appearance-5ivIjthu.js";import"./language-C7bQIqs2.js";import"./notification-C3MPMjX2.js";import"./app-logo-BQGZ7CFC.js";import"./delete-modal-h3jQBOO6.js";import"./use-auth-l-ShkEGs.js";const E=t=>{var s;const[i,d]=n.useState([]),a=x({data:t.exams.data,columns:N(),onSortingChange:d,getCoreRowModel:h(),getSortedRowModel:u(),getFilteredRowModel:g(),state:{sorting:i}});return e.jsxs("div",{children:[e.jsx(c,{href:route("exams.create"),children:e.jsx(R,{children:"Create Exam"})}),e.jsx(T,{className:"my-6"}),e.jsxs(S,{children:[e.jsx(j,{data:t.exams,title:"Exam List",globalSearch:!0,tablePageSizes:[10,15,20,25],routeName:"exams.index"}),e.jsxs(C,{className:"border-border border-y",children:[e.jsx(f,{table:a}),e.jsx(w,{children:(s=a.getRowModel().rows)!=null&&s.length?a.getRowModel().rows.map(o=>e.jsx(l,{"data-state":o.getIsSelected()&&"selected",children:o.getVisibleCells().map(r=>e.jsx(m,{children:p(r.column.columnDef.cell,r.getContext())},r.id))},o.id)):e.jsx(l,{children:e.jsx(m,{colSpan:a.getAllColumns().length,className:"h-24 text-center",children:"No exams found."})})})]}),e.jsx(b,{className:"p-5 sm:p-7",routeName:"exams.index",paginationInfo:t.exams})]})]})};E.layout=t=>e.jsx(M,{children:t});export{E as default};
