'use client'; import { Button } from './ui/button'; import { StatusBadge } from './Badge'; import { getContrastColor } from '../../lib/colorUtils'; interface InstalledScript { id: number; script_name: string; script_path: string; container_id: string | null; server_id: number | null; server_name: string | null; server_ip: string | null; server_user: string | null; server_password: string | null; server_color: string | null; installation_date: string; status: 'in_progress' | 'success' | 'failed'; output_log: string | null; } interface ScriptInstallationCardProps { script: InstalledScript; isEditing: boolean; editFormData: { script_name: string; container_id: string }; onInputChange: (field: 'script_name' | 'container_id', value: string) => void; onEdit: () => void; onSave: () => void; onCancel: () => void; onUpdate: () => void; onDelete: () => void; isUpdating: boolean; isDeleting: boolean; } export function ScriptInstallationCard({ script, isEditing, editFormData, onInputChange, onEdit, onSave, onCancel, onUpdate, onDelete, isUpdating, isDeleting }: ScriptInstallationCardProps) { const formatDate = (dateString: string) => { return new Date(dateString).toLocaleString(); }; return (