import { LightAsync as SyntaxHighlighter } from 'react-syntax-highlighter';
import light from 'react-syntax-highlighter/dist/cjs/styles/hljs/xcode';
import dark from 'react-syntax-highlighter/dist/cjs/styles/hljs/vs2015';
import type { GenericNode } from 'mystjs';
import { useTheme } from '../theme';
import { NodeTypes } from 'myst-util-to-react';
type Props = {
children: string;
lang?: string;
showLineNumbers?: boolean;
emphasizeLines?: number[];
};
export function CodeBlock(props: Props) {
const { isLight } = useTheme();
const { children, lang, emphasizeLines, showLineNumbers } = props;
const highlightLines = new Set(emphasizeLines);
return (