import type { CSSProperties } from 'react'; import type { ControllerProps, FieldValues } from 'react-hook-form'; import { CheckController } from './CheckController.js'; import { Input2Controller } from './Input2Controller.js'; import type { LabelStyle } from './Label.js'; import Label from './Label.js'; const formatFieldInputStyle: CSSProperties = { textAlign: 'center', }; export const fieldLabelStyle: LabelStyle = { label: { flex: 4, fontSize: '11px', fontWeight: 'bold', color: '#232323', }, wrapper: { flex: 8, }, }; export interface FormatFieldProps< TFieldValues extends FieldValues = FieldValues, > extends Pick, 'control'> { label: string; checkFieldName?: ControllerProps['name']; formatFieldName?: ControllerProps['name']; disableFormat?: boolean; hideFormatField?: boolean; hideCheckField?: boolean; } export function FormatField( props: FormatFieldProps, ) { const { label, checkFieldName, formatFieldName, disableFormat = false, hideFormatField = false, hideCheckField = false, control, } = props; return (