import { assertGroup, buildEntityPath } from '@h5web/shared'; import { useDataContext } from '../providers/DataProvider'; import EntityItem from './EntityItem'; import styles from './Explorer.module.css'; interface Props { level: number; parentPath: string; selectedPath: string; fileIndex:number; onSelect: (path: string) => void; onSelectFile: (path: string) => void; onSelectFileIndex: (index:number) => void; } function EntityList(props: Props) { const { level, parentPath, selectedPath, fileIndex,onSelect,onSelectFile,onSelectFileIndex } = props; const { entitiesStore,filepath,fileExt } = useDataContext(); const group = entitiesStore.get(parentPath); assertGroup(group); if (group.children.length === 0) { return null; } return (