import { useT } from "@agent-native/core/client/i18n"; import type { Weight } from "@shared/types"; import { IconTrash, IconPencil, IconLoader2, IconScale, } from "@tabler/icons-react"; import { useState } from "react"; import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, } from "@/components/ui/alert-dialog"; import { Button } from "@/components/ui/button"; interface WeightCardProps { weight: Weight; onEdit: (weight: Weight) => void; onDelete: (weight: Weight) => void; isDeleting?: boolean; isPending?: boolean; } export function WeightCard({ weight, onEdit, onDelete, isDeleting, isPending, }: WeightCardProps) { const t = useT(); const [showDeleteConfirm, setShowDeleteConfirm] = useState(false); return (
{weight.notes || t("weight.entry")}