import React, { ElementType, MutableRefObject, Ref } from 'react'; import { Props } from '../../types.js'; import { PropsForFeatures, HasDisplayName, RefProp } from '../../utils/render.js'; declare let DEFAULT_DISCLOSURE_TAG: React.ExoticComponent<{ children?: React.ReactNode; }>; interface DisclosureRenderPropArg { open: boolean; close(focusableElement?: HTMLElement | MutableRefObject): void; } export type DisclosureProps = Props & { defaultOpen?: boolean; }; declare function DisclosureFn(props: DisclosureProps, ref: Ref): JSX.Element; declare let DEFAULT_BUTTON_TAG: "button"; interface ButtonRenderPropArg { open: boolean; } type ButtonPropsWeControl = 'aria-controls' | 'aria-expanded'; export type DisclosureButtonProps = Props; declare function ButtonFn(props: DisclosureButtonProps, ref: Ref): React.ReactElement> | null; declare let DEFAULT_PANEL_TAG: "div"; interface PanelRenderPropArg { open: boolean; close: (focusableElement?: HTMLElement | MutableRefObject) => void; } declare let PanelRenderFeatures: number; export type DisclosurePanelProps = Props & PropsForFeatures; declare function PanelFn(props: DisclosurePanelProps, ref: Ref): JSX.Element; interface ComponentDisclosure extends HasDisplayName { (props: DisclosureProps & RefProp): JSX.Element; } interface ComponentDisclosureButton extends HasDisplayName { (props: DisclosureButtonProps & RefProp): JSX.Element; } interface ComponentDisclosurePanel extends HasDisplayName { (props: DisclosurePanelProps & RefProp): JSX.Element; } export declare let Disclosure: ComponentDisclosure & { Button: ComponentDisclosureButton; Panel: ComponentDisclosurePanel; }; export {};