import{r as x,cP as b,j as e,L as g,cS as h,cT as f,cU as j,cV as T}from"./vendor-rThclpOQ.js";import{T as R}from"./table-filter-YjsfaEUk.js";import{T as S}from"./table-footer-CXgex4hi.js";import{T as w}from"./table-header-Cuecslh2.js";import{B as C}from"./button-ZcsoqUQn.js";import{C as M}from"./card-HXna_7vU.js";import{S as N}from"./separator-Cir9hccx.js";import{T as y,a as F,b as i,c as m}from"./table-DoQbaWlF.js";import{D as _}from"./layout-Dtu8Rjtg.js";import B from"./table-columns-ht3NAU-4.js";import"./use-lang-BK6P2WMc.js";import"./debounce-CWHP_ANh.js";import"./route-B4ZMN77y.js";import"./utils-8KAaAB9H.js";import"./dropdown-menu-Cm0H42C1.js";import"./scroll-area-BCwyUKIK.js";import"./table-page-size-FBmivxVb.js";import"./index-DquVdLUg.js";import"./sidebar-Buyv7mEV.js";import"./sheet-BfC102Vr.js";import"./tooltip-WOIaUmuC.js";import"./main-CC75Iw88.js";import"./sonner-CgbrDmPW.js";import"./index-CWNIUFqh.js";import"./appearance-Bwg83W1G.js";import"./app-BsPpMpSR.js";/* empty css            */import"./language-BmlkXzFK.js";import"./notification-Bti7isEF.js";import"./popover-otAaS-4X.js";import"./app-logo-Bj2M2lhk.js";import"./accordion-by19KtHq.js";import"./avatar-BsP_s7dr.js";import"./delete-modal-CrLtMjfS.js";import"./dialog-CDEDwQhm.js";import"./use-auth-C-KzOAQ_.js";import"./course-status-filter-BXSdHWto.js";const D=t=>{var a;const{translate:l}=t,{button:d,dashboard:c,frontend:n}=l,[p,u]=x.useState([]),o=b({data:t.courses.data,columns:B(),onSortingChange:u,getCoreRowModel:T(),getSortedRowModel:j(),getFilteredRowModel:f(),state:{sorting:p}});return e.jsxs("div",{children:[e.jsx(g,{href:route("courses.create"),children:e.jsx(C,{children:d.create_course})}),e.jsx(N,{className:"my-6"}),e.jsxs(M,{children:[e.jsx(R,{data:t.courses,title:c.course_list,globalSearch:!0,tablePageSizes:[10,15,20,25],routeName:"courses.index"}),e.jsxs(y,{className:"border-border border-y",children:[e.jsx(w,{table:o}),e.jsx(F,{children:(a=o.getRowModel().rows)!=null&&a.length?o.getRowModel().rows.map(r=>e.jsx(i,{"data-state":r.getIsSelected()&&"selected",children:r.getVisibleCells().map(s=>e.jsx(m,{children:h(s.column.columnDef.cell,s.getContext())},s.id))},r.id)):e.jsx(i,{children:e.jsx(m,{className:"h-24 text-center",children:n.no_results})})})]}),e.jsx(S,{className:"p-5 sm:p-7",routeName:"courses.index",paginationInfo:t.courses})]})]})};D.layout=t=>e.jsx(_,{children:t});export{D as default};
