'use client';
import { Loader2 } from 'lucide-react';
import { Badge } from '@/components/ui/badge';
import {
Dialog,
DialogContent,
DialogDescription,
DialogHeader,
DialogTitle,
} from '@/components/ui/dialog';
import {
Table,
TableBody,
TableCell,
TableHead,
TableHeader,
TableRow,
} from '@/components/ui/table';
import type { ConfigDiffResult } from '@/lib/services/openflare';
interface DiffDialogProps {
open: boolean;
onOpenChange: (open: boolean) => void;
diff: ConfigDiffResult | null;
loading: boolean;
error: string | null;
}
function DiffChipList({ title, items }: { title: string; items: string[] }) {
return (
{items.length > 0 ? (
{items.map((item) => (
{item}
))}
) : (
无变更
)}
);
}
function renderOptionValue(value: string) {
return value === '' ? '空' : value;
}
export function DiffDialog({
open,
onOpenChange,
diff,
loading,
error,
}: DiffDialogProps) {
return (
);
}