import * as React from 'react'; export default function useMergedConfig( propConfig: any, templateConfig?: Target, ): readonly [boolean, Target] { return React.useMemo(() => { const support = !!propConfig; return [ support, { ...templateConfig, ...(support && typeof propConfig === 'object' ? propConfig : null), }, ] as const; }, [propConfig]); }