import{r as c,bV as u,j as t,L as b,bY as x,bZ as f,b_ as g,b$ as h}from"./vendor-BKmmeuxg.js";import{T as j}from"./table-filter-D1fnjeZE.js";import{T}from"./table-footer-B-sB7gNG.js";import{T as R}from"./table-header-DVkEnG6Y.js";import{B as w}from"./button-BpNwv2aE.js";import{C}from"./card-D9_SJYq6.js";import{S}from"./separator-_3LZ_wAA.js";import{T as M,a as N,b as _,c as y}from"./table-DWOXv4Pu.js";import{u as F}from"./use-auth-NG-DQJrC.js";import{D as I}from"./layout-DkwBWm5d.js";import B from"./instructors-table-columns-BaEBm3KR.js";import"./use-lang-YfV87_zl.js";import"./debounce-CWHP_ANh.js";import"./route-B4ZMN77y.js";import"./utils-DxSsnXxD.js";import"./dropdown-menu-DO-po5c1.js";import"./scroll-area-C8HGru-R.js";import"./table-page-size-OCfjNXER.js";import"./index-WW_1X1qx.js";import"./sidebar-BYcYxQeZ.js";import"./sheet-DSvHVmaW.js";import"./tooltip-BsX7Z6vz.js";import"./main-_V386djS.js";import"./index-D9-QKOod.js";import"./appearance-D2z3xcjR.js";import"./app-BytVvUs_.js";/* empty css            */import"./language-BFZ7KItL.js";import"./notification-CYMPYbAP.js";import"./popover-B4kBsMuI.js";import"./app-logo-CmnEIwal.js";import"./accordion-CNBvFN43.js";import"./avatar-j28afJTV.js";import"./delete-modal-D1GJlb1P.js";import"./dialog-B2gN9MvT.js";import"./application-approval-Bq2npaY-.js";import"./input-error-LaPr_4wd.js";import"./loading-button-BnTVAMJ7.js";import"./label-HmIcv5Yx.js";import"./select-CD9o3HN1.js";import"./richtor-CRcM6Du2.js";const D=r=>{var i;const{isAdmin:m}=F(),[l,n]=c.useState([]),{translate:d}=r,{button:p,dashboard:a}=d,o=u({data:r.instructors.data,columns:B(m,r.translate),onSortingChange:n,getCoreRowModel:h(),getSortedRowModel:g(),getFilteredRowModel:f(),state:{sorting:l}});return t.jsxs("div",{children:[t.jsx(b,{href:route("instructors.create"),children:t.jsx(w,{children:p.add_new_instructor})}),t.jsx(S,{className:"my-6"}),t.jsxs(C,{children:[t.jsx(j,{data:r.instructors,title:a.instructor_list,globalSearch:!0,tablePageSizes:[10,15,20,25],routeName:"instructors.index"}),t.jsxs(M,{className:"border-border border-y",children:[t.jsx(R,{table:o,tableHeadClass:"px-6"}),t.jsx(N,{children:o.getRowModel().rows.map(e=>t.jsx(_,{"data-state":e.getIsSelected()&&"selected",children:e.getVisibleCells().map(s=>t.jsx(y,{className:"px-6",children:x(s.column.columnDef.cell,s.getContext())},s.id))},e.id))})]}),((i=o.getRowModel().rows)==null?void 0:i.length)<=0&&t.jsx("p",{className:"border-border w-full border-b px-6 py-10 text-center",children:a.no_results_found}),t.jsx(T,{className:"p-5 sm:p-7",routeName:"instructors.index",paginationInfo:r.instructors})]})]})};D.layout=r=>t.jsx(I,{children:r});export{D as default};
