import React, { useState } from 'react' import { Dialog } from '@jbrowse/core/ui' import { getSession } from '@jbrowse/core/util' import { Tab, Tabs } from '@mui/material' import ManualMSALoader from './ManualMSALoader/ManualMSALoader' import NCBIBlastPanel from './NCBIBlastQuery/NCBIBlastPanel' import PreLoadedMSA from './PreLoadedMSA/PreLoadedMSADataPanel' import { readMsaDatasets } from './PreLoadedMSA/types' import TabPanel from './TabPanel' import type { AbstractTrackModel, Feature } from '@jbrowse/core/util' export default function LaunchMsaViewDialog({ handleClose, feature, model, }: { handleClose: () => void feature: Feature model: AbstractTrackModel }) { const session = getSession(model) const datasets = readMsaDatasets(session.jbrowse) const hasPreloadedDatasets = !!datasets?.length const [value, setValue] = useState< 'ncbi_blast' | 'preloaded_msa' | 'manual_msa' >('ncbi_blast') return ( { setValue(newValue) }} > {hasPreloadedDatasets ? ( ) : null} {hasPreloadedDatasets ? ( ) : null} ) }