import type { InjectionKey, Ref, ComputedRef } from 'vue'; import type { UseEventBusReturn } from '@vueuse/core'; import type { FormFieldProps } from '../types'; import type { FormErrorWithId, FormEvent, FormFieldInjectedOptions, FormInjectedOptions } from '../types/form'; import type { GetObjectField } from '../types/utils'; type Props = { id?: string; name?: string; size?: GetObjectField; color?: GetObjectField; highlight?: boolean; disabled?: boolean; }; export declare const formOptionsInjectionKey: InjectionKey>; export declare const formBusInjectionKey: InjectionKey, string>>; export declare const formStateInjectionKey: InjectionKey | undefined>>; export declare const formFieldInjectionKey: InjectionKey> | undefined>; export declare const inputIdInjectionKey: InjectionKey>; export declare const formInputsInjectionKey: InjectionKey>>; export declare const formLoadingInjectionKey: InjectionKey>>; export declare const formErrorsInjectionKey: InjectionKey>>; /** * Wires an input to its wrapping `` (id/name/aria, validation events, error-driven color). * * **Always pass the raw `_props`, never the `useComponentProps` proxy.** * The internal fallback `props?.x ?? formField?.value.x` must distinguish * "explicit prop" from "theme default" — passing the proxy would leak * `` defaults into the explicit slot and let theme size/color * silently override the wrapping field (regression-tested in `Theme.spec.ts`). * * To get `` to apply when no `` wraps the input, * fall back to the proxy at the `tv()` call site: * * ```ts * size: size.value ?? props.size, * color: color.value ?? props.color, * highlight: highlight.value ?? props.highlight * ``` * * Final precedence: `explicit > FormField > > withDefaults > app.config > tv defaults`. */ export declare function useFormField(props?: Props, opts?: { bind?: boolean; deferInputValidation?: boolean; }): { id: ComputedRef; name: ComputedRef; size: ComputedRef<"lg" | "sm" | "md" | "xs" | NonNullable> | undefined>; color: ComputedRef<"air-primary-alert" | GetObjectField | undefined>; highlight: ComputedRef; disabled: ComputedRef; emitFormBlur: () => void; emitFormInput: import("@vueuse/shared").UseDebounceFnReturn<() => void>; emitFormChange: () => void; emitFormFocus: () => void; ariaAttrs: ComputedRef | undefined>; }; export {};