import { Text } from '@chakra-ui/react'
import {
Block,
StartBlock,
BubbleBlockType,
InputBlockType,
LogicBlockType,
IntegrationBlockType,
BlockIndices,
} from 'models'
import { isChoiceInput, isInputBlock } from 'utils'
import { ItemNodesList } from '../../ItemNode'
import {
EmbedBubbleContent,
SetVariableContent,
TextBubbleContent,
VideoBubbleContent,
WebhookContent,
WithVariableContent,
} from './contents'
import { ConfigureContent } from './contents/ConfigureContent'
import { FileInputContent } from './contents/FileInputContent'
import { ImageBubbleContent } from './contents/ImageBubbleContent'
import { PaymentInputContent } from './contents/PaymentInputContent'
import { PlaceholderContent } from './contents/PlaceholderContent'
import { RatingInputContent } from './contents/RatingInputContent'
import { SendEmailContent } from './contents/SendEmailContent'
import { TypebotLinkContent } from './contents/TypebotLinkContent'
import { ProviderWebhookContent } from './contents/ZapierContent'
type Props = {
block: Block | StartBlock
indices: BlockIndices
}
export const BlockNodeContent = ({ block, indices }: Props): JSX.Element => {
if (
isInputBlock(block) &&
!isChoiceInput(block) &&
block.options.variableId
) {
return
}
switch (block.type) {
case BubbleBlockType.TEXT: {
return
}
case BubbleBlockType.IMAGE: {
return
}
case BubbleBlockType.VIDEO: {
return
}
case BubbleBlockType.EMBED: {
return
}
case InputBlockType.TEXT: {
return (
)
}
case InputBlockType.NUMBER:
case InputBlockType.EMAIL:
case InputBlockType.URL:
case InputBlockType.PHONE: {
return (
)
}
case InputBlockType.DATE: {
return Pick a date...
}
case InputBlockType.CHOICE: {
return
}
case InputBlockType.PAYMENT: {
return
}
case InputBlockType.RATING: {
return
}
case InputBlockType.FILE: {
return
}
case LogicBlockType.SET_VARIABLE: {
return
}
case LogicBlockType.CONDITION: {
return
}
case LogicBlockType.REDIRECT: {
return (
)
}
case LogicBlockType.CODE: {
return (
)
}
case LogicBlockType.TYPEBOT_LINK:
return
case IntegrationBlockType.GOOGLE_SHEETS: {
return (
)
}
case IntegrationBlockType.GOOGLE_ANALYTICS: {
return (
)
}
case IntegrationBlockType.WEBHOOK: {
return
}
case IntegrationBlockType.ZAPIER: {
return (
)
}
case IntegrationBlockType.PABBLY_CONNECT:
case IntegrationBlockType.MAKE_COM: {
return (
)
}
case IntegrationBlockType.EMAIL: {
return
}
case 'start': {
return Start
}
}
}