import * as PropTypes from "prop-types";
import * as React from "react";
import "./CheckboxGroup.less";
interface Option {
    id: string;
    checked?: boolean;
    disabled?: boolean;
    label: React.ReactNode;
    value?: any;
}
export interface Props {
    className?: string;
    disabled?: boolean;
    error?: React.ReactNode;
    label: React.ReactNode;
    onChange: (options: Option[]) => void;
    options: Option[];
    title?: React.ReactNode;
}
/**
 * Renders a group of related checkboxes that can all be checked/unchecked together by clicking a
 * parent checkbox, or separately by clicking each individual checkbox.
 *
 * TODO: Add support for resetting the options to their initial state when going from all unchecked
 * to partially checked as per
 * https://www.w3.org/TR/wai-aria-practices-1.1/examples/checkbox/checkbox-2/checkbox-2.html
 *
 * W3C spec: https://www.w3.org/TR/wai-aria-practices-1.1/#checkbox
 */
export default class CheckboxGroup extends React.PureComponent<Props> {
    static propTypes: {
        className: PropTypes.Requireable<string>;
        disabled: PropTypes.Requireable<boolean>;
        error: PropTypes.Requireable<PropTypes.ReactNodeLike>;
        label: PropTypes.Validator<PropTypes.ReactNodeLike>;
        onChange: PropTypes.Validator<(...args: any[]) => any>;
        options: PropTypes.Validator<PropTypes.InferProps<{
            id: PropTypes.Validator<string>;
            checked: PropTypes.Requireable<boolean>;
            disabled: PropTypes.Requireable<boolean>;
            label: PropTypes.Validator<PropTypes.ReactNodeLike>;
            value: PropTypes.Requireable<any>;
        }>[]>;
        title: PropTypes.Requireable<PropTypes.ReactNodeLike>;
    };
    _labelID: string;
    _optionRefsByID: {};
    render(): JSX.Element;
    _handleGlobalChange: ({ checked }: {
        checked: any;
    }) => void;
    _handleSingleChange: ({ id, checked }: {
        id: any;
        checked: any;
    }) => void;
}
export {};
