import { CurveType, ScaleSelector, Selector, Separator, ToggleBtn, ToggleGroup, Toolbar, } from '@h5web/lib'; import { MdDomain, MdGridOn } from 'react-icons/md'; import type { LineConfig } from '../line/config'; import { INTERACTIONS_WITH_AXIAL_ZOOM } from '../utils'; import type { ComplexLineConfig } from './lineConfig'; import type { ComplexLineVisType } from './models'; import { ComplexVisType, VIS_TYPE_SYMBOLS } from './models'; interface Props { disableAutoScale: boolean; config: ComplexLineConfig; lineConfig: LineConfig; } function ComplexLineToolbar(props: Props) { const { disableAutoScale, config, lineConfig } = props; const { visType, setVisType } = config; const { curveType, showGrid, xScaleType, yScaleType, autoScale, setCurveType, toggleGrid, setXScaleType, setYScaleType, toggleAutoScale, } = lineConfig; return ( setVisType(value)} options={[ComplexVisType.Amplitude, ComplexVisType.Phase]} optionComponent={({ option }) => ( // eslint-disable-next-line react/jsx-no-useless-fragment <>{`${VIS_TYPE_SYMBOLS[option]} ${option}`} )} /> { setCurveType(val as CurveType); }} > ); } export default ComplexLineToolbar;