import { ComponentDefaults } from './configProvider.types.js'; /** * Resolves the text a component renders of its own, per key, from three places: * the component's built-in English, the nearest `ConfigProvider`, and the * instance's `labels` prop, in that order of increasing precedence. * * Per key is the point, and the reason this exists next to `useComponentDefaults` * rather than relying on it. That one fills in whole props: a `labels` object on * an instance would replace the provider's entirely, so translating an app once * and overriding a single string on one instance would silently drop every other * translation for that component. * * ```tsx * const DEFAULT_LABELS: Required = { close: 'Close' }; * * function Modal({ labels, ...rest }: ModalProps) { * const text = useLabels('Modal', labels, DEFAULT_LABELS); * // text.close * } * ``` */ export declare function useLabels(component: keyof ComponentDefaults, labels: Partial | undefined, defaults: L): L;