import { Classes, Tab, Tabs as BPTabs } from '@blueprintjs/core'; import styled from '@emotion/styled'; import { useStore } from '@tanstack/react-form'; import { withForm } from 'react-science/ui'; import { StyledDialogBody } from '../../../elements/StyledDialogBody.js'; import { AutoProcessingTab } from './tabs/auto_processing_tab.tsx'; import { DatabaseTab } from './tabs/database_tab.js'; import { ExportTab } from './tabs/export_tab.js'; import { ExternalApiTab } from './tabs/external_api_tab.js'; import { GeneralTab } from './tabs/general_tab.js'; import { ImportFiltersTab } from './tabs/import_filters_tab.js'; import { NucleiTab } from './tabs/nuclei_tab.js'; import { PanelsTab } from './tabs/panels_tab.js'; import { SpectraColorsTab } from './tabs/spectra_colors_tab.tsx'; import { TitleBlockTab } from './tabs/title_block_tab.js'; import { ToolsTab } from './tabs/tools_tab.tsx'; import { defaultGeneralSettingsFormValues } from './validation.js'; const Tabs = styled(BPTabs)` height: 100%; div[role='tablist'] { gap: 0; } &.${Classes.TABS}.${Classes.VERTICAL} > .${Classes.TAB_PANEL} { /* Remove top margin of first form.Section */ margin-top: -15px; /* Configure positioning and sizing */ max-height: 100%; overflow: auto; padding: 0 0.8rem 0.8rem; width: 100%; } `; const Div = styled.div<{ height?: number }>` height: ${({ height }) => (height ? `${height}px` : 'auto')}; `; export const GeneralSettingsDialogBody = withForm({ defaultValues: defaultGeneralSettingsFormValues, props: { height: undefined as number | undefined, }, render: function GeneralSettingsDialogBody({ height, form }) { const isExperimentalEnabled = useStore( form.store, (state) => state.values.display.general?.experimentalFeatures?.display ?? false, ); return (
} /> } /> } /> } /> } /> } /> } /> } /> } /> {isExperimentalEnabled && ( } /> )} } />
); }, });