import { Flex, Text } from '@chakra-ui/react'
import { Step, StartStep, BubbleStepType, InputStepType } from 'models'
import { ChoiceItemsList } from './ChoiceInputStepNode/ChoiceItemsList'
type Props = {
step: Step | StartStep
isConnectable?: boolean
}
export const StepNodeContent = ({ step }: Props) => {
switch (step.type) {
case BubbleStepType.TEXT: {
return (
Click to edit...
`
: step.content.html,
}}
/>
)
}
case InputStepType.TEXT: {
return (
{step.options?.labels?.placeholder ?? 'Type your answer...'}
)
}
case InputStepType.NUMBER: {
return (
{step.options?.labels?.placeholder ?? 'Type your answer...'}
)
}
case InputStepType.EMAIL: {
return (
{step.options?.labels?.placeholder ?? 'Type your email...'}
)
}
case InputStepType.URL: {
return (
{step.options?.labels?.placeholder ?? 'Type your URL...'}
)
}
case InputStepType.DATE: {
return (
{step.options?.labels?.from ?? 'Pick a date...'}
)
}
case InputStepType.PHONE: {
return (
{step.options?.labels?.placeholder ?? 'Your phone number...'}
)
}
case InputStepType.CHOICE: {
return
}
case 'start': {
return {step.label}
}
default: {
return No input
}
}
}