import type { InterpretedLunaticOverviewItem } from '../../use-lunatic/hooks/useOverview'; import type { useLunatic } from '../../use-lunatic/use-lunatic'; type Props = { overview: InterpretedLunaticOverviewItem[]; goToPage: ReturnType['goToPage']; depth?: number; }; export const OrchestratorOverview = ({ overview: stateOverview, goToPage, depth = 0, }: Props) => { return (
{depth === 0 &&

Overview

}
    {stateOverview.map((entry) => ( ))}
); }; type OverviewItemProps = { overviewEntry: InterpretedLunaticOverviewItem; goToPage: Props['goToPage']; depth: number; }; const OverviewItem = ({ overviewEntry, goToPage, depth, }: OverviewItemProps) => { let color = 'text-base-content/50'; if (overviewEntry.reached) { color = 'text-base-content'; } if (overviewEntry.current) { color = 'text-success'; } return (
  • {overviewEntry.children.length > 0 && ( )}
  • ); };