import { IconSymbol } from "@/components/ui/icon-symbol"; import React from "react"; import { Modal, ScrollView, Text, TouchableOpacity, View } from "react-native"; import styles from "./style/CrewDetailModal.styles"; // --------------------------- // 🧩 Interface // --------------------------- interface CrewMember { id: string; maDinhDanh: string; ten: string; chucVu: string; ngaySinh?: string; cccd?: string; soDienThoai?: string; diaChi?: string; ngayVaoLam?: string; trinhDoChuyenMon?: string; bangCap?: string; tinhTrang?: string; } interface CrewDetailModalProps { visible: boolean; onClose: () => void; crewData: CrewMember | null; } // --------------------------- // 👤 Component Modal // --------------------------- const CrewDetailModal: React.FC = ({ visible, onClose, crewData, }) => { if (!crewData) return null; const infoItems = [ { label: "Mã định danh", value: crewData.maDinhDanh }, { label: "Họ và tên", value: crewData.ten }, { label: "Chức vụ", value: crewData.chucVu }, { label: "Ngày sinh", value: crewData.ngaySinh || "Chưa cập nhật" }, { label: "CCCD/CMND", value: crewData.cccd || "Chưa cập nhật" }, { label: "Số điện thoại", value: crewData.soDienThoai || "Chưa cập nhật" }, { label: "Địa chỉ", value: crewData.diaChi || "Chưa cập nhật" }, { label: "Ngày vào làm", value: crewData.ngayVaoLam || "Chưa cập nhật" }, { label: "Trình độ chuyên môn", value: crewData.trinhDoChuyenMon || "Chưa cập nhật", }, { label: "Bằng cấp", value: crewData.bangCap || "Chưa cập nhật" }, { label: "Tình trạng", value: crewData.tinhTrang || "Đang làm việc" }, ]; return ( {/* Header */} Thông tin thuyền viên {/* Content */} {infoItems.map((item, index) => ( {item.label} {item.value} ))} ); }; export default CrewDetailModal;