import { createSignal, For, Show, Switch, Match } from 'solid-js' import { Avatar } from '../avatars/Avatar' import { isMobile } from '@/utils/isMobileSignal' import { InputSubmitContent, RecordingInputSubmitContent, TextInputSubmitContent, } from '@/types' import { Modal } from '../Modal' import { isNotEmpty } from '@indite.io/lib' import { FilePreview } from '@/features/blocks/inputs/fileUpload/components/FilePreview' import clsx from 'clsx' type Props = { answer?: InputSubmitContent showAvatar: boolean avatarSrc?: string hasHostAvatar: boolean } export const GuestBubble = (props: Props) => { console.log('GuestBubble', props.answer); return (
) } const TextGuestBubble = (props: { answer: TextInputSubmitContent }) => { const [clickedImageSrc, setClickedImageSrc] = createSignal() return (
0}>
attachment.type.startsWith('image') )} > {(attachment, idx) => ( {`Attached attachment.type.startsWith('image') ).length > 1 && 'max-w-[90%]' )} onClick={() => setClickedImageSrc(attachment.url)} /> )}
!attachment.type.startsWith('image') )} > {(attachment) => ( )}
{props.answer.label ?? props.answer.value}
setClickedImageSrc(undefined)} > Attachment
) } const AudioGuestBubble = (props: { answer: RecordingInputSubmitContent }) => { return (
) }