/* * File: AIPredictionDetailScreen.tsx * Description: AI Prediction detail screen with suggestion form for updating AI findings * Design & Developed by Tech4Biz Solutions * Copyright (c) Spurrin Innovations. All rights reserved. */ import React, { useState, useCallback, useEffect } from 'react'; import { View, Text, StyleSheet, ScrollView, TextInput, TouchableOpacity, TouchableWithoutFeedback, Alert, SafeAreaView, StatusBar, KeyboardAvoidingView, Platform, Dimensions, } from 'react-native'; import DateTimePicker from '@react-native-community/datetimepicker'; import Icon from 'react-native-vector-icons/Feather'; import { theme } from '../../../theme'; import { useAppDispatch, useAppSelector } from '../../../store/hooks'; import { CustomModal } from '../../../shared/components/CustomModal'; import Toast from 'react-native-toast-message'; import { aiPredictionAPI } from '../services/aiPredictionAPI'; import { showError } from '../../../shared/utils/toast'; // Import Redux selectors import { selectCurrentCase, selectIsLoadingCaseDetails, selectError } from '../redux'; import { selectUser } from '../../Auth/redux/authSelectors'; // Import types import type { AIPredictionDetailsScreenProps } from '../navigation/navigationTypes'; import type { AIPredictionCase } from '../types'; // Get screen dimensions const { width: screenWidth, height: screenHeight } = Dimensions.get('window'); // ============================================================================ // ENUMS & TYPES // ============================================================================ /** * Suggestion Type Enum * * Purpose: Define available suggestion types as specified by user */ export enum SuggestionType { TREATMENT = 'Treatment', FOLLOW_UP = 'Follow Up', DIAGNOSIS = 'Diagnosis', OTHER = 'Other' } /** * Priority Enum * * Purpose: Define priority levels as specified by user */ export enum Priority { LOW = 'Low', MEDIUM = 'Medium', HIGH = 'High', CRITICAL = 'Critical' } /** * Related Finding Interface * * Purpose: Structure for key-value pairs in related findings */ interface RelatedFinding { key: string; value: string; } /** * Suggestion Form Data Interface * * Purpose: Structure for suggestion form data */ interface SuggestionFormData { patientId: string; suggestionType: SuggestionType; title: string; suggestionText: string; confidence: string; priority: Priority; category: string; costEstimate: string; timeEstimate: string; expiresAt: Date | null; aiModelVersion: string; evidenceSources: string; contraindications: string; tags: string; relatedFindings: RelatedFinding[]; } /** * API Response Interface * * Purpose: Structure for API response data */ interface APIResponse { success: boolean; message: string; data: { created_at: string; updated_at: string; status: string; suggestion_id: string; }; } // ============================================================================ // CONSTANTS // ============================================================================ const SUGGESTION_TYPE_OPTIONS = [ { label: 'Treatment', value: SuggestionType.TREATMENT, icon: 'activity', color: '#4CAF50' }, { label: 'Follow Up', value: SuggestionType.FOLLOW_UP, icon: 'calendar', color: '#2196F3' }, { label: 'Diagnosis', value: SuggestionType.DIAGNOSIS, icon: 'search', color: '#FF9800' }, { label: 'Other', value: SuggestionType.OTHER, icon: 'more-horizontal', color: '#9C27B0' }, ]; const PRIORITY_OPTIONS = [ { label: 'Low', value: Priority.LOW, color: '#4CAF50', bgColor: '#E8F5E8' }, { label: 'Medium', value: Priority.MEDIUM, color: '#FF9800', bgColor: '#FFF3E0' }, { label: 'High', value: Priority.HIGH, color: '#FF5722', bgColor: '#FFEBEE' }, { label: 'Critical', value: Priority.CRITICAL, color: '#F44336', bgColor: '#FFEBEE' }, ]; // ============================================================================ // AI PREDICTION DETAIL SCREEN COMPONENT // ============================================================================ /** * AIPredictionDetailScreen Component * * Purpose: Display AI prediction details and allow suggestion updates * * Features: * - View complete AI prediction details * - Create/update suggestions for AI findings * - Form validation and submission * - Dynamic related findings management * - Date picker for expiration * - Dropdown selections for types and priorities * - Responsive design with keyboard handling * - Enhanced visual design with modern mobile styling */ const AIPredictionDetailScreen: React.FC = ({ navigation, route }) => { // ============================================================================ // REDUX STATE // ============================================================================ const dispatch = useAppDispatch(); const user = useAppSelector(selectUser); const currentCase = useAppSelector(selectCurrentCase); const isLoading = useAppSelector(selectIsLoadingCaseDetails); const error = useAppSelector(selectError); // ============================================================================ // LOCAL STATE // ============================================================================ const [formData, setFormData] = useState({ patientId: route.params.caseId, suggestionType: SuggestionType.TREATMENT, title: '', suggestionText: '', confidence: '0.99', priority: Priority.HIGH, category: 'Radiology', costEstimate: '', timeEstimate: '1-2 hours', expiresAt: null, aiModelVersion: 'v2.1.0', evidenceSources: '', contraindications: '', tags: '', relatedFindings: [ { key: 'finding_label', value: 'midline shift' }, { key: 'finding_type', value: 'no_pathology' }, { key: 'clinical_urgency', value: 'urgent' }, { key: 'primary_severity', value: 'high' }, { key: 'modality', value: '/DX' }, { key: 'institution', value: 'Brighton Radiology' }, ], }); const [showSuggestionTypeDropdown, setShowSuggestionTypeDropdown] = useState(false); const [showPriorityDropdown, setShowPriorityDropdown] = useState(false); const [showDatePicker, setShowDatePicker] = useState(false); const [isSubmitting, setIsSubmitting] = useState(false); const [showSuccessModal, setShowSuccessModal] = useState(false); const [apiResponse, setApiResponse] = useState(null); // ============================================================================ // EFFECTS // ============================================================================ /** * Initialize form data from current case */ useEffect(() => { if (currentCase) { setFormData(prev => ({ ...prev, patientId: currentCase.patid, title: `Recommended CT Scan`, suggestionText: `Describe your suggestion with clinical reasoning...`, confidence: currentCase.prediction.confidence_score.toFixed(4), })); } }, [currentCase]); // ============================================================================ // EVENT HANDLERS // ============================================================================ /** * Handle form field changes */ const handleFieldChange = useCallback((field: keyof SuggestionFormData, value: any) => { setFormData(prev => ({ ...prev, [field]: value, })); }, []); /** * Handle dropdown selection */ const handleDropdownSelect = useCallback((field: keyof SuggestionFormData, value: any) => { setFormData(prev => ({ ...prev, [field]: value, })); setShowSuggestionTypeDropdown(false); setShowPriorityDropdown(false); }, []); /** * Close all dropdowns */ const closeAllDropdowns = useCallback(() => { setShowSuggestionTypeDropdown(false); setShowPriorityDropdown(false); }, []); /** * Handle date selection */ const handleDateChange = useCallback((event: any, selectedDate?: Date) => { setShowDatePicker(false); if (selectedDate) { handleFieldChange('expiresAt', selectedDate); } }, [handleFieldChange]); /** * Add new related finding */ const handleAddRelatedFinding = useCallback(() => { setFormData(prev => ({ ...prev, relatedFindings: [...prev.relatedFindings, { key: '', value: '' }], })); }, []); /** * Remove related finding */ const handleRemoveRelatedFinding = useCallback((index: number) => { setFormData(prev => ({ ...prev, relatedFindings: prev.relatedFindings.filter((_, i) => i !== index), })); }, []); /** * Update related finding */ const handleUpdateRelatedFinding = useCallback((index: number, field: 'key' | 'value', value: string) => { setFormData(prev => ({ ...prev, relatedFindings: prev.relatedFindings.map((finding, i) => i === index ? { ...finding, [field]: value } : finding ), })); }, []); /** * Validate form data */ const validateForm = useCallback((): boolean => { if (!formData.title.trim()) { showError('Validation Error', 'Title is required'); return false; } if (!formData.suggestionText.trim()) { showError('Validation Error', 'Suggestion text is required'); return false; } if (!formData.patientId.trim()) { showError('Validation Error', 'Patient ID is required'); return false; } // Validate expiry date - must be in the future if (formData.expiresAt) { const now = new Date(); const expiryDate = new Date(formData.expiresAt); if (expiryDate <= now) { showError('Validation Error', 'Expiry date must be in the future'); return false; } } return true; }, [formData]); /** * Handle form submission */ const handleSubmitSuggestion = useCallback(async () => { if (!validateForm()) return; setIsSubmitting(true); try { // Prepare API payload according to backend structure const apiPayload = { patid: formData.patientId, suggestion_type: formData.suggestionType.toLowerCase().replace(' ', '_'), suggestion_title: formData.title, suggestion_text: formData.suggestionText, confidence_score: parseFloat(formData.confidence), priority_level: formData.priority.toLowerCase(), category: formData.category, related_findings: formData.relatedFindings.reduce((acc, finding) => { if (finding.key && finding.value) { acc[finding.key] = finding.value; } return acc; }, {} as Record), evidence_sources: formData.evidenceSources ? formData.evidenceSources.split(',').map(s => s.trim()) : [], contraindications: formData.contraindications || 'none', cost_estimate: formData.costEstimate ? parseFloat(formData.costEstimate) : 0, time_estimate: formData.timeEstimate, expires_at: formData.expiresAt ? formData.expiresAt.toISOString() : null, tags: formData.tags ? formData.tags.split(',').map(s => s.trim()) : [], ai_model_version: formData.aiModelVersion, }; // Call centralized API service const response = await aiPredictionAPI.submitAISuggestion(apiPayload, user?.access_token || ''); console.log('feed back response',response) if (response.ok && response.data) { const responseData = response.data as APIResponse; if (responseData.success) { // Show success toast Toast.show({ type: 'success', text1: 'Success!', text2: responseData.message || 'Suggestion submitted successfully', position: 'top', visibilityTime: 4000, }); // Store API response data setApiResponse(responseData.data); // Show success modal with API response data setShowSuccessModal(true); } else { throw new Error(responseData.message || 'Failed to submit suggestion'); } } else { throw new Error(response.problem || 'HTTP request failed'); } } catch (error) { console.error('Submission Error:', error); // Show error toast Toast.show({ type: 'error', text1: 'Error', text2: error instanceof Error ? error.message : 'Failed to submit suggestion. Please try again.', position: 'top', visibilityTime: 5000, }); } finally { setIsSubmitting(false); } }, [formData, validateForm, user]); /** * Handle success modal close */ const handleSuccessModalClose = useCallback(() => { setShowSuccessModal(false); navigation.goBack(); }, [navigation]); /** * Handle back navigation */ const handleGoBack = useCallback(() => { navigation.goBack(); }, [navigation]); // ============================================================================ // RENDER FUNCTIONS // ============================================================================ /** * Render enhanced header */ const renderHeader = () => ( AI Prediction Details Create Medical Suggestion ); /** * Render enhanced dropdown options */ const renderDropdownOptions = useCallback(( options: Array<{ label: string; value: any; color?: string; bgColor?: string; icon?: string }>, currentValue: any, onSelect: (value: any) => void ) => ( {options.map((option) => ( onSelect(option.value)} > {option.icon && ( )} {option.label} {currentValue === option.value && ( )} ))} ), []); /** * Render enhanced related findings section */ const renderRelatedFindings = useCallback(() => ( Related Findings {formData.relatedFindings.map((finding, index) => ( handleUpdateRelatedFinding(index, 'key', value)} placeholder="Finding Key" placeholderTextColor={theme.colors.textMuted} /> handleUpdateRelatedFinding(index, 'value', value)} placeholder="Finding Value" placeholderTextColor={theme.colors.textMuted} /> handleRemoveRelatedFinding(index)} accessibilityRole="button" accessibilityLabel="Remove related finding" > ))} Add Finding ), [formData.relatedFindings, handleUpdateRelatedFinding, handleRemoveRelatedFinding, handleAddRelatedFinding]); // ============================================================================ // RENDER // ============================================================================ return ( {/* Enhanced Header */} {renderHeader()} {/* Patient ID Card */} Patient Information Patient ID {/* Suggestion Type Card */} Suggestion Type Type setShowSuggestionTypeDropdown(!showSuggestionTypeDropdown)} > opt.value === formData.suggestionType)?.icon as any || 'edit-3'} size={18} color={SUGGESTION_TYPE_OPTIONS.find(opt => opt.value === formData.suggestionType)?.color || theme.colors.primary} /> {formData.suggestionType} {showSuggestionTypeDropdown && renderDropdownOptions( SUGGESTION_TYPE_OPTIONS, formData.suggestionType, (value) => handleDropdownSelect('suggestionType', value) )} {/* Main Suggestion Card */} Suggestion Details {/* Title */} Title handleFieldChange('title', value)} placeholder="Recommended CT Scan" placeholderTextColor={theme.colors.textMuted} /> {/* Suggestion Text */} Suggestion Text handleFieldChange('suggestionText', value)} placeholder="Describe your suggestion with clinical reasoning..." placeholderTextColor={theme.colors.textMuted} multiline numberOfLines={4} textAlignVertical="top" /> {/* Confidence & Priority Card */} Assessment & Priority {/* Row 1: Confidence and Priority */} Confidence (0-1) handleFieldChange('confidence', value)} placeholder="0.9979" placeholderTextColor={theme.colors.textMuted} keyboardType="numeric" /> Priority setShowPriorityDropdown(!showPriorityDropdown)} > opt.value === formData.priority)?.bgColor || theme.colors.backgroundAlt } ]} /> {formData.priority} {showPriorityDropdown && renderDropdownOptions( PRIORITY_OPTIONS, formData.priority, (value) => handleDropdownSelect('priority', value) )} {/* Category & Cost Card */} Classification & Resources {/* Row 2: Category and Cost Estimate */} Category handleFieldChange('category', value)} placeholder="Radiology" placeholderTextColor={theme.colors.textMuted} /> Cost Estimate (USD) handleFieldChange('costEstimate', value)} placeholder="Enter cost" placeholderTextColor={theme.colors.textMuted} keyboardType="numeric" /> {/* Time & Expiry Card */} Timeline {/* Row 3: Time Estimate and Expires At */} Time Estimate handleFieldChange('timeEstimate', value)} placeholder="1-2 hours" placeholderTextColor={theme.colors.textMuted} /> Expires At setShowDatePicker(true)} > {formData.expiresAt ? formData.expiresAt.toLocaleDateString() : 'Select date' } Date must be in the future {/* AI Model & Evidence Card */} AI Model & Evidence {/* AI Model Version */} AI Model Version handleFieldChange('aiModelVersion', value)} placeholder="v2.1.0" placeholderTextColor={theme.colors.textMuted} /> {/* Evidence Sources */} Evidence Sources (comma-separated) handleFieldChange('evidenceSources', value)} placeholder="Evidence A, Protocol B" placeholderTextColor={theme.colors.textMuted} /> {/* Contraindications & Tags Card */} Safety & Organization {/* Contraindications */} Contraindications handleFieldChange('contraindications', value)} placeholder="Any known contraindications..." placeholderTextColor={theme.colors.textMuted} multiline numberOfLines={3} textAlignVertical="top" /> {/* Tags */} Tags (comma-separated) handleFieldChange('tags', value)} placeholder="emergency, chest, pulmonary" placeholderTextColor={theme.colors.textMuted} /> {/* Related Findings */} {renderRelatedFindings()} {/* Submit Button */} {isSubmitting ? ( Submitting... ) : ( Submit Suggestion )} {/* Date Picker */} {showDatePicker && ( )} {/* Success Modal */} {/* Toast Messages */} ); }; // ============================================================================ // STYLES // ============================================================================ const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: '#F8FAFC', }, header: { flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', paddingHorizontal: theme.spacing.md, paddingVertical: theme.spacing.lg, backgroundColor: theme.colors.background, borderBottomWidth: 1, borderBottomColor: '#E2E8F0', shadowColor: '#000000', shadowOffset: { width: 0, height: 1 }, shadowOpacity: 0.06, shadowRadius: 2, elevation: 2, }, backButton: { padding: theme.spacing.sm, backgroundColor: '#F1F5F9', borderRadius: theme.borderRadius.medium, }, headerContent: { flex: 1, alignItems: 'center', }, headerTitle: { fontSize: theme.typography.fontSize.displaySmall, fontFamily: theme.typography.fontFamily.bold, color: theme.colors.textPrimary, marginBottom: 2, }, headerSubtitle: { fontSize: theme.typography.fontSize.bodySmall, fontFamily: theme.typography.fontFamily.regular, color: theme.colors.textSecondary, }, headerSpacer: { width: 40, }, keyboardAvoidingView: { flex: 1, position: 'relative', }, scrollView: { flex: 1, }, scrollContent: { padding: theme.spacing.md, paddingBottom: theme.spacing.xl, }, mainContent: { flex: 1, }, // Card Styles patientCard: { backgroundColor: theme.colors.background, borderRadius: theme.borderRadius.large, padding: theme.spacing.lg, marginBottom: theme.spacing.lg, shadowColor: '#000000', shadowOffset: { width: 0, height: 1 }, shadowOpacity: 0.05, shadowRadius: 4, elevation: 2, borderLeftWidth: 4, borderLeftColor: theme.colors.primary, }, formCard: { backgroundColor: theme.colors.background, borderRadius: theme.borderRadius.large, padding: theme.spacing.lg, marginBottom: theme.spacing.lg, shadowColor: '#000000', shadowOffset: { width: 0, height: 1 }, shadowOpacity: 0.05, shadowRadius: 4, elevation: 2, }, cardHeader: { flexDirection: 'row', alignItems: 'center', marginBottom: theme.spacing.md, paddingBottom: theme.spacing.sm, borderBottomWidth: 1, borderBottomColor: '#E2E8F0', }, cardTitle: { fontSize: theme.typography.fontSize.bodyLarge, fontFamily: theme.typography.fontFamily.bold, color: theme.colors.textPrimary, marginLeft: theme.spacing.sm, }, patientCardHeader: { flexDirection: 'row', alignItems: 'center', marginBottom: theme.spacing.md, }, patientCardTitle: { fontSize: theme.typography.fontSize.bodyLarge, fontFamily: theme.typography.fontFamily.bold, color: theme.colors.textPrimary, marginLeft: theme.spacing.sm, }, // Form Styles formGroup: { marginBottom: theme.spacing.md, }, formGroupHalf: { flex: 1, }, formRow: { flexDirection: 'row', gap: theme.spacing.md, }, label: { fontSize: theme.typography.fontSize.bodyMedium, fontFamily: theme.typography.fontFamily.medium, color: theme.colors.textPrimary, marginBottom: theme.spacing.sm, }, input: { borderWidth: 1, borderColor: theme.colors.border, borderRadius: theme.borderRadius.medium, paddingHorizontal: theme.spacing.md, paddingVertical: theme.spacing.sm, fontSize: theme.typography.fontSize.bodyMedium, fontFamily: theme.typography.fontFamily.regular, color: theme.colors.textPrimary, backgroundColor: theme.colors.background, }, enhancedInput: { borderWidth: 1, borderColor: '#E2E8F0', borderRadius: theme.borderRadius.medium, paddingHorizontal: theme.spacing.md, paddingVertical: theme.spacing.md, fontSize: theme.typography.fontSize.bodyMedium, fontFamily: theme.typography.fontFamily.regular, color: theme.colors.textPrimary, backgroundColor: '#FFFFFF', shadowColor: '#000000', shadowOffset: { width: 0, height: 1 }, shadowOpacity: 0.03, shadowRadius: 1, elevation: 1, }, disabledInput: { backgroundColor: '#F8FAFC', color: theme.colors.textSecondary, borderColor: '#E2E8F0', }, textArea: { height: 100, textAlignVertical: 'top', }, // Dropdown Styles dropdownContainer: { position: 'relative', }, dropdown: { flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', borderWidth: 1, borderColor: theme.colors.border, borderRadius: theme.borderRadius.medium, paddingHorizontal: theme.spacing.md, paddingVertical: theme.spacing.sm, backgroundColor: theme.colors.background, }, enhancedDropdown: { flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', borderWidth: 1, borderColor: '#E2E8F0', borderRadius: theme.borderRadius.medium, paddingHorizontal: theme.spacing.md, paddingVertical: theme.spacing.md, backgroundColor: '#FFFFFF', shadowColor: '#000000', shadowOffset: { width: 0, height: 1 }, shadowOpacity: 0.03, shadowRadius: 1, elevation: 1, }, dropdownContent: { flexDirection: 'row', alignItems: 'center', flex: 1, }, dropdownText: { fontSize: theme.typography.fontSize.bodyMedium, fontFamily: theme.typography.fontFamily.regular, color: theme.colors.textPrimary, marginLeft: theme.spacing.sm, }, dropdownOptions: { position: 'absolute', top: '100%', left: 0, right: 0, borderWidth: 1, borderColor: '#E2E8F0', borderRadius: theme.borderRadius.medium, backgroundColor: '#FFFFFF', marginTop: theme.spacing.xs, shadowColor: '#000000', shadowOffset: { width: 0, height: 2 }, shadowOpacity: 0.1, shadowRadius: 4, elevation: 3, }, dropdownOption: { flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', paddingHorizontal: theme.spacing.md, paddingVertical: theme.spacing.md, borderBottomWidth: 1, borderBottomColor: '#F1F5F9', }, dropdownOptionContent: { flexDirection: 'row', alignItems: 'center', flex: 1, }, dropdownOptionIcon: { marginRight: theme.spacing.sm, }, dropdownOptionSelected: { backgroundColor: '#F8FAFC', }, dropdownOptionText: { fontSize: theme.typography.fontSize.bodyMedium, fontFamily: theme.typography.fontFamily.regular, color: theme.colors.textPrimary, }, dropdownOptionTextSelected: { color: theme.colors.primary, fontFamily: theme.typography.fontFamily.medium, }, priorityIndicator: { width: 12, height: 12, borderRadius: 6, marginRight: theme.spacing.sm, }, // Date Input Styles dateInput: { flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', borderWidth: 1, borderColor: theme.colors.border, borderRadius: theme.borderRadius.medium, paddingHorizontal: theme.spacing.md, paddingVertical: theme.spacing.sm, backgroundColor: theme.colors.background, }, enhancedDateInput: { flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', borderWidth: 1, borderColor: '#E2E8F0', borderRadius: theme.borderRadius.medium, paddingHorizontal: theme.spacing.md, paddingVertical: theme.spacing.md, backgroundColor: '#FFFFFF', shadowColor: '#000000', shadowOffset: { width: 0, height: 1 }, shadowOpacity: 0.03, shadowRadius: 1, elevation: 1, }, dateText: { fontSize: theme.typography.fontSize.bodyMedium, fontFamily: theme.typography.fontFamily.regular, color: theme.colors.textPrimary, flex: 1, marginLeft: theme.spacing.sm, }, placeholderText: { color: theme.colors.textMuted, }, helperText: { fontSize: theme.typography.fontSize.bodySmall, fontFamily: theme.typography.fontFamily.regular, color: theme.colors.textMuted, marginTop: theme.spacing.xs, fontStyle: 'italic', }, // Section Styles sectionHeader: { flexDirection: 'row', alignItems: 'center', marginBottom: theme.spacing.md, }, sectionTitle: { fontSize: theme.typography.fontSize.bodyLarge, fontFamily: theme.typography.fontFamily.bold, color: theme.colors.textPrimary, marginLeft: theme.spacing.sm, }, // Related Findings Styles relatedFindingsContainer: { backgroundColor: theme.colors.background, borderRadius: theme.borderRadius.large, padding: theme.spacing.lg, marginBottom: theme.spacing.lg, shadowColor: '#000000', shadowOffset: { width: 0, height: 1 }, shadowOpacity: 0.05, shadowRadius: 4, elevation: 2, }, relatedFindingsContent: { marginTop: theme.spacing.sm, }, relatedFindingItem: { flexDirection: 'row', alignItems: 'center', gap: theme.spacing.sm, marginBottom: theme.spacing.sm, }, relatedFindingInputs: { flex: 1, flexDirection: 'row', gap: theme.spacing.sm, }, relatedFindingKey: { flex: 1, backgroundColor: '#F8FAFC', borderColor: '#E2E8F0', }, relatedFindingValue: { flex: 1, backgroundColor: '#F8FAFC', borderColor: '#E2E8F0', }, addButton: { backgroundColor: theme.colors.primary, borderRadius: theme.borderRadius.medium, paddingHorizontal: theme.spacing.md, paddingVertical: theme.spacing.sm, alignItems: 'center', alignSelf: 'flex-start', flexDirection: 'row', gap: theme.spacing.sm, shadowColor: theme.colors.primary, shadowOffset: { width: 0, height: 1 }, shadowOpacity: 0.2, shadowRadius: 2, elevation: 2, }, addButtonText: { fontSize: theme.typography.fontSize.bodyMedium, fontFamily: theme.typography.fontFamily.medium, color: theme.colors.background, }, removeButton: { padding: theme.spacing.sm, justifyContent: 'center', alignItems: 'center', backgroundColor: '#FEF2F2', borderRadius: theme.borderRadius.medium, }, // Submit Button Styles submitButton: { backgroundColor: theme.colors.primary, borderRadius: theme.borderRadius.large, paddingVertical: theme.spacing.lg, alignItems: 'center', marginTop: theme.spacing.xl, shadowColor: theme.colors.primary, shadowOffset: { width: 0, height: 2 }, shadowOpacity: 0.2, shadowRadius: 4, elevation: 4, }, submitButtonDisabled: { backgroundColor: theme.colors.textMuted, shadowOpacity: 0.1, }, submitButtonContent: { flexDirection: 'row', alignItems: 'center', gap: theme.spacing.sm, }, submitButtonText: { fontSize: theme.typography.fontSize.bodyLarge, fontFamily: theme.typography.fontFamily.bold, color: theme.colors.background, }, spinningIcon: { // Add rotation animation if needed }, }); export default AIPredictionDetailScreen; /* * End of File: AIPredictionDetailScreen.tsx * Design & Developed by Tech4Biz Solutions * Copyright (c) Spurrin Innovations. All rights reserved. */