import type { ThemeName } from '../utils'; import { getThemeName } from '../utils'; import lendiSemantics from './themes/lendi'; import lendiNextSemantics from './themes/lendi-next'; import aussieSemantics from './themes/aussie'; import domainSemantics from './themes/domain'; type RadiusSemantics = 'default' | 'decorative' | 'button' | 'checkbox'; export const getRadius = (category?: RadiusSemantics, themeName?: ThemeName): string => { const internalTheme = themeName ?? getThemeName(); const brandMap = { lendi: lendiSemantics, 'lendi-next': lendiNextSemantics, aussie: aussieSemantics, domain: domainSemantics, }; return brandMap[internalTheme][category ?? 'default']; }; // Temporary Backwards compatibility adapter // TODO: remove when all components are migrated export const getBorderRadius = (opts: { theme?: ThemeName }): string => { return getRadius('default', opts.theme); }; export default getRadius;