import type { TextStyle, ViewStyle } from 'react-native' import type { ColorPairToken } from '@helpwave/hightide-design/theme-tokens' import type { InteractionState, SimpleStyleResolver, StyleResolverFunction } from '../resolver' import type { IconStyle } from '../../../icons' import type { ThemedPressableState } from './themedPressable' import type { AvatarState, AvatarThemeResolvers } from './avatar' export type ChatMessageDirection = 'incoming' | 'outgoing' export type ChatConversationRowState = InteractionState & { isUnread?: boolean, isSelected?: boolean, } export type ChatConversationRowContentContainerStyle = ViewStyle export type ChatConversationRowHeaderRowStyle = ViewStyle export type ChatConversationRowMessageRowStyle = ViewStyle export type ChatConversationRowTitleStyle = TextStyle export type ChatConversationRowTimestampStyle = TextStyle export type ChatConversationRowPreviewStyle = TextStyle export type ChatConversationRowUnreadBadgeStyle = ViewStyle export type ChatConversationRowUnreadBadgeTextStyle = TextStyle export type ChatConversationRowSentIndicatorStyle = IconStyle export type ChatConversationListStyle = ViewStyle export type ChatConversationListHeaderStyle = ViewStyle export type ChatConversationListFooterStyle = ViewStyle export type ChatThreadHeaderStyle = ViewStyle export type ChatThreadHeaderContentRowStyle = ViewStyle export type ChatThreadHeaderTitleStyle = TextStyle export type ChatThreadHeaderSubtitleStyle = TextStyle export type ChatMessageListStyle = ViewStyle export type ChatMessageBubbleState = { direction: ChatMessageDirection, } export type ChatMessageBubbleContainerStyle = ViewStyle export type ChatMessageBubbleBodyStyle = ViewStyle export type ChatMessageBubbleBodyTextStyle = TextStyle export type ChatMessageBubbleMetaDataContainerStyle = ViewStyle export type ChatMessageBubbleMetaDataStatusContainerStyle = ViewStyle export type ChatMessageBubbleMetaDataTextStyle = TextStyle export type ChatMessageBubbleMetaDataIconStyle = IconStyle export type ChatAttachmentMessageBubbleState = { direction: ChatMessageDirection, } export type PressableContainerStyle = ViewStyle export type PressableStateLayerStyle = ViewStyle export type PressableTextStyle = TextStyle export type PressableIconStyle = IconStyle export type PressableState = ThemedPressableState export type ChatAttachmentMessageBubbleFileIconContainerStyle = ViewStyle export type ChatAttachmentMessageBubbleFileIconStyle = IconStyle export type ChatAttachmentMessageBubbleDownloadIconContainerStyle = ViewStyle export type ChatAttachmentMessageBubbleDownloadIconStyle = IconStyle export type ChatAttachmentMessageBubbleFileNameTextStyle = TextStyle export type ChatAttachmentMessageBubbleFileMetadataTextStyle = TextStyle export type ChatSystemLineState = { color?: ColorPairToken, } export type ChatSystemLineStyle = ViewStyle export type ChatSystemLineTextStyle = TextStyle export type ChatSystemLineIconStyle = IconStyle export type ChatDateDividerStyle = ViewStyle export type ChatDateDividerTextStyle = TextStyle export type ChatQuickReplyChipState = { isActive?: boolean, } export type ChatMessageComposerStyle = ViewStyle export type ChatMessageComposerInputStyle = ViewStyle & TextStyle export type ChatConversationRowThemeResolvers = { pressable: StyleResolverFunction< ChatConversationRowState, { container: StyleResolverFunction< PressableState, PressableContainerStyle >, stateLayer: StyleResolverFunction< PressableState, PressableStateLayerStyle >, text: StyleResolverFunction< PressableState, PressableTextStyle >, icon: StyleResolverFunction< PressableState, PressableIconStyle >, } >, contentContainer: StyleResolverFunction, headerRow: StyleResolverFunction, messageRow: StyleResolverFunction, title: StyleResolverFunction, timestamp: StyleResolverFunction, preview: StyleResolverFunction, unreadBadge: StyleResolverFunction, ChatConversationRowUnreadBadgeStyle>, unreadBadgeText: StyleResolverFunction, ChatConversationRowUnreadBadgeTextStyle>, sentIndicator: StyleResolverFunction, ChatConversationRowSentIndicatorStyle>, avatar: StyleResolverFunction< AvatarState, AvatarThemeResolvers >, } export type ChatConversationListThemeResolvers = { container: StyleResolverFunction, ChatConversationListStyle>, header: StyleResolverFunction, ChatConversationListHeaderStyle>, footer: StyleResolverFunction, ChatConversationListFooterStyle>, } export type ChatThreadHeaderThemeResolvers = { container: StyleResolverFunction, ChatThreadHeaderStyle>, contentRow: StyleResolverFunction, ChatThreadHeaderContentRowStyle>, title: StyleResolverFunction, ChatThreadHeaderTitleStyle>, subtitle: StyleResolverFunction, ChatThreadHeaderSubtitleStyle>, avatar: StyleResolverFunction< AvatarState, AvatarThemeResolvers >, pressable: StyleResolverFunction< Record, { container: StyleResolverFunction< PressableState, PressableContainerStyle >, stateLayer: StyleResolverFunction< PressableState, PressableStateLayerStyle >, text: StyleResolverFunction< PressableState, PressableTextStyle >, icon: StyleResolverFunction< PressableState, PressableIconStyle >, } >, } export type ChatMessageListThemeResolvers = { container: StyleResolverFunction, ChatMessageListStyle>, } export type ChatMessageBubbleThemeResolvers = { container: StyleResolverFunction, body: StyleResolverFunction, bodyText: StyleResolverFunction, metaDataContainer: StyleResolverFunction, metaDataStatusContainer: StyleResolverFunction, metaDataText: StyleResolverFunction, metaDataIcon: StyleResolverFunction, } export type ChatAttachmentMessageBubbleOverridesThemeResolvers = { container: StyleResolverFunction, body: StyleResolverFunction, bodyText: StyleResolverFunction, metaDataContainer: StyleResolverFunction, metaDataStatusContainer: StyleResolverFunction, metaDataText: StyleResolverFunction, metaDataIcon: StyleResolverFunction, } export type ChatAttachmentMessageBubbleThemeResolvers = { chatMessageBubbleOverrides: ChatAttachmentMessageBubbleOverridesThemeResolvers, contentContainer: StyleResolverFunction< ChatAttachmentMessageBubbleState, { container: StyleResolverFunction< PressableState, PressableContainerStyle >, stateLayer: StyleResolverFunction< PressableState, PressableStateLayerStyle >, text: StyleResolverFunction< PressableState, PressableTextStyle >, icon: StyleResolverFunction< PressableState, PressableIconStyle >, } >, fileIconContainer: StyleResolverFunction, fileIcon: StyleResolverFunction, downloadIconContainer: StyleResolverFunction, downloadIcon: StyleResolverFunction, fileNameText: StyleResolverFunction, fileMetadataText: StyleResolverFunction, } export type ChatSystemLineThemeResolvers = { container: StyleResolverFunction, text: StyleResolverFunction, icon: StyleResolverFunction, } export type ChatDateDividerThemeResolvers = { container: StyleResolverFunction, ChatDateDividerStyle>, text: StyleResolverFunction, ChatDateDividerTextStyle>, } export type ChatQuickReplyChipThemeResolvers = { pressable: StyleResolverFunction< ChatQuickReplyChipState, { container: StyleResolverFunction< PressableState, PressableContainerStyle >, stateLayer: StyleResolverFunction< PressableState, PressableStateLayerStyle >, text: StyleResolverFunction< PressableState, PressableTextStyle >, icon: StyleResolverFunction< PressableState, PressableIconStyle >, } >, } export type ChatMessageComposerThemeResolvers = { container: StyleResolverFunction, ChatMessageComposerStyle>, input: StyleResolverFunction, ChatMessageComposerInputStyle>, placeholderColor: SimpleStyleResolver, } export type ChatThemeResolvers = { conversationRow: ChatConversationRowThemeResolvers, conversationList: ChatConversationListThemeResolvers, threadHeader: ChatThreadHeaderThemeResolvers, messageList: ChatMessageListThemeResolvers, messageBubble: ChatMessageBubbleThemeResolvers, attachmentMessageBubble: ChatAttachmentMessageBubbleThemeResolvers, systemLine: ChatSystemLineThemeResolvers, dateDivider: ChatDateDividerThemeResolvers, quickReplyChip: ChatQuickReplyChipThemeResolvers, messageComposer: ChatMessageComposerThemeResolvers, }