import { type ReactNode } from "react"; /** * Extensible map of supported components → their props. * @salt-ds/core must augment this with the components that support the API, * using the same key string that the component passes to useClassNameInjection, * e.g., "saltButton": ButtonProps. */ export interface ComponentPropsMap { } type SupportedComponent = keyof ComponentPropsMap extends never ? "ComponentPropsMap must be augmented to define the components that support useClassNameInjection" : keyof ComponentPropsMap; export type ClassNameInjector = (props: Pick) => string | undefined; interface ClassNameInjectorEntry { fn: (props: unknown) => string | undefined; keys: string[]; } export type ClassNameInjectionRegistry = Map; export type ClassNameInjectionProviderProps = { children: ReactNode; value?: ClassNameInjectionRegistry; }; export declare function ClassNameInjectionProvider({ children, value, }: ClassNameInjectionProviderProps): import("react/jsx-runtime").JSX.Element; type PropsWithClassName = { className?: string; } & Record; /** * Return the className created by the registry and a props object with injector keys stripped. * Only components declared in ComponentPropsMap can call this at compile time. */ export declare function useClassNameInjection(component: SupportedComponent, props: Props): { className: string | undefined; props: Omit; }; /** * Register a class injector for a supported component name. * - Keys must be valid string keys for that component’s props (as declared in ComponentPropsMap). * - Injector receives only the declared keys (Pick, Keys>). */ export declare function registerClassInjector, Keys extends Extract>(registry: ClassNameInjectionRegistry, component: SupportedComponent, keys: Keys[], injector: ClassNameInjector): void; export {};