import React from "react"; import { Trash2, Plus, Server, Activity } from "lucide-react"; import { Button } from "@/components/ui"; import type { ClusterInfo } from "@/lib/tauriCommands"; import { removeClusterCmd } from "@/lib/tauriCommands"; interface ClusterListProps { clusters: ClusterInfo[]; onAdd: () => void; onRemove: (clusterId: string) => Promise; } export function ClusterList({ clusters, onAdd, onRemove }: ClusterListProps) { const handleRemove = async (clusterId: string) => { if (window.confirm("Are you sure you want to remove this cluster?")) { await onRemove(clusterId); } }; return (

Clusters

{clusters.length === 0 ? (

No clusters configured

Add a Kubernetes cluster to start managing it

) : (
{clusters.map((cluster) => (

{cluster.name}

ID: {cluster.id}

Context: {cluster.context}

URL: {cluster.cluster_url}

))}
)}
); }