import React, {useContext} from "react"; import classnames from "classnames"; import MultiLevelSelectContext from "./context"; import { globalProps, GlobalProps } from "../utilities/globalProps"; import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps, } from "../utilities/props"; import Checkbox from "../pb_checkbox/_checkbox"; import Radio from "../pb_radio/_radio"; import CircleIconButton from "../pb_circle_icon_button/_circle_icon_button"; import Body from "../pb_body/_body"; type MultiLevelSelectOptionsProps = { aria?: { [key: string]: string }, children?: React.ReactNode | ((item: any) => React.ReactNode), className?: string, dark?: boolean, data?: { [key: string]: string }, htmlOptions?: {[key: string]: string | number | boolean | (() => void)}, } & GlobalProps; const MultiLevelSelectOptions = ({ children, items, ...props }: MultiLevelSelectOptionsProps) => { const { variant, inputName, renderNestedOptions, isTreeRowExpanded, handleToggleClick, handleRadioButtonClick, handledropdownItemClick, filterItem, } = useContext(MultiLevelSelectContext) const { aria = {}, className, data = {}, htmlOptions = {}, } = props; const ariaProps = buildAriaProps(aria); const dataProps = buildDataProps(data); const htmlProps = buildHtmlProps(htmlOptions); const classes = classnames( buildCss("pb_multi_level_select_options"), globalProps(props), className ); return ( ); }; export default MultiLevelSelectOptions;