import{jsxs as a,jsx as t}from"react/jsx-runtime";import{T as u}from"./table-filter-CFSMxglD.js";import{T as b}from"./table-footer-lUcSaZ5Q.js";import{T as g}from"./table-header-DXTJ1r7-.js";import{B as f,j as h,a as x,aD as R,aE as T,aF as w,aG as C}from"./ui-components-B24mpb8o.js";import{u as S}from"./use-auth-cj50aT3v.js";import{D as M}from"./layout-CZk01yM3.js";import{Link as N}from"@inertiajs/react";import{useReactTable as y,getFilteredRowModel as F,getSortedRowModel as _,getCoreRowModel as D,flexRender as I}from"@tanstack/react-table";import*as j from"react";import B from"./instructors-table-columns-z8WksM5M.js";import"./use-lang-Cw_jKJYs.js";import"./debounce-CWHP_ANh.js";import"./route-D0xh7FtZ.js";import"lucide-react";import"./table-page-size-B94DPeOD.js";import"next-themes";import"sonner";import"@radix-ui/react-label";import"class-variance-authority";import"@radix-ui/react-checkbox";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"./main-Cv60h411.js";import"./theme-colors-CLpwvDr4.js";import"./appearance-zLWEcDPI.js";import"./language-79bZLpyc.js";import"./notification-BBQVVMqD.js";import"date-fns";import"./app-logo-CAnM-q9p.js";import"./delete-modal-DdJyKUdO.js";import"./application-approval-CRHwlMmf.js";import"./input-error-BbsDx4-P.js";import"./loading-button-B_LaGOAp.js";import"richtor";/* empty css                */const A=r=>{var s;const{isAdmin:l}=S(),[p,n]=j.useState([]),{translate:d}=r,{button:c,dashboard:m}=d,o=y({data:r.instructors.data,columns:B(l,r.translate),onSortingChange:n,getCoreRowModel:D(),getSortedRowModel:_(),getFilteredRowModel:F(),state:{sorting:p}});return a("div",{children:[t(N,{href:route("instructors.create"),children:t(f,{children:c.add_new_instructor})}),t(h,{className:"my-6"}),a(x,{children:[t(u,{data:r.instructors,title:m.instructor_list,globalSearch:!0,tablePageSizes:[10,15,20,25],routeName:"instructors.index"}),a(R,{className:"border-border border-y",children:[t(g,{table:o,tableHeadClass:"px-6"}),t(T,{children:o.getRowModel().rows.map(e=>t(w,{"data-state":e.getIsSelected()&&"selected",children:e.getVisibleCells().map(i=>t(C,{className:"px-6",children:I(i.column.columnDef.cell,i.getContext())},i.id))},e.id))})]}),((s=o.getRowModel().rows)==null?void 0:s.length)<=0&&t("p",{className:"border-border w-full border-b px-6 py-10 text-center",children:m.no_results_found}),t(b,{className:"p-5 sm:p-7",routeName:"instructors.index",paginationInfo:r.instructors})]})]})};A.layout=r=>t(M,{children:r});export{A as default};
