import React from 'react'; import { useDispatch, useSelector } from 'react-redux'; import i18n from 'vj/utils/i18n'; import { Card, Switch, Tab, Tabs, } from '@blueprintjs/core'; import type { RootState } from './reducer/index'; import { FormItem, ManagedSelect, SingleFileSelect } from './BasicForm'; export default function ProblemType() { const Type = useSelector((state: RootState) => state.config.type); const checkerType = useSelector((state: RootState) => state.config.checker_type); const filename = useSelector((state: RootState) => state.config.filename); const subType = useSelector((state: RootState) => state.config.subType); const dispatch = useDispatch(); const dispatcher = (base) => (value) => dispatch({ ...base, value }); return ( {i18n('Problem Type')} {i18n('CheckerType')} { dispatch({ type: 'CONFIG_FORM_UPDATE', key: 'checker_type', value: checkerType === 'strict' ? 'default' : 'strict' }); }} /> )} /> {['testlib', 'other'].map((i) => ( {i === 'other' && ( )} )} /> ))} )} /> )} /> { dispatch({ type: 'CONFIG_FORM_UPDATE', key: 'subType', value: subType === 'multi' ? 'single' : 'multi' }); }} /> dispatch(({ type: 'CONFIG_FORM_UPDATE', key: 'filename', value: ev.currentTarget.value }))} className="textbox" /> )} /> {i18n('Unsupported configure this type of problem. Please refer to the documentation.')}

)} />
); }