import { IconProps, useColorModeValue } from '@chakra-ui/react' import { BubbleBlockType, InputBlockType, IntegrationBlockType, LogicBlockType, BlockType, } from '@typebot.io/schemas' import React from 'react' import { FlagIcon, SendEmailIcon, WebhookIcon } from '@/components/icons' import { WaitIcon } from '@/features/blocks/logic/wait/components/WaitIcon' import { ScriptIcon } from '@/features/blocks/logic/script/components/ScriptIcon' import { JumpIcon } from '@/features/blocks/logic/jump/components/JumpIcon' import { OpenAILogo } from '@/features/blocks/integrations/openai/components/OpenAILogo' import { AudioBubbleIcon } from '@/features/blocks/bubbles/audio/components/AudioBubbleIcon' import { EmbedBubbleIcon } from '@/features/blocks/bubbles/embed/components/EmbedBubbleIcon' import { ImageBubbleIcon } from '@/features/blocks/bubbles/image/components/ImageBubbleIcon' import { TextBubbleIcon } from '@/features/blocks/bubbles/textBubble/components/TextBubbleIcon' import { VideoBubbleIcon } from '@/features/blocks/bubbles/video/components/VideoBubbleIcon' import { ButtonsInputIcon } from '@/features/blocks/inputs/buttons/components/ButtonsIcon' import { DateInputIcon } from '@/features/blocks/inputs/date/components/DateInputIcon' import { EmailInputIcon } from '@/features/blocks/inputs/emailInput/components/EmailInputIcon' import { FileInputIcon } from '@/features/blocks/inputs/fileUpload/components/FileInputIcon' import { NumberInputIcon } from '@/features/blocks/inputs/number/components/NumberInputIcon' import { PaymentInputIcon } from '@/features/blocks/inputs/payment/components/PaymentInputIcon' import { PhoneInputIcon } from '@/features/blocks/inputs/phone/components/PhoneInputIcon' import { RatingInputIcon } from '@/features/blocks/inputs/rating/components/RatingInputIcon' import { TextInputIcon } from '@/features/blocks/inputs/textInput/components/TextInputIcon' import { UrlInputIcon } from '@/features/blocks/inputs/url/components/UrlInputIcon' import { ChatwootLogo } from '@/features/blocks/integrations/chatwoot/components/ChatwootLogo' import { GoogleAnalyticsLogo } from '@/features/blocks/integrations/googleAnalytics/components/GoogleAnalyticsLogo' import { GoogleSheetsLogo } from '@/features/blocks/integrations/googleSheets/components/GoogleSheetsLogo' import { MakeComLogo } from '@/features/blocks/integrations/makeCom/components/MakeComLogo' import { PabblyConnectLogo } from '@/features/blocks/integrations/pabbly/components/PabblyConnectLogo' import { ZapierLogo } from '@/features/blocks/integrations/zapier/components/ZapierLogo' import { ConditionIcon } from '@/features/blocks/logic/condition/components/ConditionIcon' import { RedirectIcon } from '@/features/blocks/logic/redirect/components/RedirectIcon' import { SetVariableIcon } from '@/features/blocks/logic/setVariable/components/SetVariableIcon' import { TypebotLinkIcon } from '@/features/blocks/logic/typebotLink/components/TypebotLinkIcon' type BlockIconProps = { type: BlockType } & IconProps export const BlockIcon = ({ type, ...props }: BlockIconProps): JSX.Element => { const blue = useColorModeValue('blue.500', 'blue.300') const orange = useColorModeValue('orange.500', 'orange.300') const purple = useColorModeValue('purple.500', 'purple.300') const openAIColor = useColorModeValue('black', 'white') switch (type) { case BubbleBlockType.TEXT: return case BubbleBlockType.IMAGE: return case BubbleBlockType.VIDEO: return case BubbleBlockType.EMBED: return case BubbleBlockType.AUDIO: return case InputBlockType.TEXT: return case InputBlockType.NUMBER: return case InputBlockType.EMAIL: return case InputBlockType.URL: return case InputBlockType.DATE: return case InputBlockType.PHONE: return 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.SCRIPT: return case LogicBlockType.WAIT: return case LogicBlockType.JUMP: 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.MAKE_COM: return case IntegrationBlockType.PABBLY_CONNECT: return case IntegrationBlockType.EMAIL: return case IntegrationBlockType.CHATWOOT: return case IntegrationBlockType.OPEN_AI: return case 'start': return } }