import { CopyToClipboard } from 'shared/components/copy-to-clipboard.mjs'
import { HttpStatusCode } from './http.mjs'
import { Mermaid } from './mermaid.mjs'
const names = {
js: 'Javascript',
bash: 'Bash prompt',
sh: 'Shell prompt',
json: 'JSON',
yaml: 'file.yaml',
}
export const Highlight = (props) => {
let language = 'txt'
let status = false
if (props.language) language = props.language
if (props.children?.props?.className) {
language = props.children.props.className.split('-').pop()
if (language.indexOf('.') !== -1) {
[status, language] = language.split('.')
}
}
// Mermaid should not be highlighted, but rendered
if (language === 'mermaid') return
{props.children}