import { useMDXComponent } from 'next-contentlayer2/hooks' import Link from 'next/link' import type { Style } from '@/registry/styles' import { Accordion_Shadcn_ as Accordion, AccordionContent_Shadcn_ as AccordionContent, AccordionItem_Shadcn_ as AccordionItem, AccordionTrigger_Shadcn_ as AccordionTrigger, cn, } from 'ui' import { BlockItem } from './block-item' import { BlockPreview } from './block-preview' import { Callout } from './callout' import { ComponentPreview } from './component-preview' import { CopyButton } from './copy-button' import { DualRealtimeChat } from './dual-realtime-chat' import { RegistryBlock } from './registry-block' import { StyleWrapper } from './style-wrapper' import TanStackBeta from './tanstack-beta' const components = { RegistryBlock, Accordion, AccordionContent, AccordionItem, AccordionTrigger, h1: ({ className, ...props }: React.HTMLAttributes) => (

), h2: ({ className, ...props }: React.HTMLAttributes) => (

), h3: ({ className, ...props }: React.HTMLAttributes) => (

), h4: ({ className, ...props }: React.HTMLAttributes) => (

), h5: ({ className, ...props }: React.HTMLAttributes) => (
), h6: ({ className, ...props }: React.HTMLAttributes) => (
), a: ({ className, ...props }: React.HTMLAttributes) => ( ), p: ({ className, ...props }: React.HTMLAttributes) => (

), ul: ({ className, ...props }: React.HTMLAttributes) => (

    ), ol: ({ className, ...props }: React.HTMLAttributes) => (
      ), li: ({ className, ...props }: React.HTMLAttributes) => (
    1. ), blockquote: ({ className, ...props }: React.HTMLAttributes) => (
      ), img: ({ className, alt, ...props }: React.ImgHTMLAttributes) => ( // eslint-disable-next-line @next/next/no-img-element {alt} ), hr: ({ ...props }: React.HTMLAttributes) => (
      ), table: ({ className, ...props }: React.HTMLAttributes) => (
      ), tr: ({ className, ...props }: React.HTMLAttributes) => ( ), th: ({ className, ...props }: React.HTMLAttributes) => (
      ), td: ({ className, ...props }: React.HTMLAttributes) => ( ), pre: ({ className, __rawString__, __withMeta__, __src__, __style__, ...props }: React.HTMLAttributes & { __style__?: Style['name'] __rawString__?: string __withMeta__?: boolean __src__?: string }) => { return (
              {__rawString__ && (
                
              )}
            
          )
        },
        code: ({ className, ...props }: React.HTMLAttributes) => (
          
        ),
        Callout,
        ComponentPreview,
        TanStackBeta,
        LinkedCard: ({ className, ...props }: React.ComponentProps) => (
          
        ),
        BlockItem,
        BlockPreview,
        DualRealtimeChat,
      }
      
      interface MdxProps {
        code: string
      }
      
      export function Mdx({ code }: MdxProps) {
        const Component = useMDXComponent(code, {
          style: 'default',
        })
      
        return (
          
      ) }