import{jsxs as t,jsx as e}from"react/jsx-runtime";import{A as s}from"./layout-CssQHtfO.js";import{Head as l,Link as o}from"@inertiajs/react";import{C as c}from"./content-card-D1vitqdC.js";import{C as d}from"./class-icon-CASn9-jM.js";import{B as m}from"./badge-CFi7bqqA.js";import{Activity as n,Users as h}from"lucide-react";import"./app-sidebar-header-BX2s-HO_.js";import"react";import"@radix-ui/react-collapsible";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";const p=[{title:"Dashboard",href:"/admin"},{title:"Online Players",href:"/admin/online"}];function K({onlinePlayers:a,count:i}){return t(s,{breadcrumbs:p,children:[e(l,{title:"Online Players"}),t("div",{className:"space-y-2",children:[e("div",{children:t("h2",{className:"text-1xl font-bold tracking-tight flex items-center gap-2",children:[e(n,{className:"h-8 w-8 text-green-500"}),"Online ",i," Players"]})}),e(c,{title:"Active Players",description:"Players currently logged into the game",children:i===0?t("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e(h,{className:"h-12 w-12 text-muted-foreground mb-4"}),e("p",{className:"text-lg font-medium text-muted-foreground",children:"No players online"}),e("p",{className:"text-sm text-muted-foreground",children:"Check back later"})]}):e("div",{className:"space-y-2",children:a.map(r=>t("div",{className:"flex items-center justify-between p-3 rounded-lg border bg-card hover:bg-accent/50 transition-colors",children:[t("div",{className:"flex items-center gap-4",children:[e(d,{classId:r.class,size:"lg"}),t("div",{children:[t("div",{className:"flex items-center gap-2",children:[e(o,{href:`/admin/manage/characters/${r.id}`,className:"font-medium hover:underline",children:r.name}),e(m,{variant:"outline",className:"text-xs",children:r.class_name})]}),e("p",{className:"text-sm text-muted-foreground",children:r.faction_name?r.faction_name:"None Faction"})]})]}),t("div",{className:"flex items-center gap-4",children:[t("div",{className:"text-right",children:[t("p",{className:"text-sm font-medium",children:["Level ",r.level,r.level2>0&&t("span",{className:"text-muted-foreground",children:[" / ",r.level2]})]}),e("p",{className:"text-xs text-muted-foreground",children:r.gender===0?"Male":"Female"})]}),t(m,{variant:"default",className:"bg-green-500 hover:bg-green-600",children:[e(n,{className:"h-3 w-3 mr-1"}),"Online"]})]})]},r.id))})})]})]})}export{K as default};
