// import { Annotation } from '@douyinfe/semi-ui/aiChatDialogue'; import React, { ReactNode } from 'react'; import type { AnnotationItem } from './item'; import Item, { VideoItem } from './item'; import { Collapse } from '../../index'; import cls from 'classnames'; import { IconBookOpenStroked } from '@douyinfe/semi-icons'; import { cssClasses } from '@douyinfe/semi-foundation/sidebar/constants'; const collapseCls = cssClasses.COLLAPSE; const annotationCls = cssClasses.ANNOTATION; export interface ContentProps { style?: React.CSSProperties; className?: string; activeKey?: string | string[]; info?: { header: React.ReactNode; key: string; annotations: AnnotationItem[] }[]; renderItem?: (annotation: AnnotationItem) => ReactNode; onChange?: (key: string | string[]) => void; onClick?: (e: React.MouseEvent, item: AnnotationItem) => void } const Content = React.memo((props: ContentProps) => { const { info = [], activeKey, onChange, onClick, style, className, renderItem } = props; return ( {info.map(item => ( {item.header} } itemKey={item.key} key={item.key} >
{item.annotations.map((cite, index) => { if (renderItem) { return renderItem(cite); } if (cite.type === 'video') { return ; } return ; })}
))}
); }); export default Content;