import { Stack, Text } from '@chakra-ui/react'
import { useTypebot } from '@/features/editor/providers/TypebotProvider'
import { WebhookBlock } from '@typebot.io/schemas'
import { byId } from '@typebot.io/lib'
import { SetVariableLabel } from '@/components/SetVariableLabel'
type Props = {
block: WebhookBlock
}
export const WebhookContent = ({ block: { webhookId, options } }: Props) => {
const { typebot } = useTypebot()
const { webhooks } = useTypebot()
const webhook = webhooks.find(byId(webhookId))
if (!webhook?.url) return Configure...
return (
{webhook.method} {webhook.url}
{options.responseVariableMapping
.filter((mapping) => mapping.variableId)
.map((mapping) => (
))}
)
}