import { MSKTab, MSKTabs } from 'shared/components/MSKTabs/MSKTabs'; import { ResultsViewPathwaysSubTab } from 'pages/resultsView/ResultsViewPageHelpers'; import { getServerConfig } from 'config/config'; import ResultsViewPathwayMapper from 'pages/resultsView/pathwayMapper/ResultsViewPathwayMapper'; import IFrameLoader from 'shared/components/iframeLoader/IFrameLoader'; import * as React from 'react'; import { observer } from 'mobx-react'; import { ResultsViewPageStore } from 'pages/resultsView/ResultsViewPageStore'; import ResultsViewURLWrapper from 'pages/resultsView/ResultsViewURLWrapper'; import { AppStore } from 'AppStore'; import { useLocalObservable } from 'mobx-react-lite'; import { runInAction } from 'mobx'; interface IPathwayMapperContainerProps { resultsViewPageStore: ResultsViewPageStore; appStore: AppStore; urlWrapper: ResultsViewURLWrapper; } const PathWayMapperContainer: React.FunctionComponent = observer( function({ resultsViewPageStore, appStore, urlWrapper, }: IPathwayMapperContainerProps) { const store = useLocalObservable(() => ({ activeTab: urlWrapper.query.pathways_source || ResultsViewPathwaysSubTab.PATHWAY_MAPPER, })); return ( <> Choose Pathway Source: { runInAction(() => { store.activeTab = id; urlWrapper.updateURL({ pathways_source: id, }); }); }} className="pillTabs resultsPagePathwaysTabs" arrowStyle={{ 'line-height': 0.8 }} tabButtonStyle="pills" unmountOnHide={true} > PathwayMapper {' '} shows pathways from over fifty cancer related pathways and provides a collaborative web-based editor for creating new ones. } hide={!getServerConfig().show_pathway_mapper} > NDEx {' '} shows 966 pathways: } hide={ !getServerConfig().show_ndex || !resultsViewPageStore.remoteNdexUrl.isComplete || !resultsViewPageStore.remoteNdexUrl.result } > ); } ); export default PathWayMapperContainer;