import { type RenderElementProps, useSelected } from 'slate-react'
import { LayoutArea, LayoutContainer } from './layouts.tsx'
import { ComponentBlocksElement, ComponentInlineProp } from './component-blocks/index.tsx'
import { LinkElement } from './link.tsx'
import { HeadingElement } from './heading.tsx'
import { BlockquoteElement } from './blockquote.tsx'
import { RelationshipElement } from './relationship.tsx'
import { tokenSchema } from '@keystar/ui/style'
// some of the renderers read properties of the element
// and TS doesn't understand the type narrowing when doing a spread for some reason
// so that's why things aren't being spread in some cases
export const renderElement = (props: RenderElementProps) => {
switch (props.element.type) {
case 'layout':
return (
{props.children}
) } } /* Block Elements */ const CodeElement = ({ attributes, children }: RenderElementProps) => { return (
{children}
)
}
function DividerElement({ attributes, children }: RenderElementProps) {
const selected = useSelected()
return (