import { ComponentPublicInstance } from "vue"; //#region src/composables/toElement/index.d.ts type MaybeElementValue = HTMLElement | SVGElement | ComponentPublicInstance | Element | null | undefined; /** * A flexible element ref type that accepts refs, getters, or raw values * containing DOM elements or Vue component instances. * * @remarks * Defined structurally (using `{ readonly value: T }`) instead of Vue's * nominal `Ref` to avoid type mismatches when consumers use a * different Vue version than the library. * Use {@link toElement} to resolve the actual DOM element. */ type MaybeElementRef = { readonly value: MaybeElementValue; } | (() => MaybeElementValue) | MaybeElementValue; /** * Resolves a {@link MaybeElementRef} to a DOM Element or undefined. * * Handles: * - `Ref`, `ShallowRef`, getter functions * - Vue component instances (`$el`, or the first root Element of a fragment root) * - Raw DOM elements (pass-through) * - null/undefined (returns undefined) * * @param target The element ref, getter, or raw value to resolve * @returns The resolved DOM Element, or undefined if not available * * @see https://0.vuetifyjs.com/composables/transformers/to-element * * @example * ```ts * import { toElement } from '@vuetify/v0' * * const el = shallowRef(null) * toElement(el) // HTMLElement | undefined * * const component = ref() * toElement(component) // Element | undefined (first root Element) * ``` */ declare function toElement(target: MaybeElementRef): Element | undefined; //#endregion export { MaybeElementRef, toElement };