import React from 'react'; import { useAppConfig } from '@state'; import { Toolbox } from '@ohif/ui'; import PanelSegmentation from './panels/PanelSegmentation'; import { SegmentationPanelMode } from './types/segmentation'; const getPanelModule = ({ commandsManager, servicesManager, extensionManager, configuration, title, }) => { const { customizationService } = servicesManager.services; const wrappedPanelSegmentation = configuration => { const [appConfig] = useAppConfig(); const disableEditingForMode = customizationService.get('segmentation.disableEditing'); const segmentationPanelMode = customizationService.get('segmentation.segmentationPanelMode')?.value || SegmentationPanelMode.Dropdown; return ( ); }; const wrappedPanelSegmentationWithTools = configuration => { const [appConfig] = useAppConfig(); const segmentationPanelMode = customizationService.get('segmentation.segmentationPanelMode')?.value || SegmentationPanelMode.Dropdown; return ( <> ); }; return [ { name: 'panelSegmentation', iconName: 'tab-segmentation', iconLabel: 'Segmentation', label: 'Segmentation', component: wrappedPanelSegmentation, }, { name: 'panelSegmentationWithTools', iconName: 'tab-segmentation', iconLabel: 'Segmentation', label: 'Segmentation', component: wrappedPanelSegmentationWithTools, }, ]; }; export default getPanelModule;