import type { AriaAttributes } from 'react';
import React from 'react';
import type { OverlayTriggerRole } from './OverlayTrigger.types';
declare type GetA11yProps = (props: {
    role: OverlayTriggerRole;
    isVisible: boolean;
    overlayId: string;
}) => AriaAttributes & {
    id?: string;
};
export declare function getA11yPreset(role?: OverlayTriggerRole): {
    getOverlayProps: GetA11yProps;
    getTriggerProps: GetA11yProps;
};
declare type LabelConfig = {
    'aria-describedby'?: string;
    'aria-details'?: string;
    'aria-labelledby'?: string;
    'aria-label'?: string;
    /**
     * ID for the widget itself
     */
    id?: string;
};
declare type DialogBase = LabelConfig & {
    isOpen: boolean;
    role?: 'dialog';
};
declare type NonModalDialogConfig = DialogBase & {
    isModal?: never | false;
};
declare type ModalDialogConfig = DialogBase & {
    /**
     *
     * To enable `ariaHideOutside`. Set `isModal` to false to disable.
     * @a11y Replicates `aria-modal` inert outside content
     * @default false
     */
    isModal: true;
    ref: React.RefObject<HTMLElement>;
};
declare type ModalDialogLikeConfig = NonModalDialogConfig | ModalDialogConfig;
declare type OverlayTriggerA11yConfig = LabelConfig & {
    /**
     * Assure `aria-hidden` is not applied. A code side-effect
     * from `ariaHideOutside` hiding everthing outside the scope.
     */
    alwaysAriaVisible?: boolean;
    /**
     * When properties should be passed to the overlay UI itself,
     * and not the wrapper element.
     */
    canPropOverlayUp: boolean;
    isOpen: boolean;
    role?: OverlayTriggerRole;
};
/**
 * Manages labelling for an element and the other DOM. Defaults an ID for `aria-labelledby` usage.
 *
 * When `aria-label` and `aria-labelledby` both exist, it combines them into `aria-labelledby` for a screen reader chain.
 * @link [W3 naming with aria-labelledby](https://www.w3.org/WAI/ARIA/apg/practices/names-and-descriptions/#naming_with_aria-labelledby)
 */
export declare function useLabelled(props?: LabelConfig): {
    descriptionProps: {
        id: string | undefined;
    };
    labelProps: {
        id: string | undefined;
    };
    widgetProps: {
        'aria-describedby': string | undefined;
        'aria-details': string | undefined;
        id?: string | undefined;
        'aria-label'?: string | undefined;
        'aria-labelledby'?: string | undefined;
    };
};
/**
 * Cover the label links for the trigger (button), the popup element (dialog), and the popup element title (heading).
 * Similar to [React Aria useOverlayTrigger](https://github.com/adobe/react-spectrum/blob/main/packages/%40react-aria/overlays/src/useOverlayTrigger.ts)
 * but with element title support.
 * @link [MDN aria-haspopup](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup)
 */
