///
import { COMPONENTS_NAMESPACES, SuggestionsGroupSelected } from '../../constants';
import { GlobalDefaultTheme, PartialGlobalDefaultTheme } from '../../utils/useTheme';
import { ChangeEvent } from '../CheckBox/types';
/**
* Change event handler
*/
export interface ChangeEventHandler {
(ev: ChangeEvent): void;
}
/**
* Custom change event of component
*/
export interface CheckBoxTreeChangeEvent {
component: {
/** Array of ids of selected terminal checkboxes */
selected: number[];
/** Array of ids of selected internal checkboxes (is added only if all subgroup is selected) */
selectedGroups: number[];
};
}
/**
* Terminal CheckBoxTree item
*/
export interface CheckBoxTreeItem {
/** Child items */
children?: CheckBoxTreeItemType[];
/** Id (should be unique) */
id: number;
/** Label */
label: string;
/** Name */
name?: string;
}
/**
* Group CheckBoxTree item
*/
export interface CheckBoxTreeGroupItem extends CheckBoxTreeItem {
/** Child items */
children: CheckBoxTreeItemType[];
}
/**
* CheckBoxTree item
*/
export declare type CheckBoxTreeItemType = CheckBoxTreeGroupItem | CheckBoxTreeItem;
/**
* CheckBoxTree group props
*/
export interface CheckBoxTreeGroupProps {
/** Child Items */
children?: React.ReactNode;
/** Change event handler */
handleChange: (id: number, value?: SuggestionsGroupSelected) => ChangeEventHandler;
/** Id (should be unique) */
id: number;
/** Item's open state */
isOpen?: boolean;
/** Text */
label: string;
/** Name */
name?: string;
/** Set state action for tree state */
setState: (value: React.SetStateAction