import { ComputedRef, Reactive } from 'vue'; /** * Prop on the parent component. * It's value is provided, so that it can be used in child components. */ export type SkeletonProvidedProp = { /** * Whether to show all supported child components as skeleton. * Can be overridden on each child component if necessary. */ skeleton: boolean; }; /** * Prop that may be used by the child components. */ type LocalProps = { skeleton: symbol | boolean | number; }; /** * Symbol for the skeleton injected property. */ export declare const SKELETON_INJECTED_SYMBOL: unique symbol; export type SKELETON_INJECTED = symbol; /** * Prop type used by child elements, which indicates that the prop value is taken from the parent by default. * The prop **MUST** use `SKELETON_INJECTED_SYMBOL` as default value. * `useSkeletonContext` is used to access the injected parent property. * * NOTE: The number type is used only for OnyxRadioGroup and OnyxCheckboxGroup components. * NOTE: The number type is not intended to be used by other properties with boolean skeleton prop. * * @example * ```ts * const props = withDefaults(defineProps(), { * skeleton: SKELETON_INJECTED_SYMBOL, * }); * * const skeleton = useSkeletonContext(props); * ``` */ export type SkeletonInjected = symbol | boolean | number; export declare const provideSkeletonContext: (parentElementProps: Reactive | undefined) => void; /** * Provides the injected parent property (if available). * Otherwise a defined default is used. * A prop defined on the child component will always take precedence over the injected parent property. * * The prop **MUST** use `SKELETON_INJECTED_SYMBOL` as default value. * The type `SkeletonInjected` can be used as PropType wrapper. * * @example * ```ts * const props = withDefaults(defineProps(), { * skeleton: SKELETON_INJECTED_SYMBOL, // By default, the parent injected value is used * }); * * const skeleton = useSkeletonContext(props); * ``` */ export declare const useSkeletonContext: (props: Reactive) => ComputedRef; export {};