import {ImageSourcePropType, StyleProp, ViewStyle, TouchableOpacityProps, TextStyle, GestureResponderEvent, ImageProps} from 'react-native'; /** * Swipe action configuration (legacy + new declarative) */ export interface SwipeAction { comp: React.ReactNode; color?: string; width?: number; onPress?: () => void; // Support all TouchableOpacity props for declarative API touchableProps?: Omit; } /** * Base props for SwipeableListItem * Extends TouchableOpacityProps to support all touchable behaviors */ export interface SwipeableListItemProps extends Omit { children: React.ReactNode; containerStyle?: StyleProp; backgroundColor?: string; // Selection props selected?: boolean; onSelectChange?: (nextSelected: boolean) => void; isSelection?: boolean; } /** * Avatar section props */ export interface SwipeableListItemAvatarProps extends Omit { source?: ImageSourcePropType; fallbackName?: string; size?: number; style?: StyleProp; } /** * Content section props (name + message preview) */ export interface SwipeableListItemContentProps { children?: React.ReactNode; name?: string; message?: string; messageIcon?: React.ReactNode; messageIconColor?: string; isTyping?: boolean; isDeleted?: boolean; } /** * Metadata section props (timestamp + badges) */ export interface SwipeableListItemMetadataProps { children?: React.ReactNode; timestamp?: string; isPinned?: boolean; pinnedIcon?: React.ReactNode; isMentioned?: boolean; unreadCount?: number; } /** * Swipe actions configuration */ export interface SwipeableListItemSwipeActionsProps { // Left swipe actions readStatus?: 'read' | 'unread'; showPinAction?: boolean; onToggleReadStatus?: () => void; onTogglePin?: () => void; leftActionColors?: { read?: string; pin?: string; }; // Right swipe actions onMute?: () => void; onArchive?: () => void; onMore?: () => void; rightActionColors?: { mute?: string; archive?: string; more?: string; }; // Custom actions leftActions?: SwipeAction[]; rightActions?: SwipeAction[]; } /** * Context value shared across compound components */ export interface SwipeableListItemContextValue { // Visual state backgroundColor?: string; unreadCount?: number; // Interaction handlers (matching TouchableOpacity signature) onPress?: (event: GestureResponderEvent) => void; onLongPress?: (event: GestureResponderEvent) => void; // Selection state selected?: boolean; onSelectChange?: (nextSelected: boolean) => void; isSelection?: boolean; // Swipe configuration swipeConfig?: SwipeableListItemSwipeActionsProps; } /** * Individual swipe action props (extends TouchableOpacity) */ export interface SwipeActionProps extends TouchableOpacityProps { children: React.ReactNode; backgroundColor?: string; width?: number; } /** * Container for left swipe actions */ export interface SwipeLeftActionsProps { children: React.ReactNode; } /** * Container for right swipe actions */ export interface SwipeRightActionsProps { children: React.ReactNode; } /** * Title component props */ export interface SwipeableListItemTitleProps { children: React.ReactNode; numberOfLines?: number; style?: StyleProp; } /** * SubTitle component props */ export interface SwipeableListItemSubTitleProps { children: React.ReactNode; numberOfLines?: number; style?: StyleProp; } /** * Icon component props for metadata */ export interface SwipeableListItemIconProps { children: React.ReactNode; style?: StyleProp; }