import { ComputedRef, PropType } from 'vue'; import { DefineComponentOptions, ExtractComponentPropTypes } from '../utils/component-options'; declare const CHILD_COMPONENT_PROP_PREFIX = "child:"; type ChildComponents = Record; type NonSymbol = T extends symbol ? never : T; /** @example Converts `{ closeButton: VaButton }` to `{ child:closeButton: ExtractComponentPropTypes }` */ type ChildComponentsPropsDefinition = { [K in keyof T as `${typeof CHILD_COMPONENT_PROP_PREFIX}${NonSymbol}`]: { type: PropType>; required: false; default: undefined; }; }; /** * Creates type definition for props. No runtime code is generated. * Creates new props with `child:` prefix, add names of child components and their props. * * @example * * Following code will generate new prop `child:closeButton` with type equal to `VaButton` props object. * * ```ts * const defineChildProps = defineChildComponents<{ * closeButton: VaButton * }>() * ``` */ export declare const defineChildProps: (obj: T) => ChildComponentsPropsDefinition; /** @notice No chaining for now. We assume component names as uniq across component tree */ export declare const useChildComponents: (props: Record<`${typeof CHILD_COMPONENT_PROP_PREFIX}${string}`, any>) => void; export declare const injectChildPropsFromParent: () => ComputedRef> | null; export {};