import type { MaybeRefOrGetter } from 'vue'; export type UseDismissOptions = { /** Boundary element; interactions outside it dismiss. Ref or getter. */ element: MaybeRefOrGetter; /** * Called when a dismiss condition (outside click, canvas clickAway, Escape * or a selection change) fires. */ onDismiss: () => void; /** Dismiss on Escape (unless a dialog is open). Defaults to true. */ escape?: boolean; /** * An additional element whose clicks should NOT dismiss — typically the * trigger that toggles the dismissable element. * * Needed because the document click listener runs in the capture phase: the * trigger's own `@click.stop` can't prevent it, so without this a click on * the trigger would dismiss and then immediately re-open. */ ignore?: MaybeRefOrGetter; }; /** * Close a floating element (dropdown, menu, popover) when the user clicks * outside of it, presses Escape, or changes the editor selection. * * @example * const root = useTemplateRef('root') * useDismiss({ element: root, onDismiss: () => emit('close') }) */ export declare function useDismiss(options: UseDismissOptions): void;