import { View, Text, StyleSheet, TouchableOpacity } from "react-native"; import { Ionicons } from "@expo/vector-icons"; import { LinearGradient } from "expo-linear-gradient"; import Animated, { FadeInRight } from "react-native-reanimated"; import type { ResponseWithQuestion } from "../../store"; import { colors, spacing, typography, radius } from "../../theme"; // Premium color palette const ACCENT = colors.premium.gold; const ACCENT_RGBA = "rgba(212, 175, 55, "; const ROSE = colors.premium.rose; const ROSE_RGBA = "rgba(232, 164, 174, "; // Answer colors (semantic) const ANSWER_COLORS = { yes: { color: colors.success, rgba: "rgba(46, 204, 113, ", label: "YES", }, no: { color: colors.error, rgba: "rgba(231, 76, 60, ", label: "NO", }, maybe: { color: colors.warning, rgba: "rgba(243, 156, 18, ", label: "MAYBE", }, }; interface ResponseCardProps { response: ResponseWithQuestion; index: number; onEditPress: () => void; onChatPress?: () => void; } export function ResponseCard({ response, index, onEditPress, onChatPress }: ResponseCardProps) { const answerStyle = ANSWER_COLORS[response.answer]; return ( {/* Subtle gradient background */} {/* Top silk highlight */} {/* Answer badge */} {/* Content */} {response.question.text} {/* Answer tag */} {answerStyle.label} {/* Pack name */} {response.question.pack.name} {/* Right section */} {/* Match indicator with chat link */} {response.has_match && onChatPress && ( )} {/* Edit button */} {/* Premium border */} ); } const styles = StyleSheet.create({ card: { marginBottom: spacing.sm, borderRadius: radius.lg, overflow: "hidden", padding: spacing.md, }, cardSilkHighlight: { position: "absolute", top: 0, left: 0, right: 0, height: 50, }, cardBorder: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0, borderRadius: radius.lg, borderWidth: 1, borderColor: "rgba(255, 255, 255, 0.08)", }, row: { flexDirection: "row", alignItems: "center", }, answerBadge: { width: 40, height: 40, borderRadius: 20, justifyContent: "center", alignItems: "center", borderWidth: 1, marginRight: spacing.md, }, content: { flex: 1, }, questionText: { ...typography.subhead, color: colors.text, fontWeight: "500", marginBottom: spacing.xs, lineHeight: 20, }, metaRow: { flexDirection: "row", alignItems: "center", gap: spacing.sm, flexWrap: "wrap", }, tag: { paddingHorizontal: spacing.sm, paddingVertical: 2, borderRadius: radius.sm, borderWidth: 1, }, tagText: { ...typography.caption2, fontWeight: "700", letterSpacing: 1, }, packBadge: { flexDirection: "row", alignItems: "center", gap: 4, maxWidth: 120, }, packText: { ...typography.caption2, color: colors.textTertiary, }, rightSection: { flexDirection: "row", alignItems: "center", gap: spacing.sm, marginLeft: spacing.sm, }, matchButton: { width: 32, height: 32, borderRadius: 16, backgroundColor: "rgba(233, 69, 96, 0.15)", borderWidth: 1, borderColor: "rgba(233, 69, 96, 0.25)", justifyContent: "center", alignItems: "center", }, editButton: { width: 32, height: 32, borderRadius: 16, backgroundColor: `${ACCENT_RGBA}0.1)`, borderWidth: 1, borderColor: `${ACCENT_RGBA}0.2)`, justifyContent: "center", alignItems: "center", }, });