'use client'; import { Controller, useForm } from 'react-hook-form'; import { MiniButton } from '@/components/control'; import { Checkbox } from '@/components/input'; import { ModalForm } from '@/components/modal'; import { CstType } from '../backend/types'; import { IconCstType } from '../components/icon-cst-type'; import { labelCstType } from '../labels'; import { cstTypeToFilterKey, type GraphFilterParams, useTermGraphStore } from '../stores/term-graph'; export function DlgGraphParams() { const params = useTermGraphStore(state => state.filter); const setParams = useTermGraphStore(state => state.setFilter); const { handleSubmit, control } = useForm({ defaultValues: { ...params } }); function onSubmit(data: GraphFilterParams) { setParams(data); } return ( void handleSubmit(onSubmit)(event)} submitText='Применить' className='flex gap-6 justify-between px-6 pb-3 w-120' >

Преобразования

} /> ( )} /> } /> ( )} /> ( )} />

Типы конституент

{Object.values(CstType).map(cstType => { const fieldName = cstTypeToFilterKey[cstType]; return ( ( field.onChange(!field.value)} title={labelCstType(cstType)} icon={ } /> )} /> ); })}
); }