/**
 * a11y — shared helpers for resolving an accessible name from the union of
 * props every form/interactive component accepts.
 *
 * Why this exists:
 *   react-aria's hooks (useCheckbox, useSwitch, useRadio, useTextField,
 *   useButton, etc.) emit a runtime warning to the browser console when
 *   none of the following is present on the underlying element:
 *     - aria-label
 *     - aria-labelledby
 *     - a visible <label> with htmlFor pointing to the element id
 *
 *   Many of our components accept `label` as `string | ReactNode`. When
 *   `label` is a ReactNode (icon + text, custom JSX), react-aria can't see
 *   a text label and the warning fires. This helper centralizes the
 *   derivation: it returns a single { 'aria-label' or 'aria-labelledby' }
 *   shape that react-aria will accept, and — in development only — it
 *   surfaces a focused console.error pointing the developer at the prop
 *   they're missing instead of the generic react-aria warning.
 *
 * Usage:
 *   const ariaProps = resolveAccessibleName({
 *     label,
 *     ariaLabel: props['aria-label'],
 *     ariaLabelledby: props['aria-labelledby'],
 *     componentName: 'Checkbox',
 *   });
 *   // → { 'aria-label': string } | { 'aria-labelledby': string } | { 'aria-label': string }
 *
 *   useCheckbox({ ...otherProps, ...ariaProps }, state, ref);
 */
import type { ReactNode } from "react";
export interface ResolveAccessibleNameInput {
    /** The visible label, if any. Strings are auto-used as aria-label. */
    label?: ReactNode;
    /** Caller-provided aria-label override. Highest priority when present. */
    ariaLabel?: string;
    /** Caller-provided aria-labelledby. Wins over label-derived values. */
    ariaLabelledby?: string;
    /**
     * Component name used in dev-mode error messages. Helps the developer
     * locate which usage needs a label.
     */
    componentName: string;
    /**
     * Optional secondary fallbacks the component knows about — e.g. a Radio
     * can fall back to its `value` so radios in a group are at least
     * distinguishable. The first non-empty string is used.
     */
    fallbacks?: Array<string | undefined>;
}
export type ResolvedAccessibleName = {
    "aria-label": string;
} | {
    "aria-labelledby": string;
};
/**
 * Resolve the accessible-name props that should be spread onto the
 * underlying element. Guarantees at least one of aria-label / aria-labelledby
 * is present so react-aria won't warn at runtime.
 *
 * Priority order:
 *   1. aria-labelledby (caller-provided)
 *   2. aria-label (caller-provided)
 *   3. label (when string)
 *   4. fallbacks (when string)
 *   5. component-name placeholder + dev-mode console.error
 */
export declare function resolveAccessibleName(input: ResolveAccessibleNameInput): ResolvedAccessibleName;
//# sourceMappingURL=a11y.d.ts.map