'use client' import type { MacMiniStatus } from '../types' export default function PowerControls({ status, loading, actionLoading, message, error, onWake, onRestart, onShutdown, onRefresh, }: { status: MacMiniStatus | null loading: boolean actionLoading: string | null message: string | null error: string | null onWake: () => void onRestart: () => void onShutdown: () => void onRefresh: () => void }) { const getStatusBadge = (online: boolean) => { return online ? 'px-3 py-1 rounded-full text-sm font-semibold bg-green-100 text-green-800' : 'px-3 py-1 rounded-full text-sm font-semibold bg-red-100 text-red-800' } const getServiceStatus = (ok: boolean) => { return ok ? 'flex items-center gap-2 text-green-600' : 'flex items-center gap-2 text-red-500' } return (
IP: {status?.ip || '192.168.178.100'}