import { View, StyleSheet } from "react-native"; import { Text } from "@/components/ui/Text"; import { MaterialIcons } from "@expo/vector-icons"; import { Card } from "@/components/ui/Cards"; import { Badge } from "@/components/ui/Badge"; import type { HistoryCard } from "@/lib/history/types"; import type { CareAction } from "@/lib/api"; import { Spacing } from "@/constants/theme"; import { router } from "expo-router"; type Props = { card: HistoryCard & { raw: CareAction } }; export function AppointmentHistoryCard({ card }: Props) { const time = new Date(card.timestamp).toLocaleTimeString("pt-BR", { hour: "2-digit", minute: "2-digit", }); return ( router.push(`/care-actions/${card.raw.id}`)} > {card.title} {time} {card.summary ? ( {card.summary} ) : null} {card.badge ? ( ) : null} ); } const styles = StyleSheet.create({ card: { padding: Spacing.cardGap }, row: { flexDirection: "row", alignItems: "flex-start", gap: 12 }, iconWrap: { width: 40, height: 40, borderRadius: 20, alignItems: "center", justifyContent: "center", marginTop: 1, }, iconBg: { backgroundColor: "#DBEAFE" }, body: { flex: 1 }, titleRow: { flexDirection: "row", justifyContent: "space-between", alignItems: "center", marginBottom: 2, }, title: { fontSize: 15, fontWeight: "400" }, time: { fontSize: 13, opacity: 0.45 }, summary: { fontSize: 13, opacity: 0.6, lineHeight: 18, marginBottom: 6 }, badge: { alignSelf: "flex-start", marginTop: 4 }, });