import { CheckboxLabelUnion } from '../../..'; import { NestedGridFormCheckboxOption } from '../../../GridForm/types'; import { MinimalCheckboxProps, NestedConnectedCheckboxOption } from '../types'; type FlatCheckbox = Omit & CheckboxLabelUnion & { level: number; parentValue?: string; options: string[]; value: string; }; type FlatCheckboxState = Pick; export declare const flattenOptions: (opts: NestedConnectedCheckboxOption[] | NestedGridFormCheckboxOption[], level?: number, parentValue?: string) => FlatCheckbox[]; export declare const getAllDescendants: (parentValue: string, flatOptions: FlatCheckbox[]) => string[]; export declare const calculateStates: (selectedValues: string[], flatOptions: FlatCheckbox[]) => Map; interface HandleCheckboxChangeParams { option: FlatCheckbox; isChecked: boolean; selectedValues: string[]; flatOptions: FlatCheckbox[]; onChange: (values: string[]) => void; onUpdate?: (values: string[]) => void; } export declare const handleCheckboxChange: ({ option, isChecked, selectedValues, flatOptions, onChange, onUpdate, }: HandleCheckboxChangeParams) => void; interface RenderCheckboxParams { option: FlatCheckbox; state: FlatCheckboxState; name: string; isRequired: boolean; isDisabled: boolean; onBlur: () => void; onChange: (event: React.ChangeEvent) => void; ref: React.RefCallback; error?: boolean; flatOptions: FlatCheckbox[]; } export declare const renderCheckbox: ({ option, state, name, isRequired, isDisabled, onBlur, onChange, ref, error, flatOptions, }: RenderCheckboxParams) => import("react/jsx-runtime").JSX.Element; export {};