import { GraphWidgetBarChart } from '@/dashboards/widgets/graph/components/GraphWidgetBarChart'; import { GraphWidgetGaugeChart } from '@/dashboards/widgets/graph/components/GraphWidgetGaugeChart'; import { GraphWidgetNumberChart } from '@/dashboards/widgets/graph/components/GraphWidgetNumberChart'; import { GraphWidgetPieChart } from '@/dashboards/widgets/graph/components/GraphWidgetPieChart'; import { GraphType } from '../mocks/mockWidgets'; import { type PageLayoutWidget } from '../states/savedPageLayoutsState'; type GraphWidgetRendererProps = { widget: PageLayoutWidget; }; export const GraphWidgetRenderer = ({ widget }: GraphWidgetRendererProps) => { const graphType = widget.configuration?.graphType; if (!graphType || typeof graphType !== 'string') { return null; } if (!Object.values(GraphType).includes(graphType as GraphType)) { return null; } switch (graphType as GraphType) { case GraphType.NUMBER: return ( ); case GraphType.GAUGE: return ( ); case GraphType.PIE: return ( ); case GraphType.BAR: return ( ); default: return null; } };