import type { UIOptions } from '@c15t/ui/theme'; /** * Subset of UIOptions that can be overridden at the component level. * * @remarks * This type picks the common configuration props from UIOptions that * are used across consent management components. These can be set * globally via the provider or overridden locally. * * @public */ export type ComponentConfig = Pick; /** * Required version of ComponentConfig with all props defined. * @public */ export type ResolvedComponentConfig = Required; /** * Hook to merge local component configuration with global theme settings. * * @remarks * Provides a consistent way to handle configuration props that can be set * globally via the ConsentManagerProvider or overridden locally on individual * components. Local values take precedence over global values. * * The configuration props are defined in UIOptions from @c15t/ui/theme, * ensuring consistency across all framework implementations. * * When `disableAnimation` is not explicitly set (locally or globally), * the hook automatically respects the user's `prefers-reduced-motion` * OS preference for accessibility. * * @param localOverrides - Optional local configuration that takes precedence over global theme * @returns Merged configuration with local values taking precedence * * @example * ```tsx * const MyComponent = ({ noStyle, disableAnimation, scrollLock, trapFocus }) => { * const config = useComponentConfig({ * noStyle, * disableAnimation, * scrollLock, * trapFocus, * }); * * // config.noStyle will be the local value if provided, otherwise global * // config.disableAnimation respects OS reduced motion preference if not set * return
; * }; * ``` * * @public */ export declare function useComponentConfig(localOverrides?: ComponentConfig): ResolvedComponentConfig;