import { Ionicons } from "@expo/vector-icons"; import { ActivityIndicator, Text, View } from "react-native"; import { useSafeAreaInsets } from "react-native-safe-area-context"; import { AppPressable } from "./AppPressable"; interface GlassModalHeaderProps { title: string; onClose: () => void; onAction?: () => void; actionLabel?: string; actionDisabled?: boolean; actionLoading?: boolean; /** Use icon button style (like three-dot menu) instead of text */ actionIcon?: keyof typeof Ionicons.glyphMap; } export function GlassModalHeader({ title, onClose, onAction, actionLabel = "Done", actionDisabled = false, actionLoading = false, actionIcon, }: GlassModalHeaderProps) { const insets = useSafeAreaInsets(); const isDisabled = actionDisabled || actionLoading; return ( {/* Back Button - matching native iOS style */} {/* Title - centered */} {title} {/* Action Button - matching senior's Stack.Header.Menu style */} {onAction ? ( {actionLoading ? ( ) : actionIcon ? ( // Icon button style (like the three-dot menu) ) : ( // Text button style (like "Save", "Done") {actionLabel} )} ) : ( )} ); }