import { SimpleCodeBlock } from 'ui-patterns/SimpleCodeBlock' import { useTrack } from '@/lib/telemetry/track' interface CodeSnippetProps { selectedLang: 'bash' | 'js' snippet: { title?: string bash: { language?: string; code: string } js?: { language?: string; code: string } } } const CodeSnippet = ({ selectedLang, snippet }: CodeSnippetProps) => { const track = useTrack() const handleCopy = () => { track('api_docs_code_copy_button_clicked', { title: snippet.title, selectedLanguage: selectedLang, }) } if (!snippet[selectedLang]) return null return (