import{jsxs as e,jsx as r}from"react/jsx-runtime";import{B as f}from"./badge-CFi7bqqA.js";import{B as i}from"./button-BvFBRYHq.js";import{Server as p,Cog as x,Loader2 as t,Play as v,StopCircle as c}from"lucide-react";import"@radix-ui/react-slot";import"class-variance-authority";import"./utils-CMbmcP35.js";import"clsx";import"tailwind-merge";function B({runningCount:m,totalCount:l,startingAll:s,stoppingAll:a,onSettingsClick:o,onStartAll:n,onImmediateStopAll:d,onTimerStopAll:h}){return e("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[e("div",{children:[e("h2",{className:"flex items-center gap-2 text-xl font-bold tracking-tight",children:[r(p,{className:"h-5 w-5 text-blue-500"}),"Server Control"]}),r("p",{className:"text-muted-foreground text-sm",children:"Monitor and control game server processes"})]}),e("div",{className:"flex flex-wrap items-center gap-2",children:[e(i,{variant:"outline",size:"sm",onClick:o,children:[r(x,{className:"mr-2 h-4 w-4"}),"Settings"]}),e(f,{variant:"outline",className:"px-3 text-sm",children:[m," / ",l," Running"]}),m<l&&e(i,{variant:"default",size:"sm",className:"bg-green-600 hover:bg-green-700",onClick:n,disabled:s||a,children:[s?r(t,{className:"mr-1 h-4 w-4 animate-spin"}):r(v,{className:"mr-1 h-4 w-4 fill-current"}),"Start All"]}),m>0&&e("div",{className:"flex items-center gap-2",children:[e(i,{variant:"outline",size:"sm",onClick:d,disabled:a||s,title:"Immediate Stop All Processes",children:[a?r(t,{className:"mr-1 h-4 w-4 animate-spin"}):r(c,{className:"mr-1 h-4 w-4"}),"Immediate Stop"]}),e(i,{variant:"destructive",size:"sm",onClick:h,disabled:a||s,children:[a?r(t,{className:"mr-1 h-4 w-4 animate-spin"}):r(c,{className:"mr-1 h-4 w-4"}),"Stop All (Timer)"]})]})]})]})}export{B as ServerControlHeader};
