import { BotContext, InputSubmitContent } from '@/types' import { ContinueChatResponse, Theme } from '@indite.io/schemas' import { InputBlockType } from '@indite.io/schemas/features/blocks/inputs/constants' import { Show } from 'solid-js' import { InputChatBlock } from './InputChatBlock' type Props = { input: NonNullable | undefined chunkIndex: number context: BotContext theme: Theme isInputPrefillEnabled: boolean isBrandingEnabled?: boolean | undefined hasError: boolean onTransitionEnd: () => void onSubmit: (content: InputSubmitContent) => void onSkip: () => void botContainerWidth?: string } export const FixedInputContainer = (props: Props) => { const isFixedInputType = () => { if (!props.input) return false return ( props.input.type === InputBlockType.TEXT || props.input.type === InputBlockType.NUMBER || props.input.type === InputBlockType.EMAIL || props.input.type === InputBlockType.URL || props.input.type === InputBlockType.PHONE ) } const handleSubmit = (content: InputSubmitContent) => { props.onSubmit(content) } return (
) }