import { Flex, Heading, Stack, Wrap } from '@chakra-ui/react' import { useTypebot } from 'contexts/TypebotContext/TypebotContext' import React from 'react' import { parseDefaultPublicId } from 'services/typebots' import { isDefined } from 'utils' import { EditableUrl } from './EditableUrl' import { integrationsList } from './integrations/EmbedButton' export const ShareContent = () => { const { typebot, updateTypebot } = useTypebot() const handlePublicIdChange = (publicId: string) => { if (publicId === typebot?.publicId) return updateTypebot({ publicId }) } const publicId = typebot ? typebot?.publicId ?? parseDefaultPublicId(typebot.name, typebot.id) : '' const isPublished = isDefined(typebot?.publishedTypebotId) return ( Your typebot link {typebot && ( )} Embed your typebot {integrationsList.map((IntegrationButton, idx) => ( ))} ) }