import{jsxs as l,jsx as t}from"react/jsx-runtime";import{A as F}from"./layout-CssQHtfO.js";import{Head as f}from"@inertiajs/react";import{useReactTable as h,getFilteredRowModel as M,getSortedRowModel as S,getPaginationRowModel as C,getCoreRowModel as R}from"@tanstack/react-table";import e from"react";import{FactionHeader as w}from"./FactionHeader-BW1B2l6H.js";import{FactionStats as x}from"./FactionStats-H_tflqSJ.js";import{MemberSearch as y}from"./MemberSearch-ClUEL8aJ.js";import{MemberTable as G,createMemberColumns as P}from"./MemberTable-Bb6FaJJc.js";import{MemberPagination as V}from"./MemberPagination-Cnl-h9Jq.js";import"./app-sidebar-header-BX2s-HO_.js";import"@radix-ui/react-collapsible";import"lucide-react";import"./dropdown-menu-BP80qPHw.js";import"@radix-ui/react-dropdown-menu";import"./utils-CMbmcP35.js";import"clsx";import"tailwind-merge";import"./app-logo-icon-beRg1XGs.js";import"./fonts-CqawFh47.js";import"@radix-ui/react-slot";import"class-variance-authority";import"./button-BvFBRYHq.js";import"@radix-ui/react-dialog";import"@radix-ui/react-tooltip";import"@radix-ui/react-avatar";import"../app.js";/* empty css     */import"axios";import"sonner";import"react-dom/client";import"./toaster-DuLpwsc2.js";import"./card-Zg0WOx-j.js";import"./input-qMvM9qch.js";import"./table-BrXe3s2z.js";import"./class-icon-CASn9-jM.js";import"./roleHelpers-CE-Z4Z4s.js";import"./badge-CFi7bqqA.js";function ct({faction:o,members:i}){const[p,s]=e.useState([{id:"role",desc:!0}]),[d,g]=e.useState([]),[c,u]=e.useState({}),[r,m]=e.useState(""),b=[{title:"Dashboard",href:"/admin"},{title:"Manage Factions",href:"/admin/manage/factions"},{title:o.name,href:"#"}],a=P(),n=h({data:i,columns:a,getCoreRowModel:R(),getPaginationRowModel:C(),onSortingChange:s,getSortedRowModel:S(),onColumnFiltersChange:g,getFilteredRowModel:M(),onColumnVisibilityChange:u,onGlobalFilterChange:m,globalFilterFn:"includesString",state:{sorting:p,columnFilters:d,columnVisibility:c,globalFilter:r},initialState:{pagination:{pageSize:20}}});return l(F,{breadcrumbs:b,children:[t(f,{title:`Faction: ${o.name}`}),l("div",{className:"container mx-auto py-6 px-3",children:[t(w,{faction:o}),t(x,{faction:o}),t(y,{globalFilter:r,onGlobalFilterChange:m}),t(G,{table:n,columns:a}),t(V,{table:n,totalMembers:i.length})]})]})}export{ct as default};