export declare function useLabelledPopup({ 'aria-describedby': ariaDescribedby, 'aria-details': ariaDetails, 'aria-labelledby': ariaLabelledby, 'aria-label': ariaLabel, id: id_, isOpen, type, popupRole, popupId: popupId_, }: LabelConfig & {
    isOpen: boolean;
    popupId?: string;
    type?: 'button' | 'combobox';
    popupRole: 'dialog' | 'menu' | 'listbox';
}): {
    labelProps: {
        id: string | undefined;
    };
    popupProps: {
        "aria-activedescendant"?: string | undefined;
        "aria-atomic"?: (boolean | "true" | "false") | undefined;
        "aria-autocomplete"?: "none" | "list" | "inline" | "both" | undefined;
        "aria-busy"?: (boolean | "true" | "false") | undefined;
        "aria-checked"?: boolean | "true" | "false" | "mixed" | undefined;
        "aria-colcount"?: number | undefined;
        "aria-colindex"?: number | undefined;
        "aria-colspan"?: number | undefined;
        "aria-controls"?: string | undefined;
        "aria-current"?: boolean | "time" | "true" | "false" | "step" | "date" | "page" | "location" | undefined;
        "aria-describedby": string | undefined;
        "aria-details": string | undefined;
        "aria-disabled"?: (boolean | "true" | "false") | undefined;
        "aria-dropeffect"?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
        "aria-errormessage"?: string | undefined;
        "aria-expanded"?: (boolean | "true" | "false") | undefined;
        "aria-flowto"?: string | undefined;
        "aria-grabbed"?: (boolean | "true" | "false") | undefined;
        "aria-haspopup"?: boolean | "dialog" | "menu" | "true" | "false" | "grid" | "listbox" | "tree" | undefined;
        "aria-hidden"?: (boolean | "true" | "false") | undefined;
        "aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
        "aria-keyshortcuts"?: string | undefined;
        "aria-label"?: string | undefined;
        "aria-labelledby"?: string | undefined;
        "aria-level"?: number | undefined;
        "aria-live"?: "off" | "assertive" | "polite" | undefined;
        "aria-modal"?: (boolean | "true" | "false") | undefined;
        "aria-multiline"?: (boolean | "true" | "false") | undefined;
        "aria-multiselectable"?: (boolean | "true" | "false") | undefined;
        "aria-orientation"?: "horizontal" | "vertical" | undefined;
        "aria-owns"?: string | undefined;
        "aria-placeholder"?: string | undefined;
        "aria-posinset"?: number | undefined;
        "aria-pressed"?: boolean | "true" | "false" | "mixed" | undefined;
        "aria-readonly"?: (boolean | "true" | "false") | undefined;
        "aria-relevant"?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
        "aria-required"?: (boolean | "true" | "false") | undefined;
        "aria-roledescription"?: string | undefined;
        "aria-rowcount"?: number | undefined;
        "aria-rowindex"?: number | undefined;
        "aria-rowspan"?: number | undefined;
        "aria-selected"?: (boolean | "true" | "false") | undefined;
        "aria-setsize"?: number | undefined;
        "aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
        "aria-valuemax"?: number | undefined;
        "aria-valuemin"?: number | undefined;
        "aria-valuenow"?: number | undefined;
        "aria-valuetext"?: string | undefined;
        id?: string | undefined;
        role: "dialog" | "menu" | "listbox";
    };
    triggerProps: AriaAttributes & {
        id?: string | undefined;
    };
};
/**
 * For dialog experiences:
 * - Has role dialog and aria linked title props
 * - Focus management props to work with FocusScope
 *
 * For modal dialog experiences (full screen locked experiences):
 * - Hides old and new content outside with aria-hidden with ariaHideOutside (like aria-modal)
 * - (it will in breaking) Prevent scroll
 *
 * For either experiences, you still MUST support:
 * - have Escape key to close (It should!)
 * - have click outside, like scrim click
 *
 * _More about 'modal dialog' and `isModal` not using `aria-modal`:_
 * Setting aria-modal="true" tells assistive technologies to let the user know the ability to interact with,
 * or access other content on the page requires the modal dialog to be closed or otherwise lose focus.
 *  Modal dialogs are when content is displayed and the user's interaction is limited to only that section until it is dismissed.
 * [MDN aria modal](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-modal).
 * To support the most, like Narrator in Edge, Core React uses `ariaHideOutside` to set `aria-hidden` on
 * all elements outside the dialog, and **all elements outside added while opened**, so the dialog will act as a
 * _modal_ even without `aria-modal` on the dialog itself. See Future Considerations below.
 * [Screen Reader aria modal support table](https://a11ysupport.io/tech/aria/aria-modal_attribute) - [MS Narrator Edge aria modal support](https://a11ysupport.io/tests/apg__modal-dialog-example/aria__aria-modal_attribute/convey_presence/narrator/edge)
 * _Future Considerations:_ Replace ariaHideOutside with aria-modal="true".
 * Using aria-modal, then we would need to involve Portal and so tooltips
 * or Toasts could mount within the visible aria-modal container.
 */
export declare function useModalDialogLike({ 'aria-describedby': ariaDescribedby, 'aria-details': ariaDetails, 'aria-labelledby': ariaLabelledby, 'aria-label': ariaLabel, id, isModal, isOpen, ref, role, }: ModalDialogLikeConfig): {
    dialogProps: {
        id: string | undefined;
        role: "dialog";
        tabIndex: number;
        'aria-describedby': string | undefined;
        'aria-details': string | undefined;
        'aria-label'?: string | undefined;
        'aria-labelledby'?: string | undefined;
    };
    labelProps: {
        id: string | undefined;
    };
    focusScopeProps: {
        autoFocus: boolean;
        contain: boolean;
        restoreFocus: boolean;
    };
};
/**
 * Takes many roles and determines props necessary for DOM/components.
 * **Side effect of role="dialog"**, current and any content added later
 * outside of the element (like by portals) will get `aria-hidden=true`
 * to replace the `aria-modal=true` `inert` nature.
 * @see useModalDialogLike */
export declare function useOverlayTriggerA11y({ alwaysAriaVisible, 'aria-describedby': ariaDescribedby, 'aria-details': ariaDetails, 'aria-labelledby': ariaLabelledby, 'aria-label': ariaLabel, canPropOverlayUp, id: id_, isOpen, role, }: OverlayTriggerA11yConfig): {
    focusScopeProps: {
        autoFocus?: boolean | undefined;
        contain?: boolean | undefined;
        restoreFocus?: boolean | undefined;
    };
    labelProps: {
        id: string | undefined;
    };
    overlayProps: {};
    portalProps: {};
    triggerProps: AriaAttributes & {
        id?: string | undefined;
    };
    wrapperProps: {};
};
export {};
