import { type ComponentPropsWithoutRef, type ReactElement, type ElementType as ReactElementType, type ReactNode } from 'react'; type ComponentMatcher = ReactElementType; type ComponentArrayMatcher = { match: ComponentMatcher; multiple: true; }; /** * @internal */ export type SlotConfig = Record; type Props = any; type SlotElements = { [Property in keyof Config]: SlotValue; }; type SlotValue = Config[Property] extends { match: infer Match; multiple: true; } ? Match extends ReactElementType ? Array, Match>> : Match extends [infer ElementType extends ReactElementType, any] ? Array, ElementType>> : never : Config[Property] extends ReactElementType ? ReactElement, Config[Property]> : never; /** * Extract components from `children` so we can render them in different places, * allowing us to implement components with SSR-compatible slot APIs. * Note: We can only extract direct children, not nested ones. * @internal */ export declare function useSlots(children: ReactNode, config: Config): [Partial>, ReactNode[]]; export {};