import { BlockIndices, ChoiceInputBlock } from 'models' import React from 'react' import { ItemNodesList } from '@/features/graph/components/Nodes/ItemNode' import { Stack, Tag, Text, Wrap } from '@chakra-ui/react' import { useTypebot } from '@/features/editor' import { SetVariableLabel } from '@/components/SetVariableLabel' type Props = { block: ChoiceInputBlock indices: BlockIndices } export const ButtonsBlockNode = ({ block, indices }: Props) => { const { typebot } = useTypebot() const dynamicVariableName = typebot?.variables.find( (variable) => variable.id === block.options.dynamicVariableId )?.name return ( {block.options.dynamicVariableId ? ( Display {dynamicVariableName} buttons ) : ( )} {block.options.variableId ? ( ) : null} ) }