import type { IButton, IContextualMenuProps } from '@fluentui/react'; import type React from 'react'; /** * Returns a ref that populates both the internal mutable ref and an optional external ref. * Handles both callback refs and RefObject externals. * * @param internalRef - Component-owned mutable ref used for internal logic (e.g. opening a menu). * @param externalRef - Caller-supplied ref, if any. * @returns A merged React.Ref that satisfies both. */ export declare function mergeButtonRef(internalRef: React.MutableRefObject, externalRef: React.Ref | undefined): React.Ref; /** * Shared keydown handler for buttons with a contextual menu. * Intercepts Alt+Down before Fluent's _onMenuKeyDown runs: calling preventDefault() * sets ev.defaultPrevented=true, which causes Fluent to skip its own stopPropagation(). * The Down keydown then bubbles up, preventing the host application's menubar from * stealing focus after the menu is dismissed. * No-ops when menuProps is absent — Alt+Down is only intercepted when a menu is present. * * @param ev - The React keyboard event from the button's onKeyDown handler. * @param buttonRef - Ref to the Fluent IButton instance used to programmatically open the menu. * @param onKeyDown - Optional caller-supplied onKeyDown handler, forwarded after internal handling. * @param menuProps - Menu configuration; Alt+Down is only intercepted when this is defined. */ export declare function handleMenuKeyDown(ev: React.KeyboardEvent, buttonRef: React.RefObject, onKeyDown?: (ev: React.KeyboardEvent) => void, menuProps?: IContextualMenuProps): void; //# sourceMappingURL=utils.d.ts.map