import type { ReactNode } from "react";
import { useTranslation } from "react-i18next";
import { RefreshCw, AlertTriangle, Search } from "lucide-react";
import { Button } from "@/components/button";
import { MetricCard } from "@/components/metric-card";
export interface ManagerCardError {
message: string;
code?: string;
}
/** The frame a host manager card draws: title, refresh, error and empty states. */
export function ManagerCardShell({
title,
icon,
loading,
error,
onRefresh,
empty,
emptyMessage,
children,
headerExtra,
}: {
title: string;
icon: ReactNode;
loading: boolean;
error: ManagerCardError | null;
onRefresh: () => void;
empty?: boolean;
emptyMessage?: string;
children: ReactNode;
headerExtra?: ReactNode;
}) {
const { t } = useTranslation();
return (