import React from "react"; import { View, Text, StyleSheet, TouchableOpacity, Platform, } from "react-native"; import { Ionicons } from "@expo/vector-icons"; import { Trip, TRIP_STATUS_CONFIG } from "./types"; interface TripCardProps { trip: Trip; onPress?: () => void; } export default function TripCard({ trip, onPress }: TripCardProps) { const statusConfig = TRIP_STATUS_CONFIG[trip.status]; return ( {/* Header */} {trip.title} {trip.code} {statusConfig.label} {/* Info Grid */} Tàu {trip.vessel} ({trip.vesselCode}) Khởi hành {trip.departureDate} Trở về {trip.returnDate || "-"} Thời gian {trip.duration} ); } const styles = StyleSheet.create({ card: { backgroundColor: "#FFFFFF", borderRadius: 12, padding: 16, marginBottom: 12, shadowColor: "#000", shadowOffset: { width: 0, height: 2, }, shadowOpacity: 0.05, shadowRadius: 8, elevation: 2, borderWidth: 1, borderColor: "#F3F4F6", }, header: { flexDirection: "row", justifyContent: "space-between", alignItems: "flex-start", marginBottom: 16, }, headerLeft: { flexDirection: "row", alignItems: "center", flex: 1, }, titleContainer: { marginLeft: 12, flex: 1, }, title: { fontSize: 16, fontWeight: "600", color: "#111827", marginBottom: 2, fontFamily: Platform.select({ ios: "System", android: "Roboto", default: "System", }), }, code: { fontSize: 14, color: "#6B7280", fontFamily: Platform.select({ ios: "System", android: "Roboto", default: "System", }), }, badge: { paddingHorizontal: 12, paddingVertical: 4, borderRadius: 12, }, badgeText: { fontSize: 12, fontWeight: "500", fontFamily: Platform.select({ ios: "System", android: "Roboto", default: "System", }), }, infoGrid: { gap: 12, }, infoRow: { flexDirection: "row", justifyContent: "space-between", alignItems: "center", }, label: { fontSize: 14, color: "#6B7280", fontFamily: Platform.select({ ios: "System", android: "Roboto", default: "System", }), }, value: { fontSize: 14, color: "#111827", fontWeight: "500", textAlign: "right", fontFamily: Platform.select({ ios: "System", android: "Roboto", default: "System", }), }, duration: { color: "#3B82F6", }, });